mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 04:53:44 +08:00
fix: Stop core before install update
This commit is contained in:
parent
0a5ec11b1b
commit
feac8085c9
@ -105,6 +105,10 @@ fn main() -> std::io::Result<()> {
|
|||||||
api::process::kill_children();
|
api::process::kill_children();
|
||||||
app_handle.exit(0);
|
app_handle.exit(0);
|
||||||
}
|
}
|
||||||
|
tauri::RunEvent::Updater(tauri::UpdaterEvent::Downloaded) => {
|
||||||
|
resolve::resolve_reset();
|
||||||
|
api::process::kill_children();
|
||||||
|
}
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
tauri::RunEvent::WindowEvent { label, event, .. } => {
|
tauri::RunEvent::WindowEvent { label, event, .. } => {
|
||||||
use tauri::Manager;
|
use tauri::Manager;
|
||||||
|
@ -75,14 +75,17 @@ export const UpdateViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
<BaseDialog
|
<BaseDialog
|
||||||
open={open}
|
open={open}
|
||||||
title={`New Version v${updateInfo?.manifest?.version}`}
|
title={`New Version v${updateInfo?.manifest?.version}`}
|
||||||
contentSx={{ minWidth: 360, maxWidth: 400, maxHeight: "50vh" }}
|
contentSx={{ minWidth: 360, maxWidth: 400, height: "50vh" }}
|
||||||
okBtn={t("Update")}
|
okBtn={t("Update")}
|
||||||
cancelBtn={t("Cancel")}
|
cancelBtn={t("Cancel")}
|
||||||
onClose={() => setOpen(false)}
|
onClose={() => setOpen(false)}
|
||||||
onCancel={() => setOpen(false)}
|
onCancel={() => setOpen(false)}
|
||||||
onOk={onUpdate}
|
onOk={onUpdate}
|
||||||
>
|
>
|
||||||
<UpdateLog dangerouslySetInnerHTML={{ __html: parseContent }} />
|
<UpdateLog
|
||||||
|
dangerouslySetInnerHTML={{ __html: parseContent }}
|
||||||
|
sx={{ height: "calc(100% - 10px)", overflow: "auto" }}
|
||||||
|
/>
|
||||||
{updateState && (
|
{updateState && (
|
||||||
<LinearProgress
|
<LinearProgress
|
||||||
variant="buffer"
|
variant="buffer"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user