From 35dd016a233d9ce15405b6f7cae50a5788e146ba Mon Sep 17 00:00:00 2001 From: zty012 Date: Sat, 7 Dec 2024 11:53:55 +0800 Subject: [PATCH] :rotating_light: fix ts --- src/pages/settings/automation.tsx | 23 ++++++----------------- src/pages/welcome/index.tsx | 24 ++++++++---------------- 2 files changed, 14 insertions(+), 33 deletions(-) diff --git a/src/pages/settings/automation.tsx b/src/pages/settings/automation.tsx index fd9424f..c3947e0 100644 --- a/src/pages/settings/automation.tsx +++ b/src/pages/settings/automation.tsx @@ -1,18 +1,15 @@ import { - HardDriveDownload, - Tag, Database, - Hourglass, - HardDrive, Folder, + HardDrive, + HardDriveDownload, + Hourglass, + Tag, } from "lucide-react"; import { SettingField } from "./_field"; -import { useTranslation } from "react-i18next"; // 其实应该改成快捷操作相关 export default function AutoNamer() { - const { t } = useTranslation("settingsAutomation"); - return ( <> - } - settingKey="autoSave" - type="switch" - /> + } settingKey="autoSave" type="switch" /> } settingKey="autoSaveInterval" @@ -39,11 +32,7 @@ export default function AutoNamer() { max={60} step={1} /> - } - settingKey="autoBackup" - type="switch" - /> + } settingKey="autoBackup" type="switch" /> } settingKey="autoBackupInterval" diff --git a/src/pages/welcome/index.tsx b/src/pages/welcome/index.tsx index f8683eb..ba4c0d3 100644 --- a/src/pages/welcome/index.tsx +++ b/src/pages/welcome/index.tsx @@ -1,15 +1,14 @@ -import { ArrowRight, Globe, Languages } from "lucide-react"; -import { ButtonField, SettingField } from "../settings/_field"; -import { useNavigate } from "../../router"; import { open } from "@tauri-apps/plugin-shell"; -import Github from "../../assets/github.svg?react"; +import { ArrowRight, Globe, Languages } from "lucide-react"; +import { useTranslation } from "react-i18next"; import Bilibili from "../../assets/bilibili.svg?react"; +import Github from "../../assets/github.svg?react"; import QQ from "../../assets/qq.svg?react"; -import TauriIcon from "../../assets/tauri.svg?react"; import ReactIcon from "../../assets/react.svg?react"; +import TauriIcon from "../../assets/tauri.svg?react"; import { Camera } from "../../core/stage/Camera"; -import { useTranslation } from "react-i18next"; -import { languages } from "../settings/_languages"; +import { useNavigate } from "../../router"; +import { ButtonField, SettingField } from "../settings/_field"; export default function Welcome() { const navigate = useNavigate(); @@ -18,14 +17,7 @@ export default function Welcome() { return ( <> {/* 设置语言 */} - } - title={t("language")} - showKey={false} - settingKey="language" - type="select" - options={languages} - /> + } settingKey="language" type="select" /> {/* next按钮 */} } @@ -66,7 +58,7 @@ export default function Welcome() { } /> {/* 页脚信息 */} -
+
Made by LiRenTech with ❤️
Powered by and{" "}