diff --git a/changelog.md b/changelog.md index 51e9c53..92edb82 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,23 @@ +## 1.7.3 +**注意:如安装后为英文,请在设置中反复选择几次不同语言以写入配置文件** + +### 新功能 (Feat) +- Mihomo 内核升级 v1.19.5 +- MacOS 下添加 Dock 图标动态展现方式 (#594) +- 更改默认 UA 并添加版本 +- 添加固定间隔的配置文件更新按钮 (#670) +- 使用 pkexec 替换基于密码的 sudo,提高安全性 +- 重置软件增加警告提示 + +### 修复 (Fix) +- 修复代理节点页面因为重复刷新导致的溢出问题 +- 修复由于 Mihomo 核心错误导致启动时窗口丢失 (#601) +- 修复 sub-store 临时目录 +- sub-store 迁移到用户 work 目录下 +- 更新多语言中的密码提示,从 'root' 改为 'administrator' +- 修复 defaultBypass 几乎总是 Windows 默认绕过设置 (#602) +- 修复重置防火墙时发生的错误,因为没有指定防火墙规则 (#650) + ## 1.7.2 **注意:如安装后为英文,请在设置中反复选择几次不同语言以写入配置文件** diff --git a/package.json b/package.json index 5936b15..d99663b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mihomo-party", - "version": "1.7.2", + "version": "1.7.3", "description": "Mihomo Party", "main": "./out/main/index.js", "author": "mihomo-party-org", diff --git a/src/renderer/src/components/base/base-confirm-modal.tsx b/src/renderer/src/components/base/base-confirm-modal.tsx new file mode 100644 index 0000000..592e887 --- /dev/null +++ b/src/renderer/src/components/base/base-confirm-modal.tsx @@ -0,0 +1,37 @@ +import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Button } from '@heroui/react' +import React from 'react' +import { useTranslation } from 'react-i18next' + +interface Props { + title: string + content: string + onCancel: () => void + onConfirm: () => void + isOpen: boolean +} + +const BaseConfirmModal: React.FC = (props) => { + const { t } = useTranslation() + const { title, content, onCancel, onConfirm, isOpen } = props + + return ( + + + {title} + +

{content}

+
+ + + + +
+
+ ) +} + +export default BaseConfirmModal diff --git a/src/renderer/src/components/settings/actions.tsx b/src/renderer/src/components/settings/actions.tsx index 3fa5119..b5dedf1 100644 --- a/src/renderer/src/components/settings/actions.tsx +++ b/src/renderer/src/components/settings/actions.tsx @@ -14,6 +14,7 @@ import { version } from '@renderer/utils/init' import { IoIosHelpCircle } from 'react-icons/io' import { getDriver } from '@renderer/App' import { useTranslation } from 'react-i18next' +import BaseConfirmModal from '../base/base-confirm-modal' const Actions: React.FC = () => { const { t } = useTranslation() @@ -21,6 +22,7 @@ const Actions: React.FC = () => { const [changelog, setChangelog] = useState('') const [openUpdate, setOpenUpdate] = useState(false) const [checkingUpdate, setCheckingUpdate] = useState(false) + const [showResetConfirm, setShowResetConfirm] = useState(false) return ( <> @@ -31,6 +33,18 @@ const Actions: React.FC = () => { changelog={changelog} /> )} + {showResetConfirm && ( + setShowResetConfirm(false)} + onConfirm={() => { + resetAppConfig() + setShowResetConfirm(false) + }} + /> + )} diff --git a/src/renderer/src/locales/en-US.json b/src/renderer/src/locales/en-US.json index b223760..9ed3abe 100644 --- a/src/renderer/src/locales/en-US.json +++ b/src/renderer/src/locales/en-US.json @@ -226,6 +226,8 @@ "actions.reset.title": "Reset App", "actions.reset.button": "Reset App", "actions.reset.tooltip": "Delete all configurations and restore the app to its initial state", + "actions.reset.confirm.title": "Confirm Reset", + "actions.reset.confirm.content": "Are you sure you want to reset the app and delete all configurations? Only reset the app when it is not working properly. Your all subscriptions, overrides, and scripts will be lost!", "actions.heapSnapshot.title": "Create Heap Snapshot", "actions.heapSnapshot.button": "Create Heap Snapshot", "actions.heapSnapshot.tooltip": "Create a heap snapshot of the main process for memory issue debugging", diff --git a/src/renderer/src/locales/fa-IR.json b/src/renderer/src/locales/fa-IR.json index ea71c99..4d74383 100644 --- a/src/renderer/src/locales/fa-IR.json +++ b/src/renderer/src/locales/fa-IR.json @@ -226,6 +226,8 @@ "actions.reset.title": "بازنشانی برنامه", "actions.reset.button": "بازنشانی برنامه", "actions.reset.tooltip": "حذف تمام پیکربندی‌ها و بازگرداندن برنامه به حالت اولیه", + "actions.reset.confirm.title": "تایید بازنشانی", + "actions.reset.confirm.content": "آیا از بازنشانی برنامه و حذف تمام پیکربندی‌ها مطمئن هستید؟ فقط بازنشانی برنامه زمانی که برنامه نادرست کار می‌کند، مورد استفاده قرار می‌گیرد. تمام اشتراک ها و جایگزینی‌ها و اسکریپت‌ها حذف خواهند شد!", "actions.heapSnapshot.title": "ایجاد نمای لحظه‌ای حافظه", "actions.heapSnapshot.button": "ایجاد نمای لحظه‌ای حافظه", "actions.heapSnapshot.tooltip": "ایجاد نمای لحظه‌ای از فرآیند اصلی برای اشکال‌زدایی مشکلات حافظه", diff --git a/src/renderer/src/locales/ru-RU.json b/src/renderer/src/locales/ru-RU.json index 0569463..5881255 100644 --- a/src/renderer/src/locales/ru-RU.json +++ b/src/renderer/src/locales/ru-RU.json @@ -226,6 +226,8 @@ "actions.reset.title": "Сбросить приложение", "actions.reset.button": "Сбросить приложение", "actions.reset.tooltip": "Удалить все настройки и вернуть приложение к исходному состоянию", + "actions.reset.confirm.title": "Подтвердить сброс", + "actions.reset.confirm.content": "Вы уверены, что хотите сбросить приложение и удалить все настройки? Сброс приложения следует выполнять только в том случае, если оно не работает должным образом. Ваши все подписки, переопределения и скрипты будут потеряны!", "actions.heapSnapshot.title": "Создать снимок кучи", "actions.heapSnapshot.button": "Создать снимок кучи", "actions.heapSnapshot.tooltip": "Создать снимок кучи основного процесса для отладки проблем с памятью", diff --git a/src/renderer/src/locales/zh-CN.json b/src/renderer/src/locales/zh-CN.json index 4d40806..e8363f6 100644 --- a/src/renderer/src/locales/zh-CN.json +++ b/src/renderer/src/locales/zh-CN.json @@ -226,6 +226,8 @@ "actions.reset.title": "重置软件", "actions.reset.button": "重置软件", "actions.reset.tooltip": "删除所有配置,将软件恢复初始状态", + "actions.reset.confirm.title": "确认重置", + "actions.reset.confirm.content": "您确定要重置删除所有配置,将软件恢复初始状态吗?只有软件运行不正常的时候才需重置,您的所有订阅、覆写、脚本将全部丢失!", "actions.heapSnapshot.title": "创建堆快照", "actions.heapSnapshot.button": "创建堆快照", "actions.heapSnapshot.tooltip": "创建主进程堆快照,用于排查内存问题",