Compare commits

...
10 Commits
Author SHA1 Message Date
MystiPanda c11b8519f1 Release 1.5.8 2024-03-13 14:17:06 +08:00
wonfen b9e23a0b59 Sytle: A little tweak 2024-03-13 14:09:08 +08:00
MystiPanda 75d41b6fe5 feat: Add border-radius for window on linux 2024-03-13 13:58:29 +08:00
Amnesiash 4256590735 update profile ui (#594) 2024-03-13 10:53:39 +08:00
MystiPanda 462fb05ea8 fix: Try to fix #577 again 2024-03-11 22:52:29 +08:00
MystiPanda 812dbfd836 fix: script 2024-03-11 22:10:20 +08:00
MystiPanda cfca837777 fix: typo 2024-03-11 22:05:56 +08:00
MystiPanda ac5fb1948a fix: Try to fix #577 2024-03-11 22:03:45 +08:00
MystiPanda 22d8b73625 feat: Allow open devtools 2024-03-11 20:19:21 +08:00
MystiPanda edde40c298 docs: Update Readme 2024-03-11 18:38:58 +08:00
31 changed files with 186 additions and 95 deletions
+1
View File
@@ -6,3 +6,4 @@ dist-ssr
update.json update.json
scripts/_env.sh scripts/_env.sh
.vscode .vscode
.tool-version
+1
View File
@@ -0,0 +1 @@
nodejs 21.7.1
+4 -4
View File
@@ -9,6 +9,10 @@
A Clash Meta GUI based on <a href="https://github.com/tauri-apps/tauri">Tauri</a>. A Clash Meta GUI based on <a href="https://github.com/tauri-apps/tauri">Tauri</a>.
</h3> </h3>
## Preview
![preview](./docs/preview.png)
## Install ## Install
请到发布页面下载对应的安装包:[Release page](https://github.com/clash-verge-rev/clash-verge-rev/releases)<br> 请到发布页面下载对应的安装包:[Release page](https://github.com/clash-verge-rev/clash-verge-rev/releases)<br>
@@ -43,10 +47,6 @@ Supports Windows (x64/x86), Linux (x64/arm64) and macOS 10.15+ (intel/apple).
- Built-in support [Clash.Meta(mihomo)](https://github.com/MetaCubeX/mihomo) core. - Built-in support [Clash.Meta(mihomo)](https://github.com/MetaCubeX/mihomo) core.
- System proxy setting and guard. - System proxy setting and guard.
## Preview
![preview](./docs/preview.gif)
### FAQ ### FAQ
Refer to [Doc FAQ Page](https://clash-verge-rev.github.io/faq.html) Refer to [Doc FAQ Page](https://clash-verge-rev.github.io/faq.html)
+14
View File
@@ -1,3 +1,17 @@
## v1.5.8
### Features
- 优化 UI 细节
- Linux 绘制窗口圆角
- 开放 DevTools
### Bugs Fixes
- 修复 MacOS 下开启 Tun 内核崩溃的问题
---
## v1.5.7 ## v1.5.7
### Features ### Features
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 MiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 576 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "clash-verge", "name": "clash-verge",
"version": "1.5.7", "version": "1.5.8",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"scripts": { "scripts": {
"dev": "tauri dev", "dev": "tauri dev",
+12
View File
@@ -370,6 +370,16 @@ const resolveUninstall = () =>
file: "uninstall-service.exe", file: "uninstall-service.exe",
downloadURL: `${SERVICE_URL}/uninstall-service.exe`, downloadURL: `${SERVICE_URL}/uninstall-service.exe`,
}); });
const resolveSetDnsScript = () =>
resolveResource({
file: "set_dns.sh",
downloadURL: `https://github.com/clash-verge-rev/set-dns-script/releases/download/script/set_dns.sh`,
});
const resolveUnSetDnsScript = () =>
resolveResource({
file: "unset_dns.sh",
downloadURL: `https://github.com/clash-verge-rev/set-dns-script/releases/download/script/unset_dns.sh`,
});
const resolveMmdb = () => const resolveMmdb = () =>
resolveResource({ resolveResource({
file: "Country.mmdb", file: "Country.mmdb",
@@ -409,6 +419,8 @@ const tasks = [
{ name: "service", func: resolveService, retry: 5, winOnly: true }, { name: "service", func: resolveService, retry: 5, winOnly: true },
{ name: "install", func: resolveInstall, retry: 5, winOnly: true }, { name: "install", func: resolveInstall, retry: 5, winOnly: true },
{ name: "uninstall", func: resolveUninstall, retry: 5, winOnly: true }, { name: "uninstall", func: resolveUninstall, retry: 5, winOnly: true },
{ name: "set_dns_script", func: resolveSetDnsScript, retry: 5 },
{ name: "unset_dns_script", func: resolveUnSetDnsScript, retry: 5 },
{ name: "mmdb", func: resolveMmdb, retry: 5 }, { name: "mmdb", func: resolveMmdb, retry: 5 },
{ name: "geosite", func: resolveGeosite, retry: 5 }, { name: "geosite", func: resolveGeosite, retry: 5 },
{ name: "geoip", func: resolveGeoIP, retry: 5 }, { name: "geoip", func: resolveGeoIP, retry: 5 },
+1 -1
View File
@@ -598,7 +598,7 @@ dependencies = [
[[package]] [[package]]
name = "clash-verge" name = "clash-verge"
version = "1.5.7" version = "1.5.8"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"auto-launch", "auto-launch",
+2 -2
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "clash-verge" name = "clash-verge"
version = "1.5.7" version = "1.5.8"
description = "clash verge" description = "clash verge"
authors = ["zzzgydi", "wonfen", "MystiPanda"] authors = ["zzzgydi", "wonfen", "MystiPanda"]
license = "GPL-3.0-only" license = "GPL-3.0-only"
@@ -39,7 +39,7 @@ serde = { version = "1.0", features = ["derive"] }
reqwest = { version = "0.11", features = ["json", "rustls-tls"] } reqwest = { version = "0.11", features = ["json", "rustls-tls"] }
sysproxy = { git="https://github.com/zzzgydi/sysproxy-rs", branch = "main" } sysproxy = { git="https://github.com/zzzgydi/sysproxy-rs", branch = "main" }
auto-launch = { git="https://github.com/zzzgydi/auto-launch", branch = "main" } auto-launch = { git="https://github.com/zzzgydi/auto-launch", branch = "main" }
tauri = { version = "1.5", features = [ "path-all", "protocol-asset", "dialog-open", "notification-all", "icon-png", "clipboard-all", "global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all"] } tauri = { version = "1.5", features = [ "path-all", "protocol-asset", "dialog-open", "notification-all", "icon-png", "clipboard-all", "global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all", "devtools"] }
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
runas = "=1.0.0" # 高版本会返回错误 Status runas = "=1.0.0" # 高版本会返回错误 Status
+12 -1
View File
@@ -9,7 +9,7 @@ use anyhow::{Context, Result};
use serde_yaml::Mapping; use serde_yaml::Mapping;
use std::collections::{HashMap, VecDeque}; use std::collections::{HashMap, VecDeque};
use sysproxy::Sysproxy; use sysproxy::Sysproxy;
use tauri::api; use tauri::{api, Manager};
type CmdResult<T = ()> = Result<T, String>; type CmdResult<T = ()> = Result<T, String>;
#[tauri::command] #[tauri::command]
@@ -294,6 +294,17 @@ pub fn copy_icon_file(path: String, name: String) -> CmdResult<String> {
} }
} }
#[tauri::command]
pub fn open_devtools(app_handle: tauri::AppHandle) {
if let Some(window) = app_handle.get_window("main") {
if !window.is_devtools_open() {
window.open_devtools();
} else {
window.close_devtools();
}
}
}
#[tauri::command] #[tauri::command]
pub fn exit_app(app_handle: tauri::AppHandle) { pub fn exit_app(app_handle: tauri::AppHandle) {
let _ = resolve::save_window_size_position(&app_handle, true); let _ = resolve::save_window_size_position(&app_handle, true);
-32
View File
@@ -105,22 +105,6 @@ impl CoreManager {
sleep(Duration::from_millis(500)).await; sleep(Duration::from_millis(500)).await;
} }
#[cfg(target_os = "macos")]
{
let enable_tun = Config::verge().latest().enable_tun_mode.clone();
let enable_tun = enable_tun.unwrap_or(false);
log::debug!(target: "app", "try to set system dns");
if enable_tun {
let script = include_str!("./script/set_dns.sh");
match (|| async { Command::new("bash").args([script]).output() })().await {
Ok(_) => return Ok(()),
Err(err) => {
log::error!(target: "app", "{err}");
}
}
}
}
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
{ {
use super::win_service; use super::win_service;
@@ -263,22 +247,6 @@ impl CoreManager {
return Ok(()); return Ok(());
} }
#[cfg(target_os = "macos")]
{
let enable_tun = Config::verge().latest().enable_tun_mode.clone();
let enable_tun = enable_tun.unwrap_or(false);
log::debug!(target: "app", "try to unset system dns");
if enable_tun {
let script = include_str!("./script/unset_dns.sh");
match (|| Command::new("bash").args([script]).output())() {
Ok(_) => return Ok(()),
Err(err) => {
log::error!(target: "app", "{err}");
}
}
}
}
let mut sidecar = self.sidecar.lock(); let mut sidecar = self.sidecar.lock();
if let Some(child) = sidecar.take() { if let Some(child) = sidecar.take() {
log::debug!(target: "app", "stop the core by sidecar"); log::debug!(target: "app", "stop the core by sidecar");
-5
View File
@@ -1,5 +0,0 @@
nic=$(route -n get default | grep "interface" | awk '{print $2}')
hardware_port=$(networksetup -listallhardwareports | awk -v dev="$nic" '/Hardware Port/{port=$3} /Device:/{if ($2 == dev) {print port; exit}}')
networksetup -setdnsservers $hardware_port 223.5.5.5
-5
View File
@@ -1,5 +0,0 @@
nic=$(route -n get default | grep "interface" | awk '{print $2}')
hardware_port=$(networksetup -listallhardwareports | awk -v dev="$nic" '/Hardware Port/{port=$3} /Device:/{if ($2 == dev) {print port; exit}}')
networksetup -setdnsservers $hardware_port Empty
+30
View File
@@ -34,8 +34,38 @@ pub fn use_tun(mut config: Mapping, enable: bool) -> Mapping {
revise!(config, "tun", tun_val); revise!(config, "tun", tun_val);
if enable { if enable {
#[cfg(target_os = "macos")]
{
use crate::utils::dirs;
use tauri::api::process::Command;
log::info!(target: "app", "try to set system dns");
let resource_dir = dirs::app_resources_dir().unwrap();
let script = resource_dir.join("set_dns.sh");
let script = script.to_string_lossy();
match Command::new("bash").args([script]).output() {
Ok(_) => log::info!(target: "app", "set system dns successfully"),
Err(err) => {
log::error!(target: "app", "set system dns failed: {err}");
}
}
}
use_dns_for_tun(config) use_dns_for_tun(config)
} else { } else {
#[cfg(target_os = "macos")]
{
use crate::utils::dirs;
use tauri::api::process::Command;
log::info!(target: "app", "try to unset system dns");
let resource_dir = dirs::app_resources_dir().unwrap();
let script = resource_dir.join("unset_dns.sh");
let script = script.to_string_lossy();
match Command::new("bash").args([script]).output() {
Ok(_) => log::info!(target: "app", "unset system dns successfully"),
Err(err) => {
log::error!(target: "app", "unset system dns failed: {err}");
}
}
}
config config
} }
} }
+1
View File
@@ -57,6 +57,7 @@ fn main() -> std::io::Result<()> {
cmds::test_delay, cmds::test_delay,
cmds::get_app_dir, cmds::get_app_dir,
cmds::copy_icon_file, cmds::copy_icon_file,
cmds::open_devtools,
cmds::exit_app, cmds::exit_app,
// cmds::update_hotkeys, // cmds::update_hotkeys,
// profile // profile
+1 -1
View File
@@ -171,7 +171,7 @@ pub fn create_window(app_handle: &AppHandle) {
.title_bar_style(tauri::TitleBarStyle::Overlay) .title_bar_style(tauri::TitleBarStyle::Overlay)
.build(); .build();
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
let window = builder.decorations(true).transparent(false).build(); let window = builder.decorations(false).transparent(true).build();
match window { match window {
Ok(win) => { Ok(win) => {
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"package": { "package": {
"productName": "Clash Verge", "productName": "Clash Verge",
"version": "1.5.7" "version": "1.5.8"
}, },
"build": { "build": {
"distDir": "../dist", "distDir": "../dist",
+5 -5
View File
@@ -47,11 +47,11 @@ body {
@import "./page.scss"; @import "./page.scss";
@import "./font.scss"; @import "./font.scss";
@media (prefers-color-scheme: dark) { // @media (prefers-color-scheme: dark) {
:root { // :root {
background-color: rgba(18, 18, 18, 1); // background-color: rgba(18, 18, 18, 1);
} // }
} // }
.user-none { .user-none {
user-select: none; user-select: none;
+2 -2
View File
@@ -37,7 +37,7 @@
justify-content: center; justify-content: center;
align-items: flex-start; align-items: flex-start;
align-self: stretch; align-self: stretch;
border-bottom: 1px solid var(--divider-color); // border-bottom: 1px solid var(--divider-color);
// max-width: $maxLogo + 32px; // max-width: $maxLogo + 32px;
// max-height: $maxLogo; // max-height: $maxLogo;
// margin: 0 auto; // margin: 0 auto;
@@ -94,7 +94,7 @@
// position: absolute; // position: absolute;
// top: 0px; // top: 0px;
// right: 0px; // right: 0px;
height: 24px; height: 36px;
display: flex; display: flex;
// align-items: center; // align-items: center;
justify-content: end; justify-content: end;
+7 -2
View File
@@ -243,6 +243,7 @@ export const ProfileItem = (props: Props) => {
<Typography <Typography
width="calc(100% - 36px)" width="calc(100% - 36px)"
sx={{ fontSize: "18px", fontWeight: "600", lineHeight: "26px" }}
variant="h6" variant="h6"
component="h2" component="h2"
noWrap noWrap
@@ -279,7 +280,11 @@ export const ProfileItem = (props: Props) => {
{ {
<> <>
{description ? ( {description ? (
<Typography noWrap title={description}> <Typography
noWrap
title={description}
sx={{ fontSize: "14px" }}
>
{description} {description}
</Typography> </Typography>
) : ( ) : (
@@ -312,7 +317,7 @@ export const ProfileItem = (props: Props) => {
<span title="Expire Time">{expire}</span> <span title="Expire Time">{expire}</span>
</Box> </Box>
) : ( ) : (
<Box sx={{ ...boxStyle, fontSize: 14, justifyContent: "flex-end" }}> <Box sx={{ ...boxStyle, fontSize: 12, justifyContent: "flex-end" }}>
<span title="Updated Time">{parseExpire(updated)}</span> <span title="Updated Time">{parseExpire(updated)}</span>
</Box> </Box>
)} )}
+19 -1
View File
@@ -10,7 +10,13 @@ import {
Input, Input,
Typography, Typography,
} from "@mui/material"; } from "@mui/material";
import { exitApp, openAppDir, openCoreDir, openLogsDir } from "@/services/cmds"; import {
exitApp,
openAppDir,
openCoreDir,
openLogsDir,
openDevTools,
} from "@/services/cmds";
import { ArrowForward } from "@mui/icons-material"; import { ArrowForward } from "@mui/icons-material";
import { checkUpdate } from "@tauri-apps/api/updater"; import { checkUpdate } from "@tauri-apps/api/updater";
import { useVerge } from "@/hooks/use-verge"; import { useVerge } from "@/hooks/use-verge";
@@ -27,6 +33,7 @@ import { LayoutViewer } from "./mods/layout-viewer";
import { UpdateViewer } from "./mods/update-viewer"; import { UpdateViewer } from "./mods/update-viewer";
import getSystem from "@/utils/get-system"; import getSystem from "@/utils/get-system";
import { routers } from "@/pages/_routers"; import { routers } from "@/pages/_routers";
import { appWindow } from "@tauri-apps/api/window";
interface Props { interface Props {
onError?: (err: Error) => void; onError?: (err: Error) => void;
} }
@@ -304,6 +311,17 @@ const SettingVerge = ({ onError }: Props) => {
</IconButton> </IconButton>
</SettingItem> </SettingItem>
<SettingItem label={t("Open Dev Tools")}>
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={openDevTools}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Exit")}> <SettingItem label={t("Exit")}>
<IconButton <IconButton
color="inherit" color="inherit"
+1
View File
@@ -123,6 +123,7 @@
"Open Core Dir": "内核目录", "Open Core Dir": "内核目录",
"Open Logs Dir": "日志目录", "Open Logs Dir": "日志目录",
"Check for Updates": "检查更新", "Check for Updates": "检查更新",
"Open Dev Tools": "打开开发者工具",
"Verge Version": "Verge 版本", "Verge Version": "Verge 版本",
"theme.light": "浅色", "theme.light": "浅色",
"theme.dark": "深色", "theme.dark": "深色",
+11 -3
View File
@@ -122,6 +122,14 @@ const Layout = () => {
({ palette }) => ({ ({ palette }) => ({
bgcolor: palette.background.paper, bgcolor: palette.background.paper,
}), }),
OS === "linux"
? {
borderRadius: "8px",
border: "2px solid var(--divider-color)",
width: "calc(100vw - 4px)",
height: "calc(100vh - 4px)",
}
: {},
]} ]}
> >
<div className="layout__left" data-tauri-drag-region="true"> <div className="layout__left" data-tauri-drag-region="true">
@@ -148,11 +156,11 @@ const Layout = () => {
</div> </div>
<div className="layout__right"> <div className="layout__right">
{OS === "windows" && ( {
<div className="the-bar" data-tauri-drag-region="true"> <div className="the-bar" data-tauri-drag-region="true">
<LayoutControl /> {OS !== "macos" && <LayoutControl />}
</div> </div>
)} }
<TransitionGroup className="the-content"> <TransitionGroup className="the-content">
<CSSTransition <CSSTransition
+1 -1
View File
@@ -4,7 +4,7 @@ const OS = getSystem();
// default theme setting // default theme setting
export const defaultTheme = { export const defaultTheme = {
primary_color: "#007AFF", primary_color: "#007AFF",
secondary_color: "#FFCC00", secondary_color: "#fc9b76",
primary_text: "#000000", primary_text: "#000000",
secondary_text: "#3c3c4399", secondary_text: "#3c3c4399",
info_color: "#007AFF", info_color: "#007AFF",
+2 -2
View File
@@ -200,10 +200,10 @@ const ConnectionsPage = () => {
</Box> </Box>
<Box <Box
height="calc(100% - 70px)" height="calc(100% - 65px)"
sx={{ sx={{
userSelect: "text", userSelect: "text",
margin: "12px", margin: "10px",
borderRadius: "8px", borderRadius: "8px",
bgcolor: isDark ? "#282a36" : "#ffffff", bgcolor: isDark ? "#282a36" : "#ffffff",
}} }}
+2 -2
View File
@@ -110,9 +110,9 @@ const LogPage = () => {
</Box> </Box>
<Box <Box
height="calc(100% - 70px)" height="calc(100% - 65px)"
sx={{ sx={{
margin: "12px", margin: "10px",
borderRadius: "8px", borderRadius: "8px",
bgcolor: isDark ? "#282a36" : "#ffffff", bgcolor: isDark ? "#282a36" : "#ffffff",
}} }}
+48 -21
View File
@@ -2,7 +2,15 @@ import useSWR, { mutate } from "swr";
import { useMemo, useRef, useState } from "react"; import { useMemo, useRef, useState } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { useSetRecoilState } from "recoil"; import { useSetRecoilState } from "recoil";
import { Box, Button, Grid, IconButton, Stack, TextField } from "@mui/material"; import {
Box,
Button,
Grid,
IconButton,
Stack,
TextField,
Divider,
} from "@mui/material";
import { import {
DndContext, DndContext,
closestCenter, closestCenter,
@@ -46,6 +54,8 @@ import { ProfileMore } from "@/components/profile/profile-more";
import { useProfiles } from "@/hooks/use-profiles"; import { useProfiles } from "@/hooks/use-profiles";
import { ConfigViewer } from "@/components/setting/mods/config-viewer"; import { ConfigViewer } from "@/components/setting/mods/config-viewer";
import { throttle } from "lodash-es"; import { throttle } from "lodash-es";
import { useRecoilState } from "recoil";
import { atomThemeMode } from "@/services/states";
const ProfilePage = () => { const ProfilePage = () => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -235,6 +245,11 @@ const ProfilePage = () => {
const text = await navigator.clipboard.readText(); const text = await navigator.clipboard.readText();
if (text) setUrl(text); if (text) setUrl(text);
}; };
const [mode] = useRecoilState(atomThemeMode);
const islight = mode === "light" ? true : false;
const dividercolor = islight
? "rgba(0, 0, 0, 0.06)"
: "rgba(255, 255, 255, 0.06)";
return ( return (
<BasePage <BasePage
@@ -323,6 +338,7 @@ const ProfilePage = () => {
loading={loading} loading={loading}
variant="contained" variant="contained"
size="small" size="small"
sx={{ borderRadius: "6px" }}
onClick={onImport} onClick={onImport}
> >
{t("Import")} {t("Import")}
@@ -330,6 +346,7 @@ const ProfilePage = () => {
<Button <Button
variant="contained" variant="contained"
size="small" size="small"
sx={{ borderRadius: "6px" }}
onClick={() => viewerRef.current?.create()} onClick={() => viewerRef.current?.create()}
> >
{t("New")} {t("New")}
@@ -341,7 +358,7 @@ const ProfilePage = () => {
mb: 0.5, mb: 0.5,
pl: "10px", pl: "10px",
mr: "10px", mr: "10px",
height: "calc(100% - 20px)", height: "calc(100% - 68px)",
overflowY: "auto", overflowY: "auto",
}} }}
> >
@@ -350,7 +367,7 @@ const ProfilePage = () => {
collisionDetection={closestCenter} collisionDetection={closestCenter}
onDragEnd={onDragEnd} onDragEnd={onDragEnd}
> >
<Box sx={{ mb: 4.5 }}> <Box sx={{ mb: 1.5 }}>
<Grid container spacing={{ xs: 1, lg: 1 }}> <Grid container spacing={{ xs: 1, lg: 1 }}>
<SortableContext <SortableContext
items={regularItems.map((x) => { items={regularItems.map((x) => {
@@ -375,24 +392,34 @@ const ProfilePage = () => {
</DndContext> </DndContext>
{enhanceItems.length > 0 && ( {enhanceItems.length > 0 && (
<Grid container spacing={{ xs: 2, lg: 2 }}> <Divider
{enhanceItems.map((item) => ( variant="middle"
<Grid item xs={12} sm={6} md={4} lg={3} key={item.file}> flexItem
<ProfileMore sx={{ width: `calc(100% - 32px)`, borderColor: dividercolor }}
selected={!!chain.includes(item.uid)} ></Divider>
itemData={item} )}
enableNum={chain.length || 0}
logInfo={chainLogs[item.uid]} {enhanceItems.length > 0 && (
onEnable={() => onEnable(item.uid)} <Box sx={{ mt: 1.5 }}>
onDisable={() => onDisable(item.uid)} <Grid container spacing={{ xs: 1, lg: 1 }}>
onDelete={() => onDelete(item.uid)} {enhanceItems.map((item) => (
onMoveTop={() => onMoveTop(item.uid)} <Grid item xs={12} sm={6} md={4} lg={3} key={item.file}>
onMoveEnd={() => onMoveEnd(item.uid)} <ProfileMore
onEdit={() => viewerRef.current?.edit(item)} selected={!!chain.includes(item.uid)}
/> itemData={item}
</Grid> enableNum={chain.length || 0}
))} logInfo={chainLogs[item.uid]}
</Grid> onEnable={() => onEnable(item.uid)}
onDisable={() => onDisable(item.uid)}
onDelete={() => onDelete(item.uid)}
onMoveTop={() => onMoveTop(item.uid)}
onMoveEnd={() => onMoveEnd(item.uid)}
onEdit={() => viewerRef.current?.edit(item)}
/>
</Grid>
))}
</Grid>
</Box>
)} )}
</Box> </Box>
<ProfileViewer ref={viewerRef} onChange={() => mutateProfiles()} /> <ProfileViewer ref={viewerRef} onChange={() => mutateProfiles()} />
+2 -2
View File
@@ -56,9 +56,9 @@ const RulesPage = () => {
</Box> </Box>
<Box <Box
height="calc(100% - 70px)" height="calc(100% - 65px)"
sx={{ sx={{
margin: "12px", margin: "10px",
borderRadius: "8px", borderRadius: "8px",
bgcolor: isDark ? "#282a36" : "#ffffff", bgcolor: isDark ? "#282a36" : "#ffffff",
}} }}
+1 -1
View File
@@ -134,7 +134,7 @@ const TestPage = () => {
> >
<Box <Box
sx={{ sx={{
pt: 1, pt: 1.25,
mb: 0.5, mb: 0.5,
px: "10px", px: "10px",
}} }}
+4
View File
@@ -213,6 +213,10 @@ export async function getPortableFlag() {
return invoke<boolean>("get_portable_flag"); return invoke<boolean>("get_portable_flag");
} }
export async function openDevTools() {
return invoke("open_devtools");
}
export async function exitApp() { export async function exitApp() {
return invoke("exit_app"); return invoke("exit_app");
} }