fix: logsin

This commit is contained in:
TrèsAbhi committed 2024-09-15 16:20:11 -05:00
1 parent 8670e5f9a7
commit 85491c7f22
16 files changed
+47 -38

No files matched your search

@@ -1,9 +1,9 @@
import { SupplementaryStats } from '../blitz/getAccountInfo'; import { blitzStarsTankAverages } from './tankAverages';
import { tankDefinitions, TreeType } from '../blitzkit/tankDefinitions'; import { SupplementaryStats } from '@blitzkit/core/src/blitz/getAccountInfo';
import { blitzStarsTankAverages } from '../blitzstars/tankAverages'; import { tankDefinitions, TreeType } from '@blitzkit/core/src/blitzkit/tankDefinitions';
import { calculateWN8 } from './calculateWN8'; import { calculateWN8 } from '@blitzkit/core/src/statistics/calculateWN8';
import { BlitzStats } from './compositeStats'; import { BlitzStats } from '@blitzkit/core/src/statistics/compositeStats';
import { sumAllStats } from './sumAllStats'; import { sumAllStats } from '@blitzkit/core/src/statistics/sumAllStats';
export interface StatFilters { export interface StatFilters {
nation?: string; nation?: string;
@@ -1,5 +1,5 @@
import { BlitzStats, tankDefinitions } from '@blitzkit/core'; import { BlitzStats } from '@blitzkit/core';
import { context } from '../blitzkit/context'; import { context } from '@blitzkit/core/src/blitzkit/context';
interface SpecialStats { interface SpecialStats {
winrate: number; winrate: number;
@@ -79,14 +79,10 @@ export interface IndividualTankAverage {
last_update: number; last_update: number;
} }
tankDefinitions;
export type BlitzStarsTankAverages = Record<number, IndividualTankAverage>; export type BlitzStarsTankAverages = Record<number, IndividualTankAverage>;
export const blitzStarsTankAverages = fetch( export const blitzStarsTankAverages = fetch(
context === 'website' 'https://www.blitzstars.com/api/tankaverages.json',
? '/api/tank-averages'
: 'https://www.blitzstars.com/api/tankaverages.json',
) )
.then((response) => response.json()) .then((response) => response.json())
.then((json) => { .then((json) => {
+1 -1
View File
@@ -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 { export function canSplash(type: ShellDefinition['type']): type is ShellType.HE {
return type === ShellType.HE; return type === ShellType.HE;
+2 -2
View File
@@ -2,6 +2,6 @@ import { assertSecret } from './assertSecret';
export function asset(path: string) { export function asset(path: string) {
return `https://raw.githubusercontent.com/${assertSecret( return `https://raw.githubusercontent.com/${assertSecret(
process.env.PUBLIC_ASSET_REPO, import.meta.env.PUBLIC_ASSET_REPO,
)}/${assertSecret(process.env.PUBLIC_ASSET_BRANCH)}/${path}`; )}/${assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH)}/${path}`;
} }
+1 -1
View File
@@ -38,7 +38,7 @@ export * from './gameDefinitions';
// export * from './sum'; // export * from './sum';
export * from './superCompress'; export * from './superCompress';
export * from './superDecompress'; export * from './superDecompress';
// export * from './tankDefinitions'; export * from './tankDefinitions';
// export * from './tankIcon'; // export * from './tankIcon';
// export * from './tankNames'; // export * from './tankNames';
// export * from './unionBoundingBox'; // export * from './unionBoundingBox';
+1 -1
View File
@@ -1,4 +1,4 @@
import { context } from '@blitzkit/core'; import { context } from './context';
export function withCORSProxy(url: string) { export function withCORSProxy(url: string) {
return context === 'website' return context === 'website'
-1
View File
@@ -1 +0,0 @@
export * from './tankAverages';
+1 -1
View File
@@ -6,6 +6,6 @@ export * from './imgur';
// export * from './math'; // export * from './math';
export * from './patreon'; export * from './patreon';
// export * from './protobuf'; // export * from './protobuf';
// export * from './statistics'; export * from './statistics';
// export * from './streams'; // export * from './streams';
// export * from './types'; // export * from './types';
+2 -2
View File
@@ -3,8 +3,8 @@ import { assertSecret } from '../blitzkit/assertSecret';
export function patreonLoginUrl() { export function patreonLoginUrl() {
const params = new URLSearchParams({ const params = new URLSearchParams({
response_type: 'code', response_type: 'code',
client_id: assertSecret(process.env.PUBLIC_PATREON_CLIENT_ID), client_id: assertSecret(import.meta.env.PUBLIC_PATREON_CLIENT_ID),
redirect_uri: assertSecret(process.env.PUBLIC_PATREON_REDIRECT_URI), redirect_uri: assertSecret(import.meta.env.PUBLIC_PATREON_REDIRECT_URI),
scope: 'identity', scope: 'identity',
}); });
-1
View File
@@ -2,7 +2,6 @@ export * from './calculateWN8';
export * from './compositeStats'; export * from './compositeStats';
export * from './deltaBkrlBlitzStats'; export * from './deltaBkrlBlitzStats';
export * from './deltaTankStats'; export * from './deltaTankStats';
export * from './filterStats';
export * from './getBkniPercentile'; export * from './getBkniPercentile';
export * from './getTierWeights'; export * from './getTierWeights';
export * from './getWN8Percentile'; export * from './getWN8Percentile';
+1 -11
View File
@@ -7,15 +7,5 @@
} }
] ]
}, },
"include": [ "include": ["src/**/*", ".next/types/**/*.ts"]
"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"
]
} }
+1 -1
View File
@@ -198,7 +198,7 @@ const isBranchNamed =
<GearIcon /> <GearIcon />
</Link> </Link>
<NavbarAccount client:idle /> <NavbarAccount client:load />
</Flex> </Flex>
</Flex> </Flex>
</Flex> </Flex>
@@ -28,7 +28,7 @@ export function WargamingLoginButton({ children, ...props }: ButtonProps) {
href={ href={
typeof window !== 'undefined' typeof window !== 'undefined'
? `https://api.worldoftanks.${region}/wot/auth/login/?application_id=${assertSecret( ? `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( )}&redirect_uri=${encodeURIComponent(
`${location.origin}/auth/wargaming?return=${location.origin}${location.pathname}`, `${location.origin}/auth/wargaming?return=${location.origin}${location.pathname}`,
)}` )}`
@@ -1,6 +1,5 @@
--- ---
import { Flex, Theme } from '@radix-ui/themes'; import { Flex, Theme } from '@radix-ui/themes';
import '@radix-ui/themes/styles.css';
import Footer from '../components/Footer.astro'; import Footer from '../components/Footer.astro';
import Navbar from '../components/Navbar.astro'; import Navbar from '../components/Navbar.astro';
import Party3 from '../components/Party3.astro'; import Party3 from '../components/Party3.astro';
@@ -9,7 +8,9 @@ const { pathname } = Astro.url;
const isRoot = pathname === '/'; const isRoot = pathname === '/';
--- ---
<style> <style is:global>
@import '@radix-ui/themes/styles.css';
body { body {
margin: 0; 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>
);
}
+11
View File
@@ -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>