mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
add: Verge Version copy button (#4164)
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
- 修复系统主题窗口颜色不一致问题
|
- 修复系统主题窗口颜色不一致问题
|
||||||
|
|
||||||
|
### ✨ 新增功能
|
||||||
|
|
||||||
|
- 增加 `Verge Version` 复制按钮
|
||||||
|
|
||||||
## v2.3.2
|
## v2.3.2
|
||||||
|
|
||||||
### 🐞 修复问题
|
### 🐞 修复问题
|
||||||
|
|||||||
@@ -61,6 +61,12 @@ const SettingVergeAdvanced = ({ onError }: Props) => {
|
|||||||
showNotice("success", t("Copy Success"), 1000);
|
showNotice("success", t("Copy Success"), 1000);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const copyVersion = useCallback(() => {
|
||||||
|
navigator.clipboard.writeText(`v${version}`).then(() => {
|
||||||
|
showNotice("success", t("Version copied to clipboard"), 1000);
|
||||||
|
});
|
||||||
|
}, [version, t]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SettingList title={t("Verge Advanced Setting")}>
|
<SettingList title={t("Verge Advanced Setting")}>
|
||||||
<ThemeViewer ref={themeRef} />
|
<ThemeViewer ref={themeRef} />
|
||||||
@@ -135,7 +141,16 @@ const SettingVergeAdvanced = ({ onError }: Props) => {
|
|||||||
}
|
}
|
||||||
></SettingItem>
|
></SettingItem>
|
||||||
|
|
||||||
<SettingItem label={t("Verge Version")}>
|
<SettingItem
|
||||||
|
label={t("Verge Version")}
|
||||||
|
extra={
|
||||||
|
<TooltipIcon
|
||||||
|
icon={ContentCopyRounded}
|
||||||
|
onClick={copyVersion}
|
||||||
|
title={t("Copy Version")}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
<Typography sx={{ py: "7px", pr: 1 }}>v{version}</Typography>
|
<Typography sx={{ py: "7px", pr: 1 }}>v{version}</Typography>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
</SettingList>
|
</SettingList>
|
||||||
|
|||||||
@@ -651,5 +651,7 @@
|
|||||||
"Please enter a valid url": "Please enter a valid url",
|
"Please enter a valid url": "Please enter a valid url",
|
||||||
"Add": "Add",
|
"Add": "Add",
|
||||||
"Development mode: Automatically includes Tauri and localhost origins": "Development mode: Automatically includes Tauri and localhost origins",
|
"Development mode: Automatically includes Tauri and localhost origins": "Development mode: Automatically includes Tauri and localhost origins",
|
||||||
"Invalid regular expression": "Invalid regular expression"
|
"Invalid regular expression": "Invalid regular expression",
|
||||||
|
"Copy Version": "Copy Version",
|
||||||
|
"Version copied to clipboard": "Version copied to clipboard"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -651,5 +651,7 @@
|
|||||||
"Please enter a valid url": "请输入有效的网址",
|
"Please enter a valid url": "请输入有效的网址",
|
||||||
"Add": "添加",
|
"Add": "添加",
|
||||||
"Development mode: Automatically includes Tauri and localhost origins": "开发模式:自动包含 Tauri 和 localhost 来源",
|
"Development mode: Automatically includes Tauri and localhost origins": "开发模式:自动包含 Tauri 和 localhost 来源",
|
||||||
"Invalid regular expression": "无效的正则表达式"
|
"Invalid regular expression": "无效的正则表达式",
|
||||||
|
"Copy Version": "复制Verge版本号",
|
||||||
|
"Version copied to clipboard": "Verge版本已复制到剪贴板"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user