Skip to content

Commit 1df3966

Browse files
zzxmingghostdevv
andauthored
fix: dialog title switch with select (#1497)
Co-authored-by: Willow (GHOST) <git@willow.sh>
1 parent b03fb88 commit 1df3966

File tree

22 files changed

+11
-26
lines changed

22 files changed

+11
-26
lines changed

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ const route = useRoute()
1717
const chartModal = useModal('chart-modal')
1818
const hasChartModalTransitioned = shallowRef(false)
1919
20+
const modalTitle = computed(() => {
21+
const facet = route.query.facet as string | undefined
22+
if (facet === 'likes') return $t('package.trends.items.likes')
23+
if (facet === 'contributors') return $t('package.trends.items.contributors')
24+
return $t('package.trends.items.downloads')
25+
})
26+
2027
const isChartModalOpen = shallowRef<boolean>(false)
2128
2229
function handleModalClose() {
@@ -305,7 +312,7 @@ const config = computed(() => {
305312

306313
<PackageChartModal
307314
v-if="isChartModalOpen && hasWeeklyDownloads"
308-
:title="$t('package.downloads.modal_title')"
315+
:title="modalTitle"
309316
@close="handleModalClose"
310317
@transitioned="handleModalTransitioned"
311318
>
@@ -356,6 +363,7 @@ const config = computed(() => {
356363
padding: 0 !important;
357364
letter-spacing: 0.04rem;
358365
}
366+
359367
.vue-ui-sparkline text {
360368
font-family:
361369
Geist Mono,

i18n/locales/ar.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@
371371
},
372372
"downloads": {
373373
"title": "التنزيلات الأسبوعية",
374-
"modal_title": "التنزيلات الأسبوعية",
375374
"analyze": "تحليل التنزيلات",
376375
"community_distribution": "عرض توزيع تبنّي المجتمع"
377376
},

i18n/locales/bg-BG.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@
359359
},
360360
"downloads": {
361361
"title": "Седмични изтегляния",
362-
"modal_title": "Седмични изтегляния",
363362
"analyze": "Анализ на изтеглянията",
364363
"community_distribution": "Преглед на разпределението на приемането от общността"
365364
},

i18n/locales/de-DE.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@
369369
},
370370
"downloads": {
371371
"title": "Wöchentliche Downloads",
372-
"modal_title": "Wöchentliche Downloads",
373372
"analyze": "Downloads analysieren",
374373
"community_distribution": "Community-Adoptionsverteilung ansehen"
375374
},

i18n/locales/en.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@
371371
},
372372
"downloads": {
373373
"title": "Weekly Downloads",
374-
"modal_title": "Weekly Downloads",
375374
"analyze": "Analyze downloads",
376375
"community_distribution": "View community adoption distribution"
377376
},

i18n/locales/es.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@
367367
},
368368
"downloads": {
369369
"title": "Descargas Semanales",
370-
"modal_title": "Descargas semanales",
371370
"analyze": "Analizar descargas",
372371
"community_distribution": "Ver distribución de adopción comunitaria"
373372
},

i18n/locales/fr-FR.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@
371371
},
372372
"downloads": {
373373
"title": "Téléchargements hebdo.",
374-
"modal_title": "Téléchargements hebdomadaires",
375374
"analyze": "Analyser les téléchargements",
376375
"community_distribution": "Voir la distribution des versions téléchargées par la communauté"
377376
},

i18n/locales/ja-JP.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@
361361
},
362362
"downloads": {
363363
"title": "週間ダウンロード数",
364-
"modal_title": "週間ダウンロード数",
365364
"analyze": "ダウンロード数を分析",
366365
"community_distribution": "コミュニティの採用分布を表示"
367366
},

i18n/locales/pl-PL.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,7 @@
371371
"downloads": {
372372
"title": "Pobrania tygodniowe",
373373
"analyze": "Analizuj pobrania",
374-
"community_distribution": "Zobacz, jak społeczność korzysta z pakietu",
375-
"modal_title": "Pobrania tygodniowe"
374+
"community_distribution": "Zobacz, jak społeczność korzysta z pakietu"
376375
},
377376
"install_scripts": {
378377
"title": "Skrypty instalacji",

i18n/locales/zh-CN.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@
371371
},
372372
"downloads": {
373373
"title": "每周下载量",
374-
"modal_title": "每周下载量",
375374
"analyze": "分析下载量",
376375
"community_distribution": "查看社区采用分布"
377376
},

0 commit comments

Comments
 (0)