mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 04:43:44 +08:00
parent
e453b40e0b
commit
353fb49a87
@ -1,7 +1,7 @@
|
|||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { forwardRef, useImperativeHandle, useState, useMemo } from "react";
|
import { forwardRef, useImperativeHandle, useState, useMemo } from "react";
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { Box, LinearProgress } from "@mui/material";
|
import { Box, LinearProgress, Button } from "@mui/material";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { relaunch } from "@tauri-apps/api/process";
|
import { relaunch } from "@tauri-apps/api/process";
|
||||||
import { checkUpdate, installUpdate } from "@tauri-apps/api/updater";
|
import { checkUpdate, installUpdate } from "@tauri-apps/api/updater";
|
||||||
@ -9,6 +9,7 @@ import { BaseDialog, DialogRef, Notice } from "@/components/base";
|
|||||||
import { useUpdateState, useSetUpdateState } from "@/services/states";
|
import { useUpdateState, useSetUpdateState } from "@/services/states";
|
||||||
import { listen, Event, UnlistenFn } from "@tauri-apps/api/event";
|
import { listen, Event, UnlistenFn } from "@tauri-apps/api/event";
|
||||||
import { portableFlag } from "@/pages/_layout";
|
import { portableFlag } from "@/pages/_layout";
|
||||||
|
import { open as openUrl } from "@tauri-apps/api/shell";
|
||||||
import ReactMarkdown from "react-markdown";
|
import ReactMarkdown from "react-markdown";
|
||||||
|
|
||||||
let eventListener: UnlistenFn | null = null;
|
let eventListener: UnlistenFn | null = null;
|
||||||
@ -76,7 +77,24 @@ export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
return (
|
return (
|
||||||
<BaseDialog
|
<BaseDialog
|
||||||
open={open}
|
open={open}
|
||||||
title={`New Version v${updateInfo?.manifest?.version}`}
|
title={
|
||||||
|
<Box display="flex" justifyContent="space-between">
|
||||||
|
{`New Version v${updateInfo?.manifest?.version}`}
|
||||||
|
<Box>
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
openUrl(
|
||||||
|
`https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/v${updateInfo?.manifest?.version}`
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("Go to Release Page")}
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
}
|
||||||
contentSx={{ minWidth: 360, maxWidth: 400, height: "50vh" }}
|
contentSx={{ minWidth: 360, maxWidth: 400, height: "50vh" }}
|
||||||
okBtn={t("Update")}
|
okBtn={t("Update")}
|
||||||
cancelBtn={t("Cancel")}
|
cancelBtn={t("Cancel")}
|
||||||
|
@ -168,6 +168,7 @@
|
|||||||
"Runtime Config": "Runtime Config",
|
"Runtime Config": "Runtime Config",
|
||||||
"ReadOnly": "ReadOnly",
|
"ReadOnly": "ReadOnly",
|
||||||
"ReadOnlyMessage": "Cannot edit in read-only editor",
|
"ReadOnlyMessage": "Cannot edit in read-only editor",
|
||||||
|
"Go to Release Page": "Go to Release Page",
|
||||||
"Restart": "Restart",
|
"Restart": "Restart",
|
||||||
"Upgrade": "Upgrade",
|
"Upgrade": "Upgrade",
|
||||||
|
|
||||||
|
@ -163,6 +163,7 @@
|
|||||||
"Runtime Config": "پیکربندی زمان اجرا",
|
"Runtime Config": "پیکربندی زمان اجرا",
|
||||||
"ReadOnly": "فقط خواندنی",
|
"ReadOnly": "فقط خواندنی",
|
||||||
"ReadOnlyMessage": "نمیتوان در ویرایشگر فقط خواندنی ویرایش کرد",
|
"ReadOnlyMessage": "نمیتوان در ویرایشگر فقط خواندنی ویرایش کرد",
|
||||||
|
"Go to Release Page": "رفتن به صفحه انتشار",
|
||||||
"Restart": "راهاندازی مجدد",
|
"Restart": "راهاندازی مجدد",
|
||||||
"Upgrade": "ارتقاء",
|
"Upgrade": "ارتقاء",
|
||||||
|
|
||||||
|
@ -163,6 +163,7 @@
|
|||||||
"Runtime Config": "Используемый конфиг",
|
"Runtime Config": "Используемый конфиг",
|
||||||
"ReadOnly": "Только для чтения",
|
"ReadOnly": "Только для чтения",
|
||||||
"ReadOnlyMessage": "Невозможно редактировать в режиме только для чтения",
|
"ReadOnlyMessage": "Невозможно редактировать в режиме только для чтения",
|
||||||
|
"Go to Release Page": "Перейти на страницу релизов",
|
||||||
"Restart": "Перезапуск",
|
"Restart": "Перезапуск",
|
||||||
"Upgrade": "Обновлять",
|
"Upgrade": "Обновлять",
|
||||||
|
|
||||||
|
@ -168,6 +168,7 @@
|
|||||||
"Runtime Config": "当前配置",
|
"Runtime Config": "当前配置",
|
||||||
"ReadOnly": "只读",
|
"ReadOnly": "只读",
|
||||||
"ReadOnlyMessage": "无法在只读模式下编辑",
|
"ReadOnlyMessage": "无法在只读模式下编辑",
|
||||||
|
"Go to Release Page": "前往发布页",
|
||||||
"Restart": "重启内核",
|
"Restart": "重启内核",
|
||||||
"Upgrade": "升级内核",
|
"Upgrade": "升级内核",
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user