mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
fix: logsin
This commit is contained in:
1 parent
8670e5f9a7
commit
85491c7f22
16 files changed
+47
-38
No files matched your search
+6
-6
@@ -1,9 +1,9 @@
|
||||
import { SupplementaryStats } from '../blitz/getAccountInfo';
|
||||
import { tankDefinitions, TreeType } from '../blitzkit/tankDefinitions';
|
||||
import { blitzStarsTankAverages } from '../blitzstars/tankAverages';
|
||||
import { calculateWN8 } from './calculateWN8';
|
||||
import { BlitzStats } from './compositeStats';
|
||||
import { sumAllStats } from './sumAllStats';
|
||||
import { blitzStarsTankAverages } from './tankAverages';
|
||||
import { SupplementaryStats } from '@blitzkit/core/src/blitz/getAccountInfo';
|
||||
import { tankDefinitions, TreeType } from '@blitzkit/core/src/blitzkit/tankDefinitions';
|
||||
import { calculateWN8 } from '@blitzkit/core/src/statistics/calculateWN8';
|
||||
import { BlitzStats } from '@blitzkit/core/src/statistics/compositeStats';
|
||||
import { sumAllStats } from '@blitzkit/core/src/statistics/sumAllStats';
|
||||
|
||||
export interface StatFilters {
|
||||
nation?: string;
|
||||
+3
-7
@@ -1,5 +1,5 @@
|
||||
import { BlitzStats, tankDefinitions } from '@blitzkit/core';
|
||||
import { context } from '../blitzkit/context';
|
||||
import { BlitzStats } from '@blitzkit/core';
|
||||
import { context } from '@blitzkit/core/src/blitzkit/context';
|
||||
|
||||
interface SpecialStats {
|
||||
winrate: number;
|
||||
@@ -79,14 +79,10 @@ export interface IndividualTankAverage {
|
||||
last_update: number;
|
||||
}
|
||||
|
||||
tankDefinitions;
|
||||
|
||||
export type BlitzStarsTankAverages = Record<number, IndividualTankAverage>;
|
||||
|
||||
export const blitzStarsTankAverages = fetch(
|
||||
context === 'website'
|
||||
? '/api/tank-averages'
|
||||
: 'https://www.blitzstars.com/api/tankaverages.json',
|
||||
'https://www.blitzstars.com/api/tankaverages.json',
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((json) => {
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ShellDefinition, ShellType } from '@blitzkit/core';
|
||||
import { type ShellDefinition, ShellType } from '@blitzkit/core';
|
||||
|
||||
export function canSplash(type: ShellDefinition['type']): type is ShellType.HE {
|
||||
return type === ShellType.HE;
|
||||
|
||||
@@ -2,6 +2,6 @@ import { assertSecret } from './assertSecret';
|
||||
|
||||
export function asset(path: string) {
|
||||
return `https://raw.githubusercontent.com/${assertSecret(
|
||||
process.env.PUBLIC_ASSET_REPO,
|
||||
)}/${assertSecret(process.env.PUBLIC_ASSET_BRANCH)}/${path}`;
|
||||
import.meta.env.PUBLIC_ASSET_REPO,
|
||||
)}/${assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH)}/${path}`;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export * from './gameDefinitions';
|
||||
// export * from './sum';
|
||||
export * from './superCompress';
|
||||
export * from './superDecompress';
|
||||
// export * from './tankDefinitions';
|
||||
export * from './tankDefinitions';
|
||||
// export * from './tankIcon';
|
||||
// export * from './tankNames';
|
||||
// export * from './unionBoundingBox';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { context } from '@blitzkit/core';
|
||||
import { context } from './context';
|
||||
|
||||
export function withCORSProxy(url: string) {
|
||||
return context === 'website'
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * from './tankAverages';
|
||||
@@ -6,6 +6,6 @@ export * from './imgur';
|
||||
// export * from './math';
|
||||
export * from './patreon';
|
||||
// export * from './protobuf';
|
||||
// export * from './statistics';
|
||||
export * from './statistics';
|
||||
// export * from './streams';
|
||||
// export * from './types';
|
||||
@@ -3,8 +3,8 @@ import { assertSecret } from '../blitzkit/assertSecret';
|
||||
export function patreonLoginUrl() {
|
||||
const params = new URLSearchParams({
|
||||
response_type: 'code',
|
||||
client_id: assertSecret(process.env.PUBLIC_PATREON_CLIENT_ID),
|
||||
redirect_uri: assertSecret(process.env.PUBLIC_PATREON_REDIRECT_URI),
|
||||
client_id: assertSecret(import.meta.env.PUBLIC_PATREON_CLIENT_ID),
|
||||
redirect_uri: assertSecret(import.meta.env.PUBLIC_PATREON_REDIRECT_URI),
|
||||
scope: 'identity',
|
||||
});
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ export * from './calculateWN8';
|
||||
export * from './compositeStats';
|
||||
export * from './deltaBkrlBlitzStats';
|
||||
export * from './deltaTankStats';
|
||||
export * from './filterStats';
|
||||
export * from './getBkniPercentile';
|
||||
export * from './getTierWeights';
|
||||
export * from './getWN8Percentile';
|
||||
|
||||
@@ -7,15 +7,5 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
".next/types/**/*.ts",
|
||||
"../../dist/website/types/**/*.ts",
|
||||
"dist/website/types/**/*.ts",
|
||||
"../website/src/components/ToolCard.tsx",
|
||||
"../website/src/constants/tools.tsx",
|
||||
"../website/src/components/Plugs.tsx",
|
||||
"../website/src/constants/embeds.ts",
|
||||
"../website/src/types"
|
||||
]
|
||||
"include": ["src/**/*", ".next/types/**/*.ts"]
|
||||
}
|
||||
@@ -198,7 +198,7 @@ const isBranchNamed =
|
||||
<GearIcon />
|
||||
</Link>
|
||||
|
||||
<NavbarAccount client:idle />
|
||||
<NavbarAccount client:load />
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
@@ -28,7 +28,7 @@ export function WargamingLoginButton({ children, ...props }: ButtonProps) {
|
||||
href={
|
||||
typeof window !== 'undefined'
|
||||
? `https://api.worldoftanks.${region}/wot/auth/login/?application_id=${assertSecret(
|
||||
process.env.PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
import.meta.env.PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
)}&redirect_uri=${encodeURIComponent(
|
||||
`${location.origin}/auth/wargaming?return=${location.origin}${location.pathname}`,
|
||||
)}`
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
import { Flex, Theme } from '@radix-ui/themes';
|
||||
import '@radix-ui/themes/styles.css';
|
||||
import Footer from '../components/Footer.astro';
|
||||
import Navbar from '../components/Navbar.astro';
|
||||
import Party3 from '../components/Party3.astro';
|
||||
@@ -9,7 +8,9 @@ const { pathname } = Astro.url;
|
||||
const isRoot = pathname === '/';
|
||||
---
|
||||
|
||||
<style>
|
||||
<style is:global>
|
||||
@import '@radix-ui/themes/styles.css';
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Button, Popover } from '@radix-ui/themes';
|
||||
|
||||
export function TestComponent() {
|
||||
return (
|
||||
<Popover.Root>
|
||||
<Popover.Trigger>
|
||||
<Button>Radix UI</Button>
|
||||
</Popover.Trigger>
|
||||
|
||||
<Popover.Content>Content</Popover.Content>
|
||||
</Popover.Root>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
import { Theme } from '@radix-ui/themes';
|
||||
import '@radix-ui/themes/styles.css';
|
||||
import { TestComponent } from './TestComponent';
|
||||
---
|
||||
|
||||
Minimal!
|
||||
|
||||
<Theme>
|
||||
<TestComponent client:only="react" />
|
||||
</Theme>
|
||||
Reference in new issue
Block a user