From f21f4597a5e82cbb2b2f6dbb65a6cd522ba767dc Mon Sep 17 00:00:00 2001 From: zhanglun Date: Sun, 19 May 2024 18:32:53 +0800 Subject: [PATCH] fix: Separator --- src/layout/Setting/Appearance/index.tsx | 6 +-- src/layout/Setting/Content/index.tsx | 10 ++++ src/layout/Setting/General/index.tsx | 48 +++++--------------- src/layout/Setting/ImportAndExport/index.tsx | 5 +- src/layout/Setting/Panel.tsx | 5 +- 5 files changed, 29 insertions(+), 45 deletions(-) diff --git a/src/layout/Setting/Appearance/index.tsx b/src/layout/Setting/Appearance/index.tsx index b36f9fcf9..eda76d8de 100644 --- a/src/layout/Setting/Appearance/index.tsx +++ b/src/layout/Setting/Appearance/index.tsx @@ -5,7 +5,7 @@ import { useBearStore } from "@/stores"; import classNames from "classnames"; import { Accent } from "./Accent"; import { ColorScheme } from "./ColorScheme"; -import { Separator } from "@/components/ui/separator"; +import { Separator } from "@radix-ui/themes"; export const Appearance = () => { const store = useBearStore((state) => ({ @@ -32,11 +32,11 @@ export const Appearance = () => { - + - +
diff --git a/src/layout/Setting/Content/index.tsx b/src/layout/Setting/Content/index.tsx index 6837fb679..f1a3b70b0 100644 --- a/src/layout/Setting/Content/index.tsx +++ b/src/layout/Setting/Content/index.tsx @@ -3,10 +3,20 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Panel } from "../Panel"; import { Feed } from "./Feed"; import { FolderList } from "./FolderList"; +import { Callout } from "@radix-ui/themes"; +import { AlertCircleIcon } from "lucide-react"; export const FeedManager = () => { return ( + + + + + + This feature will be removed in the future, and Letura will provide a better content management feature.{" "} + + Feeds diff --git a/src/layout/Setting/General/index.tsx b/src/layout/Setting/General/index.tsx index 6657c8dd7..b36294be4 100644 --- a/src/layout/Setting/General/index.tsx +++ b/src/layout/Setting/General/index.tsx @@ -1,9 +1,6 @@ -import React, { useEffect, useState } from "react"; -import * as dataAgent from "../../../helpers/dataAgent"; import { Panel, PanelSection } from "../Panel"; import { useBearStore } from "@/stores"; -import { Separator } from "@/components/ui/separator"; -import { TextField, Select, Switch } from "@radix-ui/themes"; +import { TextField, Select, Switch, Separator } from "@radix-ui/themes"; const intervalOptions = [ { @@ -64,23 +61,6 @@ export const General = () => { userConfig: state.userConfig, updateUserConfig: state.updateUserConfig, })); - const [localProxyConfig, setLocalProxyConfig] = useState({ - protocol: "", - ip: "", - port: "", - }); - const [threads, setThreads] = useState(1); - const [updateInterval, setUpdateInterval] = useState(0); - - const handleSaveLocalProxy = (cfg: LocalProxy) => { - dataAgent - .updateProxy({ - ...cfg, - }) - .then((res) => { - console.log("%c Line:57 🥤 res", "color:#3f7cff", res); - }); - }; const handleLocalProxyChange = (key: string, val: string) => { const cfg = Object.assign( @@ -96,15 +76,6 @@ export const General = () => { }); }; - const handleUpdateIntervalChange = (val: number) => { - setUpdateInterval(val); - - store.updateUserConfig({ - ...store.userConfig, - update_interval: val, - }); - }; - return ( @@ -124,11 +95,16 @@ export const General = () => { />
- + handleUpdateIntervalChange(parseInt(v, 10))} + value={store.userConfig.update_interval?.toString()} + onValueChange={(v: string) => { + store.updateUserConfig({ + ...store.userConfig, + update_interval: parseInt(v, 10), + }); + }} > @@ -144,7 +120,7 @@ export const General = () => { - + { - +
{
- +
{
- { {title} {subTitle &&

{subTitle}

}
- +
{children}
);