mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
Fix: footer game version and CDN label
The footer showed the game's full version with its build number and labelled the environment as "CDN". Show only the part of the game version before the underscore (e.g. 11.20), and rename the "CDN" label to "Branch" since it shows the environment/branch the site was built from.
This commit is contained in:
1 parent
f3e8cdd5e0
commit
6fb14d5544
1 file changed
+5
-4
@@ -12,6 +12,7 @@ export interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const gameDefinitions = await api.gameDefinitions();
|
const gameDefinitions = await api.gameDefinitions();
|
||||||
|
const gameVersion = gameDefinitions.version.split("_")[0];
|
||||||
const environment = assertSecret(import.meta.env.PUBLIC_ENVIRONMENT);
|
const environment = assertSecret(import.meta.env.PUBLIC_ENVIRONMENT);
|
||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
const strings = getStrings(locale);
|
const strings = getStrings(locale);
|
||||||
@@ -141,7 +142,7 @@ const strings = getStrings(locale);
|
|||||||
</Text>
|
</Text>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
<Text size="2" color="gray">CDN</Text>
|
<Text size="2" color="gray">Branch</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Flex direction="column" gap="1" flexGrow="1" flexBasis="0" align="start">
|
<Flex direction="column" gap="1" flexGrow="1" flexBasis="0" align="start">
|
||||||
@@ -151,7 +152,7 @@ const strings = getStrings(locale);
|
|||||||
{
|
{
|
||||||
environment !== "preview" && (
|
environment !== "preview" && (
|
||||||
<Code size="2" color="gray">
|
<Code size="2" color="gray">
|
||||||
{gameDefinitions.version}
|
{gameVersion}
|
||||||
</Code>
|
</Code>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -174,13 +175,13 @@ const strings = getStrings(locale);
|
|||||||
WoTB
|
WoTB
|
||||||
</Text>
|
</Text>
|
||||||
<Code size="2" color="gray">
|
<Code size="2" color="gray">
|
||||||
{gameDefinitions.version}
|
{gameVersion}
|
||||||
</Code>
|
</Code>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
<Text size="2" color="gray">CDN</Text>
|
<Text size="2" color="gray">Branch</Text>
|
||||||
<Code size="2" color="gray">
|
<Code size="2" color="gray">
|
||||||
{environment}
|
{environment}
|
||||||
</Code>
|
</Code>
|
||||||
|
|||||||
Reference in new issue
Block a user