File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 </NForm >
3131 <NDescriptions v-else label-placement="left" :column =" 3 " separator=" ">
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
8989const { t, currentLocalized } = useLocales ();
9090const message = useMessage ();
91- const { regionByKey } = useSharedData ();
91+ const { regionByKey, getGameVersionName } = await useAsyncSharedData ();
9292
9393const formRef = ref <InstanceType <typeof NForm >>();
9494const stageFormRefs = ref <InstanceType <typeof AdminTournamentStageForm >[]>([]);
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import { divide } from "mathjs/number";
1010
1111const { t } = useLocales ();
1212
13+ const { getGameVersionName } = await useAsyncSharedData ();
14+
1315const { data : overviewData } = await useFetch (" /api/v4/overview-stats" );
1416
1517const 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" ,
Original file line number Diff line number Diff line change 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 } ` } " >
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();
4545useHead ({ title: t (" site.titles.admin.tournaments" ) });
4646
4747const { data : tournaments } = await useFetch (" /api/v4/tournaments" );
48- const { gameVersionFullList } = await useAsyncSharedData ();
48+ const { gameVersionFullList, getGameVersionName } = await useAsyncSharedData ();
4949
5050const bySeason = computed (() => {
5151 const bySeason: Record <SeasonPhraseId , Record <GameVersionId , TournamentDetailBrief []>> = {};
You can’t perform that action at this time.
0 commit comments