Skip to content

Commit 0dc5a0a

Browse files
committed
feat: 修改月之一版本名
1 parent 76b991c commit 0dc5a0a

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

app/components/admin/tournament/AdminTournamentForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</NForm>
3131
<NDescriptions v-else label-placement="left" :column="3" separator="&emsp;">
3232
<NDescriptionsItem :label="t('main.tournament.name')" :span="3">{{ currentLocalized(tournament.name) }}</NDescriptionsItem>
33-
<NDescriptionsItem :label="t('terms.gameVersion')">{{ tournament.gameVersion }}</NDescriptionsItem>
33+
<NDescriptionsItem :label="t('terms.gameVersion')">{{ getGameVersionName(tournament.gameVersion) }}</NDescriptionsItem>
3434
<NDescriptionsItem :label="t('terms.region')">{{ currentLocalized(regionByKey[tournament.region]?.name) }}</NDescriptionsItem>
3535
<NDescriptionsItem :label="t('main.tournament.type')">{{ tournament.type }}</NDescriptionsItem>
3636
</NDescriptions>
@@ -88,7 +88,7 @@ const tournament = defineModel<Tournament>({ required: true });
8888
8989
const { t, currentLocalized } = useLocales();
9090
const message = useMessage();
91-
const { regionByKey } = useSharedData();
91+
const { regionByKey, getGameVersionName } = await useAsyncSharedData();
9292
9393
const formRef = ref<InstanceType<typeof NForm>>();
9494
const stageFormRefs = ref<InstanceType<typeof AdminTournamentStageForm>[]>([]);

app/components/main/home/HomeOverview.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { divide } from "mathjs/number";
1010
1111
const { t } = useLocales();
1212
13+
const { getGameVersionName } = await useAsyncSharedData();
14+
1315
const { data: overviewData } = await useFetch("/api/v4/overview-stats");
1416
1517
const data = computed(() => {
@@ -30,6 +32,7 @@ const columns: DataTableColumn<RowType>[] = [
3032
key: "gameVersion",
3133
title: t("main.home.overview.gameVersion"),
3234
align: "center",
35+
render: row => getGameVersionName(row.gameVersion),
3336
},
3437
{
3538
key: "numGames",

app/pages/admin/tournaments/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<template v-for="season in seasons" :key="season">
44
<NH2 :id="`S${season}`">{{ t("main.tournaments.seasonName", [season]) }}</NH2>
55
<template v-for="(list, gameVersion) in bySeason[season]" :key="gameVersion">
6-
<NH2 :id="gameVersion.replace('.', '-')">{{ gameVersion }}</NH2>
6+
<NH2 :id="gameVersion.replace('.', '-')">{{ getGameVersionName(gameVersion) }}</NH2>
77
<TournamentList>
88
<template v-for="tournament in list" :key="tournament.id">
99
<NuxtLinkLocale :to="{ path: `/admin/tournament/${tournament.id}` }">
@@ -30,7 +30,7 @@
3030
>
3131
<template v-for="(list, gameVersion) in bySeason[season]" :key="gameVersion">
3232
<NAnchorLink
33-
:title="gameVersion"
33+
:title="getGameVersionName(gameVersion)"
3434
:href="`#${gameVersion.replace('.', '-')}`"
3535
/>
3636
</template>
@@ -45,7 +45,7 @@ const { t } = useLocales();
4545
useHead({ title: t("site.titles.admin.tournaments") });
4646
4747
const { data: tournaments } = await useFetch("/api/v4/tournaments");
48-
const { gameVersionFullList } = await useAsyncSharedData();
48+
const { gameVersionFullList, getGameVersionName } = await useAsyncSharedData();
4949
5050
const bySeason = computed(() => {
5151
const bySeason: Record<SeasonPhraseId, Record<GameVersionId, TournamentDetailBrief[]>> = {};

0 commit comments

Comments
 (0)