mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 03:32:36 +08:00
feat: handle break change update
Some checks are pending
Alpha Build / alpha (macos-latest, aarch64-apple-darwin) (push) Waiting to run
Alpha Build / alpha (macos-latest, x86_64-apple-darwin) (push) Waiting to run
Alpha Build / alpha (windows-latest, aarch64-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha (windows-latest, i686-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha (windows-latest, x86_64-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha-for-linux (ubuntu-latest, aarch64-unknown-linux-gnu) (push) Waiting to run
Alpha Build / alpha-for-linux (ubuntu-latest, armv7-unknown-linux-gnueabihf) (push) Waiting to run
Alpha Build / alpha-for-linux (ubuntu-latest, i686-unknown-linux-gnu) (push) Waiting to run
Alpha Build / alpha-for-linux (ubuntu-latest, x86_64-unknown-linux-gnu) (push) Waiting to run
Alpha Build / alpha-for-fixed-webview2 (arm64, windows-latest, aarch64-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha-for-fixed-webview2 (x64, windows-latest, x86_64-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha-for-fixed-webview2 (x86, windows-latest, i686-pc-windows-msvc) (push) Waiting to run
Alpha Build / Update tag (push) Blocked by required conditions
Some checks are pending
Alpha Build / alpha (macos-latest, aarch64-apple-darwin) (push) Waiting to run
Alpha Build / alpha (macos-latest, x86_64-apple-darwin) (push) Waiting to run
Alpha Build / alpha (windows-latest, aarch64-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha (windows-latest, i686-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha (windows-latest, x86_64-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha-for-linux (ubuntu-latest, aarch64-unknown-linux-gnu) (push) Waiting to run
Alpha Build / alpha-for-linux (ubuntu-latest, armv7-unknown-linux-gnueabihf) (push) Waiting to run
Alpha Build / alpha-for-linux (ubuntu-latest, i686-unknown-linux-gnu) (push) Waiting to run
Alpha Build / alpha-for-linux (ubuntu-latest, x86_64-unknown-linux-gnu) (push) Waiting to run
Alpha Build / alpha-for-fixed-webview2 (arm64, windows-latest, aarch64-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha-for-fixed-webview2 (x64, windows-latest, x86_64-pc-windows-msvc) (push) Waiting to run
Alpha Build / alpha-for-fixed-webview2 (x86, windows-latest, i686-pc-windows-msvc) (push) Waiting to run
Alpha Build / Update tag (push) Blocked by required conditions
This commit is contained in:
parent
b2589dbc04
commit
d8b878b1bb
|
@ -44,11 +44,23 @@ export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
|||
return updateInfo?.manifest?.body;
|
||||
}, [updateInfo]);
|
||||
|
||||
const breakChangeFlag = useMemo(() => {
|
||||
if (!updateInfo?.manifest?.body) {
|
||||
return false;
|
||||
}
|
||||
return updateInfo?.manifest?.body.toLowerCase().includes("break change");
|
||||
}, [updateInfo]);
|
||||
|
||||
const onUpdate = useLockFn(async () => {
|
||||
if (portableFlag) {
|
||||
Notice.error(t("Portable Updater Error"));
|
||||
return;
|
||||
}
|
||||
if (!updateInfo?.manifest?.body) return;
|
||||
if (breakChangeFlag) {
|
||||
Notice.error(t("Break Change Update Error"));
|
||||
return;
|
||||
}
|
||||
if (updateState) return;
|
||||
setUpdateState(true);
|
||||
if (eventListener !== null) {
|
||||
|
|
|
@ -230,6 +230,7 @@
|
|||
"Check for Updates": "Check for Updates",
|
||||
"Go to Release Page": "Go to Release Page",
|
||||
"Portable Updater Error": "The portable version does not support in-app updates. Please manually download and replace it",
|
||||
"Break Change Update Error": "This version is a major update and does not support in-app updates. Please uninstall it and manually download and install the new version",
|
||||
"Open Dev Tools": "Open Dev Tools",
|
||||
"Exit": "Exit",
|
||||
"Verge Version": "Verge Version",
|
||||
|
|
|
@ -230,6 +230,7 @@
|
|||
"Check for Updates": "بررسی برای بهروزرسانیها",
|
||||
"Go to Release Page": "رفتن به صفحه انتشار",
|
||||
"Portable Updater Error": "نسخه پرتابل از بهروزرسانی درون برنامهای پشتیبانی نمیکند. لطفاً به صورت دستی دانلود و جایگزین کنید",
|
||||
"Break Change Update Error": "این نسخه یک بهروزرسانی اساسی است و پشتیبانی از بهروزرسانی درون برنامه را پشتیبانی نمیکند. لطفاً پس از حذف، دستی دانلود و نصب کنید.",
|
||||
"Open Dev Tools": "باز کردن ابزارهای توسعهدهنده",
|
||||
"Exit": "خروج",
|
||||
"Verge Version": "نسخه Verge",
|
||||
|
|
|
@ -230,6 +230,7 @@
|
|||
"Check for Updates": "Проверить обновления",
|
||||
"Go to Release Page": "Перейти на страницу релизов",
|
||||
"Portable Updater Error": "Портативная версия не поддерживает обновление внутри приложения, пожалуйста, скачайте и замените вручную",
|
||||
"Break Change Update Error": "Это крупное обновление, которое не поддерживает обновление внутри приложения. Пожалуйста, удалите его и загрузите установочный файл вручную.",
|
||||
"Open Dev Tools": "Открыть инструменты разработчика",
|
||||
"Exit": "Выход",
|
||||
"Verge Version": "Версия Verge",
|
||||
|
|
|
@ -230,6 +230,7 @@
|
|||
"Check for Updates": "检查更新",
|
||||
"Go to Release Page": "前往发布页",
|
||||
"Portable Updater Error": "便携版不支持应用内更新,请手动下载替换",
|
||||
"Break Change Update Error": "此版本为重大更新,不支持应用内更新,请卸载后手动下载安装",
|
||||
"Open Dev Tools": "打开开发者工具",
|
||||
"Exit": "退出",
|
||||
"Verge Version": "Verge 版本",
|
||||
|
|
Loading…
Reference in New Issue
Block a user