mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: rename to avatars
This commit is contained in:
1 parent
9375f134db
commit
2c2c3687c7
6 files changed
+107
-33
No files matched your search
@@ -13,7 +13,8 @@
|
|||||||
"hp": "%s1hp",
|
"hp": "%s1hp",
|
||||||
"x": "x%s1",
|
"x": "x%s1",
|
||||||
"percentage": "%s1%",
|
"percentage": "%s1%",
|
||||||
"deg_s": "%s1°/s"
|
"deg_s": "%s1°/s",
|
||||||
|
"times": "x%s1"
|
||||||
},
|
},
|
||||||
|
|
||||||
"gun_types": {
|
"gun_types": {
|
||||||
@@ -1252,18 +1253,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gallery": {
|
|
||||||
"name": "Gallery",
|
"avatars": {
|
||||||
"unnamed_avatar": "Unnamed avatar",
|
"name": "Avatars",
|
||||||
"button": "Browse all",
|
"button": "Browse all",
|
||||||
"description": "Blitz player avatars",
|
"seo_description": "All World of Tanks Blitz player profile avatars",
|
||||||
"seo_description": "All World of Tanks Blitz player avatars",
|
"description": "Player profile avatars",
|
||||||
"last_updated": "Last updated on %s1",
|
|
||||||
|
"unnamed_avatar": "Unnamed avatar",
|
||||||
"search": {
|
"search": {
|
||||||
"hint": "Search avatars...",
|
"hint": "Search avatars...",
|
||||||
"results": "%s1 avatars"
|
"results": "%s1 avatars"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"session": {
|
"session": {
|
||||||
"name": "Session",
|
"name": "Session",
|
||||||
"button": "Start tracking",
|
"button": "Start tracking",
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
import locales from '@blitzkit/i18n/locales.json';
|
||||||
|
import { DiscordLogoIcon, PaperPlaneIcon } from '@radix-ui/react-icons';
|
||||||
|
import { Button, Flex, Heading, Link, Text } from '@radix-ui/themes';
|
||||||
|
import { PageWrapper } from '../components/PageWrapper';
|
||||||
|
import { getStrings } from '../core/i18n/getStrings';
|
||||||
|
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
path: string;
|
||||||
|
locale: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { path, locale } = Astro.props;
|
||||||
|
|
||||||
|
const strings = await getStrings(locale);
|
||||||
|
const resolvedPath = `/${locale === locales.default ? '' : `${locale}/`}${path}`;
|
||||||
|
---
|
||||||
|
|
||||||
|
<BaseLayout {locale}>
|
||||||
|
<link
|
||||||
|
slot="head"
|
||||||
|
rel="canonical"
|
||||||
|
href={`${Astro.url.origin}${resolvedPath}`}
|
||||||
|
/>
|
||||||
|
<meta slot="head" http-equiv="refresh" content={`0; url=${resolvedPath}`} />
|
||||||
|
|
||||||
|
<PageWrapper align="center" justify="center" gap="0">
|
||||||
|
<Heading>{strings.website.redirect.title}</Heading>
|
||||||
|
<Text color="gray">{strings.website.redirect.body}</Text>
|
||||||
|
|
||||||
|
<Flex mt="4" gap="2">
|
||||||
|
<Link href={resolvedPath}>
|
||||||
|
<Button>
|
||||||
|
<PaperPlaneIcon /> Redirect
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Link href="https://discord.gg/nDt7AjGJQH">
|
||||||
|
<Button variant="outline">
|
||||||
|
<DiscordLogoIcon /> Discord
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
</Flex>
|
||||||
|
</PageWrapper>
|
||||||
|
</BaseLayout>
|
||||||
@@ -35,8 +35,8 @@ export const chartsTool: Tool = {
|
|||||||
button: { color: 'bronze' },
|
button: { color: 'bronze' },
|
||||||
};
|
};
|
||||||
|
|
||||||
export const galleryTool: Tool = {
|
export const avatarsTool: Tool = {
|
||||||
id: 'gallery',
|
id: 'avatars',
|
||||||
enabled: true,
|
enabled: true,
|
||||||
button: { color: 'gold' },
|
button: { color: 'gold' },
|
||||||
};
|
};
|
||||||
@@ -68,7 +68,7 @@ export const tools: Tool[] = [
|
|||||||
performanceTool,
|
performanceTool,
|
||||||
guessTool,
|
guessTool,
|
||||||
chartsTool,
|
chartsTool,
|
||||||
galleryTool,
|
avatarsTool,
|
||||||
sessionTool,
|
sessionTool,
|
||||||
tierListTool,
|
tierListTool,
|
||||||
embedTool,
|
embedTool,
|
||||||
|
|||||||
+29
-13
@@ -3,6 +3,7 @@ import { StuffUIComponent } from '@protos/blitz_static_stuff_ui_component';
|
|||||||
import { BlitzkitAllAvatarsComponent } from '@protos/blitzkit_static_all_avatars_component';
|
import { BlitzkitAllAvatarsComponent } from '@protos/blitzkit_static_all_avatars_component';
|
||||||
import { Badge, Box, Flex, Grid, Text } from '@radix-ui/themes';
|
import { Badge, Box, Flex, Grid, Text } from '@radix-ui/themes';
|
||||||
import { CatalogItemAccessor } from 'packages/core/src/blitz/catalogItemAccessor';
|
import { CatalogItemAccessor } from 'packages/core/src/blitz/catalogItemAccessor';
|
||||||
|
import { literals } from 'packages/i18n/src';
|
||||||
import { PageWrapper } from 'packages/website-ue/src/components/PageWrapper';
|
import { PageWrapper } from 'packages/website-ue/src/components/PageWrapper';
|
||||||
import { metadata } from 'packages/website-ue/src/core/blitz/metadata';
|
import { metadata } from 'packages/website-ue/src/core/blitz/metadata';
|
||||||
import { Var } from 'packages/website-ue/src/core/radix/var';
|
import { Var } from 'packages/website-ue/src/core/radix/var';
|
||||||
@@ -45,7 +46,7 @@ function Content() {
|
|||||||
);
|
);
|
||||||
const name =
|
const name =
|
||||||
gameStrings[stuffComponent.display_name] ??
|
gameStrings[stuffComponent.display_name] ??
|
||||||
strings.website.tools.gallery.unnamed_avatar;
|
strings.website.tools.avatars.unnamed_avatar;
|
||||||
|
|
||||||
return { avatar, name, stuffComponent, avatarComponent };
|
return { avatar, name, stuffComponent, avatarComponent };
|
||||||
})
|
})
|
||||||
@@ -82,7 +83,7 @@ function Content() {
|
|||||||
<Flex direction="column" gap="3" key={name}>
|
<Flex direction="column" gap="3" key={name}>
|
||||||
<Box
|
<Box
|
||||||
width="100%"
|
width="100%"
|
||||||
style={{ aspectRatio: '1 / 1' }}
|
style={{ aspectRatio: '7 / 8' }}
|
||||||
position="relative"
|
position="relative"
|
||||||
>
|
>
|
||||||
{avatarsReduced.map((avatar, index) => (
|
{avatarsReduced.map((avatar, index) => (
|
||||||
@@ -100,26 +101,41 @@ function Content() {
|
|||||||
backgroundSize: 'cover',
|
backgroundSize: 'cover',
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
|
{avatars.length > 1 && (
|
||||||
|
<Box
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
style={{
|
||||||
|
background: `linear-gradient(-45deg, ${Var('black-a9')} 25%, ${Var('black-a1')} 50%)`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{avatars.length > 1 && (
|
{avatars.length > 1 && (
|
||||||
<Box
|
<Box position="absolute" bottom="1" right="1">
|
||||||
position="absolute"
|
|
||||||
bottom="0"
|
|
||||||
left="50%"
|
|
||||||
style={{
|
|
||||||
transform: 'translate(-50%, 25%)',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Badge variant="solid" color="gray" highContrast size="3">
|
<Badge variant="solid" color="gray" highContrast size="3">
|
||||||
x{avatars.length}
|
{literals(strings.common.units.times, [
|
||||||
|
`${avatars.length}`,
|
||||||
|
])}
|
||||||
</Badge>
|
</Badge>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Text size="2">{name}</Text>
|
<Text
|
||||||
|
size="2"
|
||||||
|
wrap="nowrap"
|
||||||
|
align="center"
|
||||||
|
style={{
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{name}
|
||||||
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
import { metadata } from 'packages/website-ue/src/core/blitz/metadata';
|
||||||
|
import BaseLayout from 'packages/website-ue/src/layouts/BaseLayout.astro';
|
||||||
|
import { Page } from './_index';
|
||||||
|
|
||||||
|
export { getStaticPaths } from '../index.astro';
|
||||||
|
|
||||||
|
const { locale } = Astro.props;
|
||||||
|
|
||||||
|
const gameStrings = await metadata.stringsPartial(locale, [
|
||||||
|
'ProfileAvatarEntity__*',
|
||||||
|
]);
|
||||||
|
---
|
||||||
|
|
||||||
|
<BaseLayout {locale}>
|
||||||
|
<Page localeData={{ locale, gameStrings }} client:load />
|
||||||
|
</BaseLayout>
|
||||||
@@ -1,17 +1,9 @@
|
|||||||
---
|
---
|
||||||
import { metadata } from 'packages/website-ue/src/core/blitz/metadata';
|
import LegacyRedirect from 'packages/website-ue/src/components/LegacyRedirect.astro';
|
||||||
import BaseLayout from 'packages/website-ue/src/layouts/BaseLayout.astro';
|
|
||||||
import { Page } from './_index';
|
|
||||||
|
|
||||||
export { getStaticPaths } from '../index.astro';
|
export { getStaticPaths } from '../index.astro';
|
||||||
|
|
||||||
const { locale } = Astro.props;
|
const { locale } = Astro.props;
|
||||||
|
|
||||||
const gameStrings = await metadata.stringsPartial(locale, [
|
|
||||||
'ProfileAvatarEntity__*',
|
|
||||||
]);
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout {locale}>
|
<LegacyRedirect {locale} path="avatars" />
|
||||||
<Page localeData={{ locale, gameStrings }} client:load />
|
|
||||||
</BaseLayout>
|
|
||||||
Reference in new issue
Block a user