diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml
deleted file mode 100644
index f970f0729..000000000
--- a/.github/workflows/assets.yml
+++ /dev/null
@@ -1,152 +0,0 @@
-name: Build Assets
-
-on:
- push:
- branches: main
-
- workflow_dispatch:
- inputs:
- cdn_branch:
- type: string
- required: false
- default: main
- description: What CDN branch to write to
- zip_url:
- type: string
- required: false
- description: ZIP URL to download instead of Steam client
- zip_root:
- type: string
- required: false
- description: Root dir of ZIP which houses the executable and Data dir
-
- schedule:
- - cron: '0 2 * * *'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.cdn_branch }}
- cancel-in-progress: true
-
-env:
- DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
- GH_TOKEN: ${{ secrets.ASSET_BOT }}
- DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
- DATABASE_URL: ${{ secrets.DATABASE_URL }}
- VIDEOS_SHEET: ${{ secrets.VIDEOS_SHEET }}
- GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
- WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
- WOTB_DLC_CDN: ${{ secrets.WOTB_DLC_CDN }}
- PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
- PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
- PUBLIC_ASSET_BRANCH: ${{ github.event.inputs.cdn_branch || secrets.PUBLIC_ASSET_BRANCH }}
- WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
- WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
- PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
- ALLOW_ROBOTS: true
- PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
- PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
- PUBLIC_PATREON_CLIENT_ID: ${{ secrets.PUBLIC_PATREON_CLIENT_ID }}
- PUBLIC_PATREON_REDIRECT_URI: ${{ secrets.PUBLIC_PATREON_REDIRECT_URI }}
- PATREON_CLIENT_SECRET: ${{ secrets.PATREON_CLIENT_SECRET }}
- PUBLIC_NITROPAY_ID: ${{ secrets.PUBLIC_NITROPAY_ID }}
- PUBLIC_DEBUG_MISSING_I18N: false
- PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
- PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
- PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
-
-jobs:
- download_client:
- name: Download client
- runs-on: ubuntu-latest
-
- steps:
- - name: (ZIP) Maximize build space
- if: github.event.inputs.zip_url != ''
- uses: easimon/maximize-build-space@master
- with:
- root-reserve-mb: 512
- swap-size-mb: 1024
- remove-dotnet: 'true'
-
- - uses: actions/checkout@v4
- with:
- submodules: recursive
- token: ${{ secrets.GH_TOKEN }}
-
- - name: (Steam) Setup bun
- uses: oven-sh/setup-bun@v1
- if: github.event.inputs.zip_url == ''
-
- - name: (Steam) Install dependencies
- if: github.event.inputs.zip_url == ''
- run: bun install
-
- - name: (Steam) Setup DepotDownloader
- if: github.event.inputs.zip_url == ''
- run: bun run setup:depotdownloader
-
- - name: (Steam) Download client
- if: github.event.inputs.zip_url == ''
- run: |
- chmod +x ./temp/depotDownloader/DepotDownloader
- ./temp/depotDownloader/DepotDownloader -q -os windows -app 444200 -username ${{ secrets.DEPOT_DOWNLOADER_USERNAME }} -password "${{ secrets.DEPOT_DOWNLOADER_PASSWORD }}"
-
- - name: (Steam) Apply patches
- if: github.event.inputs.zip_url == ''
- run: bun setup:patches --depot
-
- - name: (ZIP) Download client
- if: github.event.inputs.zip_url != ''
- env:
- ZIP_URL: ${{ github.event.inputs.zip_url }}
- ZIP_ROOT: ${{ github.event.inputs.zip_root }}
- run: |
- wget -q -O client.zip $ZIP_URL
- unzip -q client.zip -d client
- rm client.zip
- mkdir -p depots/444202/0
- mv client/$ZIP_ROOT/* depots/444202/0
-
- - name: Archive depots
- uses: actions/upload-artifact@v4
- with:
- name: depots
- path: depots
-
- build_assets:
- name: Build assets
- runs-on: ubuntu-latest
- needs: download_client
-
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
- token: ${{ secrets.GH_TOKEN }}
-
- - name: Setup bun
- uses: oven-sh/setup-bun@v1
-
- - name: Install dependencies
- run: bun install
-
- - name: Lint
- run: bun run lint:website
-
- - name: Download depots
- uses: actions/download-artifact@v4
- with:
- name: depots
- path: depots
-
- - name: AppArmor hack
- run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
-
- - name: Start server and build assets
- run: |
- bun dev:website --verbosepa &
- SERVER_PID=$!
-
- bun run build:assets --all-targets --depot --production
-
- kill $SERVER_PID || true
diff --git a/.github/workflows/averages.yml b/.github/workflows/averages.yml
deleted file mode 100644
index b17fa7423..000000000
--- a/.github/workflows/averages.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Averages
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '0 8 * * *'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-env:
- PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
- PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
- PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
- PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - uses: oven-sh/setup-bun@v1
-
- - name: Install dependencies
- run: bun install
-
- - name: Build averages
- env:
- PUBLIC_ASSET_BRANCH: main
- DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
- DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
- DATABASE_URL: ${{ secrets.DATABASE_URL }}
- VIDEOS_SHEET: ${{ secrets.VIDEOS_SHEET }}
- GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
- run: bun run build:averages --production
diff --git a/.github/workflows/discover-ids.yml b/.github/workflows/discover-ids.yml
deleted file mode 100644
index e70e2e39f..000000000
--- a/.github/workflows/discover-ids.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: Discover IDs
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '0 0 * * 1'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-env:
- DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
- DATABASE_URL: ${{ secrets.DATABASE_URL }}
- PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
- PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
- PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - uses: oven-sh/setup-bun@v1
-
- - name: Install dependencies
- run: bun install
-
- - name: Discover IDs
- run: bun build:ids --production
diff --git a/.github/workflows/rating-asia.yml b/.github/workflows/rating-asia.yml
deleted file mode 100644
index cc81278ab..000000000
--- a/.github/workflows/rating-asia.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: Rating Asia
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '0 17 * * *'
-
-jobs:
- host:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - uses: oven-sh/setup-bun@v1
-
- - name: Install dependencies
- run: bun install
-
- - name: Generate leaderboard
- env:
- PUBLIC_ASSET_BRANCH: main
- PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
- DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
- DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
- DATABASE_URL: ${{ secrets.DATABASE_URL }}
- PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
- PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
- PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
- run: bun build:ratingleaderboard --region=asia
diff --git a/.github/workflows/rating-eu.yml b/.github/workflows/rating-eu.yml
deleted file mode 100644
index 6f583e7c6..000000000
--- a/.github/workflows/rating-eu.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: Rating Europe
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '0 23 * * *'
-
-jobs:
- host:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - uses: oven-sh/setup-bun@v1
-
- - name: Install dependencies
- run: bun install
-
- - name: Generate leaderboard
- env:
- PUBLIC_ASSET_BRANCH: main
- PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
- DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
- DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
- DATABASE_URL: ${{ secrets.DATABASE_URL }}
- PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
- PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
- PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
- run: bun build:ratingleaderboard --region=eu
diff --git a/.github/workflows/rating-na.yml b/.github/workflows/rating-na.yml
deleted file mode 100644
index 0b070d938..000000000
--- a/.github/workflows/rating-na.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: Rating North America
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '0 5 * * *'
-
-jobs:
- host:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - uses: oven-sh/setup-bun@v1
-
- - name: Install dependencies
- run: bun install
-
- - name: Generate leaderboard
- env:
- PUBLIC_ASSET_BRANCH: main
- PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
- DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
- DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
- DATABASE_URL: ${{ secrets.DATABASE_URL }}
- PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
- PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
- PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
- run: bun build:ratingleaderboard --region=com
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
index baea38776..22c7f66e3 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/website.yml
@@ -17,20 +17,9 @@ concurrency:
cancel-in-progress: ${{ github.ref == 'refs/heads/main' }}
env:
- PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
- PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
- PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
- PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
- ALLOW_ROBOTS: 'true'
- WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
+ AUTO_PROXY_ORIGIN: ${{ secrets.AUTO_PROXY_ORIGIN }}
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
- PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
- GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
- WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
- WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
- PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
- PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
- PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
+ PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
jobs:
build:
diff --git a/bun.lockb b/bun.lockb
index 88ec7b0d0..9c52bc217 100644
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index edc98de5a..f1d9e44b5 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "blitzkit",
"private": true,
- "version": "1.27.11",
+ "version": "1.28.0-beta.1",
"description": "🎉 Tools for everything World of Tanks Blitz",
"type": "module",
"types": "./types.d.ts",
@@ -13,7 +13,7 @@
"build:assets": "cd packages/scripts && bun run build:assets",
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
"build:bot": "cd packages/scripts && bun run build:bot",
- "build:website": "bun build:prisma --no-hints && cd packages/website && bun run build",
+ "build:website": "bun build:prisma --no-hints && cd packages/website-ue && bun run build",
"build:prisma": "prisma generate",
"build:sitemap": "bun scripts/sitemap.ts",
"build:docs": "vitepress build docs",
diff --git a/packages/core/src/blitzkit/asset.ts b/packages/core/src/blitzkit/asset.ts
index ef3b57f08..cd4f9db8d 100644
--- a/packages/core/src/blitzkit/asset.ts
+++ b/packages/core/src/blitzkit/asset.ts
@@ -1,12 +1,13 @@
import { assertSecret } from './assertSecret';
-const repo = assertSecret(import.meta.env.PUBLIC_ASSET_REPO);
-const branch = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
-const fastUser = assertSecret(import.meta.env.PUBLIC_ASSET_FAST_USER);
-const fastRepo = assertSecret(import.meta.env.PUBLIC_ASSET_FAST_REPO);
-
export function asset(path: string) {
- return branch === 'main'
- ? `https://${fastUser}.github.io/${fastRepo}/${path}`
- : `https://raw.githubusercontent.com/${repo}/${branch}/${path}`;
+ return assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH) === 'main'
+ ? `https://${assertSecret(
+ import.meta.env.PUBLIC_ASSET_FAST_USER,
+ )}.github.io/${assertSecret(
+ import.meta.env.PUBLIC_ASSET_FAST_REPO,
+ )}/${path}`
+ : `https://raw.githubusercontent.com/${assertSecret(
+ import.meta.env.PUBLIC_ASSET_REPO,
+ )}/${assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH)}/${path}`;
}
diff --git a/packages/website-ue/astro.config.mjs b/packages/website-ue/astro.config.mjs
index 75acc1237..7dc8ffc02 100644
--- a/packages/website-ue/astro.config.mjs
+++ b/packages/website-ue/astro.config.mjs
@@ -1,10 +1,14 @@
// @ts-check
+import sitemap from '@astrojs/sitemap';
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
export default defineConfig({
- integrations: [react()],
+ integrations: [react(), sitemap()],
devToolbar: { enabled: false },
+ outDir: '../../dist/website',
+
+ prefetch: true,
site: 'https://blitzkit.app',
});
diff --git a/packages/website-ue/package.json b/packages/website-ue/package.json
index 34316915e..3206f19b6 100644
--- a/packages/website-ue/package.json
+++ b/packages/website-ue/package.json
@@ -5,7 +5,8 @@
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
- "astro": "astro"
+ "astro": "astro",
+ "lint": "astro check"
},
"dependencies": {
"@astrojs/partytown": "^2.1.4",
@@ -23,6 +24,7 @@
"@types/lodash-es": "^4.17.12",
"@types/react": "^19.1.5",
"@types/react-dom": "^19.1.5",
+ "@types/semver": "^7.7.0",
"@types/three": "^0.160.0",
"astro": "^5.8.0",
"immer": "^10.1.1",
@@ -31,6 +33,7 @@
"minimatch": "^10.0.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
+ "semver": "^7.7.2",
"three": "^0.169.0",
"zustand": "^4.5.5"
}
diff --git a/packages/website-ue/src/components/Checks/index.tsx b/packages/website-ue/src/components/Checks/index.tsx
index 292590133..44de0b60c 100644
--- a/packages/website-ue/src/components/Checks/index.tsx
+++ b/packages/website-ue/src/components/Checks/index.tsx
@@ -39,7 +39,7 @@ export function Checks({ localeData }: LocaleAcceptorProps) {
* Wargaming: 14 (refresh: 7)
*/
function Content() {
- const localeData = useLocale();
+ const { locale } = useLocale();
const logins = App.use((state) => state.logins);
const mutateApp = App.useMutation();
const appStore = App.useStore();
@@ -128,17 +128,11 @@ function Content() {
This website utilizes cookies to perform analytics and personalize
your experience. You can learn more through{' '}
-
+
our privacy policy
. By using BlitzKit, you also agree to our{' '}
-
+
terms of service
.
diff --git a/packages/website-ue/src/components/Footer.astro b/packages/website-ue/src/components/Footer.astro
index 190f461db..ece24e837 100644
--- a/packages/website-ue/src/components/Footer.astro
+++ b/packages/website-ue/src/components/Footer.astro
@@ -1,5 +1,4 @@
---
-import { assertSecret, fetchGameDefinitions } from '@blitzkit/core';
import { Box, Code, Flex, Heading, Link, Text } from '@radix-ui/themes';
import packageJson from '../../../../package.json';
import { getStrings } from '../core/i18n/getStrings';
@@ -10,8 +9,6 @@ interface Props {
locale: string;
}
-const gameDefinitions = await fetchGameDefinitions();
-const PUBLIC_ASSET_BRANCH = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
const { locale } = Astro.props;
const localeData = { locale };
const strings = await getStrings(locale);
@@ -83,7 +80,7 @@ const strings = await getStrings(locale);
sm: 'start',
}}
>
-
+
{strings.website.footer.about.credits}
{strings.website.footer.about.github}
-
+
{strings.website.footer.about.patches}
@@ -120,14 +117,10 @@ const strings = await getStrings(locale);
>
{strings.website.footer.legal.title}
-
+
{strings.website.footer.legal.privacy}
-
+
{strings.website.footer.legal.terms}
@@ -138,30 +131,12 @@ const strings = await getStrings(locale);
BlitzKit
- {
- PUBLIC_ASSET_BRANCH !== 'preview' && (
-
- WoTB
-
- )
- }
- CDN
{packageJson.version}
- {
- PUBLIC_ASSET_BRANCH !== 'preview' && (
-
- {gameDefinitions.version}
-
- )
- }
-
- {PUBLIC_ASSET_BRANCH}
-
@@ -170,23 +145,5 @@ const strings = await getStrings(locale);
{packageJson.version}
-
- {
- PUBLIC_ASSET_BRANCH !== 'preview' && (
- <>
-
- WoTB
-
-
- {gameDefinitions.version}
-
- >
- )
- }
-
- CDN
-
- {PUBLIC_ASSET_BRANCH}
-
diff --git a/packages/website-ue/src/components/LinkI18n.tsx b/packages/website-ue/src/components/LinkI18n.tsx
index 3683be164..4736d0158 100644
--- a/packages/website-ue/src/components/LinkI18n.tsx
+++ b/packages/website-ue/src/components/LinkI18n.tsx
@@ -1,14 +1,12 @@
import locales from '@blitzkit/i18n/locales.json' with { type: 'json' };
import { Link, type LinkProps } from '@radix-ui/themes';
-import type { LocaleAcceptorProps } from '../hooks/useLocale';
export function LinkI18n({
- localeData,
+ locale,
href,
...props
-}: LinkProps & LocaleAcceptorProps) {
- const prefix =
- localeData.locale === locales.default ? '' : `/${localeData.locale}`;
+}: LinkProps & { locale: string }) {
+ const prefix = locale === locales.default ? '' : `/${locale}`;
return (
diff --git a/packages/website-ue/src/components/Navbar.astro b/packages/website-ue/src/components/Navbar.astro
index e5f25a1b6..49cf8898b 100644
--- a/packages/website-ue/src/components/Navbar.astro
+++ b/packages/website-ue/src/components/Navbar.astro
@@ -18,7 +18,6 @@ export interface Props {
}
const { integrated, locale } = Astro.props;
-const localeData = { locale };
const toolsFiltered = tools.filter((tool) => tool.enabled);
const branchName = resolveBranchName();
const isBranchNamed = branchName !== undefined;
@@ -107,7 +106,7 @@ const strings = await getStrings(locale);
- {
- disabled ? (
- <>
- Unavailable on{' '}
- {assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH)}
- >
- ) : (
- toolStrings.description
- )
- }
+ {toolStrings.description}
diff --git a/packages/website-ue/src/core/blitzkit/branches.ts b/packages/website-ue/src/core/blitzkit/branches.ts
index d78a374c1..a4301c6fe 100644
--- a/packages/website-ue/src/core/blitzkit/branches.ts
+++ b/packages/website-ue/src/core/blitzkit/branches.ts
@@ -1,9 +1,10 @@
-import { assertSecret } from 'packages/core/src';
+import { prerelease } from 'semver';
+import packageJSON from '../../../../../package.json';
export function resolveBranchName() {
- if (assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH) === 'main') {
- return undefined;
- }
+ const components = prerelease(packageJSON.version);
- return import.meta.env.PUBLIC_ASSET_BRANCH;
+ if (components === null) return undefined;
+
+ return components[0];
}
diff --git a/packages/website-ue/src/pages/404.astro b/packages/website-ue/src/pages/404.astro
index 757b4af59..23f99ae65 100644
--- a/packages/website-ue/src/pages/404.astro
+++ b/packages/website-ue/src/pages/404.astro
@@ -7,7 +7,6 @@ import { PageWrapper } from '../components/PageWrapper';
import BaseLayout from '../layouts/BaseLayout.astro';
const locale = locales.default;
-const localeData = { locale };
---
@@ -16,7 +15,7 @@ const localeData = { locale };
Where would you like to go?
-
+
diff --git a/packages/website-ue/src/pages/[...locale]/avatars/_index.tsx b/packages/website-ue/src/pages/[...locale]/avatars/_index.tsx
index 215850e89..ca133b2e9 100644
--- a/packages/website-ue/src/pages/[...locale]/avatars/_index.tsx
+++ b/packages/website-ue/src/pages/[...locale]/avatars/_index.tsx
@@ -31,7 +31,7 @@ export function Page({ localeData }: LocaleAcceptorProps) {
}
function Content() {
- const { gameStrings, strings } = useLocale();
+ const { gameStrings } = useLocale();
const groups = useMemo(() => {
const avatars = allAvatars
.map((id) => {