mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: migrate compare
This commit is contained in:
1 parent
b90b355f8f
commit
e656b83719
6 files changed
+61
-33
No files matched your search
@@ -741,6 +741,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"website": {
|
"website": {
|
||||||
|
"redirect": "Redirecting to %s1... Didn't happen automatically? Click here.",
|
||||||
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"dev_mode": "Development mode",
|
"dev_mode": "Development mode",
|
||||||
"language": "Language"
|
"language": "Language"
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
import { literals } from '@blitzkit/i18n';
|
||||||
|
import { getStrings } from '../core/i18n/getStrings';
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
tool: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { tool } = Astro.props;
|
||||||
|
const { locale } = Astro.params;
|
||||||
|
|
||||||
|
const strings = getStrings(locale);
|
||||||
|
const url = `/${locale === undefined ? '' : `${locale}/`}${tool}`;
|
||||||
|
---
|
||||||
|
|
||||||
|
<meta http-equiv="refresh" content={`0; url=${url}`} />
|
||||||
|
<a href={url}>
|
||||||
|
{literals(strings.website.redirect, [url])}
|
||||||
|
</a>
|
||||||
+17
-17
@@ -1,26 +1,26 @@
|
|||||||
import { createDefaultSkills } from '@blitzkit/core';
|
import { createDefaultSkills } from '@blitzkit/core';
|
||||||
import { Flex, Heading, Text } from '@radix-ui/themes';
|
import { Flex, Heading, Text } from '@radix-ui/themes';
|
||||||
import { useEffect, useMemo, useState } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
import { CompareTable } from '../../../../components/Compare/CompareTable';
|
import { CompareTable } from '../../../components/Compare/CompareTable';
|
||||||
import { Controls } from '../../../../components/Compare/Controls';
|
import { Controls } from '../../../components/Compare/Controls';
|
||||||
import { DamageWarning } from '../../../../components/DamageWarning';
|
import { DamageWarning } from '../../../components/DamageWarning';
|
||||||
import { PageWrapper } from '../../../../components/PageWrapper';
|
import { PageWrapper } from '../../../components/PageWrapper';
|
||||||
import { awaitableEquipmentDefinitions } from '../../../../core/awaitables/equipmentDefinitions';
|
import { awaitableEquipmentDefinitions } from '../../../core/awaitables/equipmentDefinitions';
|
||||||
import { awaitableModelDefinitions } from '../../../../core/awaitables/modelDefinitions';
|
import { awaitableModelDefinitions } from '../../../core/awaitables/modelDefinitions';
|
||||||
import { awaitableProvisionDefinitions } from '../../../../core/awaitables/provisionDefinitions';
|
import { awaitableProvisionDefinitions } from '../../../core/awaitables/provisionDefinitions';
|
||||||
import { awaitableSkillDefinitions } from '../../../../core/awaitables/skillDefinitions';
|
import { awaitableSkillDefinitions } from '../../../core/awaitables/skillDefinitions';
|
||||||
import { awaitableTankDefinitions } from '../../../../core/awaitables/tankDefinitions';
|
import { awaitableTankDefinitions } from '../../../core/awaitables/tankDefinitions';
|
||||||
import { tankCharacteristics } from '../../../../core/blitzkit/tankCharacteristics';
|
import { tankCharacteristics } from '../../../core/blitzkit/tankCharacteristics';
|
||||||
import { tankToCompareMember } from '../../../../core/blitzkit/tankToCompareMember';
|
import { tankToCompareMember } from '../../../core/blitzkit/tankToCompareMember';
|
||||||
import {
|
import {
|
||||||
|
type LocaleAcceptorProps,
|
||||||
LocaleProvider,
|
LocaleProvider,
|
||||||
useLocale,
|
useLocale,
|
||||||
type LocaleAcceptorProps,
|
} from '../../../hooks/useLocale';
|
||||||
} from '../../../../hooks/useLocale';
|
import { App } from '../../../stores/app';
|
||||||
import { App } from '../../../../stores/app';
|
import { CompareEphemeral } from '../../../stores/compareEphemeral';
|
||||||
import { CompareEphemeral } from '../../../../stores/compareEphemeral';
|
import { ComparePersistent } from '../../../stores/comparePersistent';
|
||||||
import { ComparePersistent } from '../../../../stores/comparePersistent';
|
import { TankopediaPersistent } from '../../../stores/tankopediaPersistent';
|
||||||
import { TankopediaPersistent } from '../../../../stores/tankopediaPersistent';
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
modelDefinitions,
|
modelDefinitions,
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
import ToolOpenGraph from '../../../components/ToolOpenGraph.astro';
|
||||||
|
import { compareTool } from '../../../constants/tools';
|
||||||
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
||||||
|
import { Page } from './_index';
|
||||||
|
|
||||||
|
export { getStaticPaths } from '../index.astro';
|
||||||
|
|
||||||
|
const { locale } = Astro.params;
|
||||||
|
---
|
||||||
|
|
||||||
|
<ToolOpenGraph tool={compareTool} />
|
||||||
|
|
||||||
|
<BaseLayout noFooter>
|
||||||
|
<Page {locale} client:load />
|
||||||
|
</BaseLayout>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
import ToolRedirect from '../../../components/ToolRedirect.astro';
|
||||||
|
|
||||||
|
export { getStaticPaths } from '../index.astro';
|
||||||
|
---
|
||||||
|
|
||||||
|
<ToolRedirect tool="compare" />
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
import ToolOpenGraph from '../../../../components/ToolOpenGraph.astro';
|
|
||||||
import { compareTool } from '../../../../constants/tools';
|
|
||||||
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
|
||||||
import { Page } from './_index';
|
|
||||||
|
|
||||||
export { getStaticPaths } from '../../index.astro';
|
|
||||||
|
|
||||||
const { locale } = Astro.params;
|
|
||||||
---
|
|
||||||
|
|
||||||
<ToolOpenGraph tool={compareTool} />
|
|
||||||
|
|
||||||
<BaseLayout noFooter>
|
|
||||||
<Page {locale} client:load />
|
|
||||||
</BaseLayout>
|
|
||||||
Reference in new issue
Block a user