mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix linting errors
This commit is contained in:
1 parent
af58b4614d
commit
b8742bae66
19 files changed
+36
-39
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { Switch } from "@radix-ui/themes";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState } from "../../stores/embedState";
|
||||
|
||||
export function Boolean({ configKey }: EmbedPreviewControllerProps) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState } from "../../stores/embedState";
|
||||
import { ColorControllerRaw } from "./ColorControllerRaw";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Select } from "@radix-ui/themes";
|
||||
import { useLocale } from "../../hooks/useLocale";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState } from "../../stores/embedState";
|
||||
import type {
|
||||
EmbedConfigItemType,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Slider } from "@radix-ui/themes";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState, type RadixRadius } from "../../stores/embedState";
|
||||
|
||||
export function Radius({ configKey }: EmbedPreviewControllerProps) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FontBoldIcon, FontSizeIcon } from "@radix-ui/react-icons";
|
||||
import { Flex, Slider, Text } from "@radix-ui/themes";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState, type RadixSizeWithout0 } from "../../stores/embedState";
|
||||
import {
|
||||
radixTextWeights,
|
||||
@@ -12,7 +12,9 @@ import { ColorControllerRaw } from "./ColorControllerRaw";
|
||||
export function RichText({ configKey }: EmbedPreviewControllerProps) {
|
||||
const state = EmbedState.use(
|
||||
(state) =>
|
||||
state[configKey] as EmbedConfigItemType<EmbedItemType.RichText>["default"]
|
||||
state[
|
||||
configKey
|
||||
] as EmbedConfigItemType<EmbedItemType.RichText>["default"],
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Slider } from "@radix-ui/themes";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState, type RadixSize } from "../../stores/embedState";
|
||||
|
||||
export function Size({ configKey }: EmbedPreviewControllerProps) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Slider } from "@radix-ui/themes";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState, type RadixSizeWithout0 } from "../../stores/embedState";
|
||||
|
||||
export function SizeWithout0({ configKey }: EmbedPreviewControllerProps) {
|
||||
@@ -10,7 +10,7 @@ export function SizeWithout0({ configKey }: EmbedPreviewControllerProps) {
|
||||
max={9}
|
||||
value={[
|
||||
EmbedState.use((state) =>
|
||||
parseInt(state[configKey] as RadixSizeWithout0)
|
||||
parseInt(state[configKey] as RadixSizeWithout0),
|
||||
),
|
||||
]}
|
||||
onValueChange={([value]) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Slider as RadixSlider } from "@radix-ui/themes";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState, type RadixSize } from "../../stores/embedState";
|
||||
import type {
|
||||
EmbedConfigItemType,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TextField } from "@radix-ui/themes";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...locale]/embed/[embed]/_index";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState } from "../../stores/embedState";
|
||||
|
||||
export function TextController({ configKey }: EmbedPreviewControllerProps) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { literals } from "@blitzkit/i18n/src/literals";
|
||||
import { EyeOpenIcon } from "@radix-ui/react-icons";
|
||||
import { Box, Flex, Heading, Text } from "@radix-ui/themes";
|
||||
import { awaitablePopularTanks } from "../core/awaitables/popularTanks";
|
||||
import { awaitableTankDefinitions } from "../core/awaitables/tankDefinitions";
|
||||
import { api } from "../core/blitzkit/api";
|
||||
import {
|
||||
LocaleProvider,
|
||||
useLocale,
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
import { TankCard } from "./TankCard";
|
||||
|
||||
const [tankDefinitions, popularTanks] = await Promise.all([
|
||||
awaitableTankDefinitions,
|
||||
api.tankDefinitions(),
|
||||
awaitablePopularTanks,
|
||||
]);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { asset } from '@blitzkit/core';
|
||||
import { GenericTankComponentButton } from './GenericTankComponentButton';
|
||||
import type { TankComponentButtonProps } from './TankComponentButton';
|
||||
import { GenericTankComponentButton } from "./GenericTankComponentButton";
|
||||
import type { TankComponentButtonProps } from "./TankComponentButton";
|
||||
|
||||
interface ShellButtonProps extends TankComponentButtonProps {
|
||||
shell: string;
|
||||
@@ -9,7 +8,7 @@ interface ShellButtonProps extends TankComponentButtonProps {
|
||||
export function ShellButton({ shell, ...props }: ShellButtonProps) {
|
||||
return (
|
||||
<GenericTankComponentButton
|
||||
icon={asset(`icons/shells/${shell}.webp`)}
|
||||
icon={`/api/icons/shells/${shell}.webp`}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
import { asset } from "@blitzkit/core";
|
||||
import { Flex, type FlexProps, Progress } from "@radix-ui/themes";
|
||||
import { useProgress } from "@react-three/drei";
|
||||
|
||||
@@ -12,7 +11,7 @@ export function TankSandboxLoader({ id, ...props }: TankSandboxLoaderProps) {
|
||||
return (
|
||||
<Flex width="100%" height="100%" align="center" justify="center" {...props}>
|
||||
<img
|
||||
src={asset(`icons/tanks/big/${id}.webp`)}
|
||||
src={`/api/tanks/${id}/icons/big.webp`}
|
||||
style={{ height: "75%", filter: "blur(1rem)" }}
|
||||
/>
|
||||
<Progress
|
||||
|
||||
Reference in new issue
Block a user