refactor: rm theme blur

This commit is contained in:
MystiPanda 2024-01-15 17:13:55 +08:00
parent 98efc93610
commit 2ba7fff8d4
7 changed files with 2 additions and 25 deletions

View File

@ -19,10 +19,6 @@ pub struct IVerge {
/// `light` or `dark` or `system`
pub theme_mode: Option<String>,
/// enable blur mode
/// maybe be able to set the alpha
pub theme_blur: Option<bool>,
/// tray click event
pub tray_event: Option<String>,
@ -140,7 +136,6 @@ impl IVerge {
env_type: Some("bash".into()),
#[cfg(target_os = "windows")]
env_type: Some("powershell".into()),
theme_blur: Some(false),
traffic_graph: Some(true),
enable_memory_usage: Some(true),
enable_auto_launch: Some(false),
@ -177,7 +172,6 @@ impl IVerge {
patch!(app_log_level);
patch!(language);
patch!(theme_mode);
patch!(theme_blur);
patch!(tray_event);
patch!(env_type);
patch!(traffic_graph);

View File

@ -36,19 +36,6 @@ export const LayoutViewer = forwardRef<DialogRef>((props, ref) => {
onCancel={() => setOpen(false)}
>
<List>
<SettingItem label={t("Theme Blur")}>
<GuardState
value={verge?.theme_blur ?? false}
valueProps="checked"
onCatch={onError}
onFormat={onSwitchFormat}
onChange={(e) => onChangeData({ theme_blur: e })}
onGuard={(e) => patchVerge({ theme_blur: e })}
>
<Switch edge="end" />
</GuardState>
</SettingItem>
<SettingItem label={t("Traffic Graph")}>
<GuardState
value={verge?.traffic_graph ?? true}

View File

@ -89,7 +89,6 @@
"Bypass": "Bypass",
"Current System Proxy": "Current System Proxy",
"Theme Mode": "Theme Mode",
"Theme Blur": "Theme Blur",
"Tray Click Event": "Tray Click Event",
"Copy Env Type": "Copy Env Type",
"Show Main Window": "Show Main Window",

View File

@ -80,7 +80,6 @@
"Proxy Bypass": "Игнорирование прокси",
"Current System Proxy": "Текущий системный прокси",
"Theme Mode": "Режим темы",
"Theme Blur": "Размытие темы",
"Tray Click Event": "Событие щелчка в лотке",
"Copy Env Type": "Скопировать тип Env",
"Show Main Window": "Показать главное окно",

View File

@ -89,7 +89,6 @@
"Server Addr": "服务地址:",
"Bypass": "当前绕过:",
"Theme Mode": "主题模式",
"Theme Blur": "背景模糊",
"Tray Click Event": "托盘点击事件",
"Copy Env Type": "复制环境变量类型",
"Show Main Window": "显示主窗口",

View File

@ -36,7 +36,7 @@ const Layout = () => {
const { theme } = useCustomTheme();
const { verge } = useVerge();
const { theme_blur, language } = verge || {};
const { language } = verge || {};
const location = useLocation();
@ -116,7 +116,7 @@ const Layout = () => {
}}
sx={[
({ palette }) => ({
bgcolor: alpha(palette.background.paper, theme_blur ? 0.8 : 1),
bgcolor: palette.background.paper,
}),
]}
>

View File

@ -161,7 +161,6 @@ interface IVergeConfig {
env_type?: "bash" | "cmd" | "powershell" | string;
clash_core?: string;
theme_mode?: "light" | "dark" | "system";
theme_blur?: boolean;
traffic_graph?: boolean;
enable_memory_usage?: boolean;
enable_tun_mode?: boolean;