礼花特效、重启修复

This commit is contained in:
刘嘉伟 2024-08-24 14:04:03 +08:00
parent 09c591b24b
commit 44088af063
3 changed files with 13 additions and 4 deletions

View File

@ -12,5 +12,6 @@ export const initCommonApi = () => {
ipcMain.on("common.relaunch", () => {
app.relaunch();
app.quit();
});
};

View File

@ -66,7 +66,7 @@
"vue-router": "^4.2.4",
"vue-tsc": "^2.0.22",
"vue-types": "^5.1.1",
"uuid": "^10.0.0"
"canvas-confetti": "^1.9.0"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
@ -77,6 +77,7 @@
"isbinaryfile": "4.0.10",
"js-base64": "^3.7.7",
"tar": "^6.2.0",
"unused-filename": "^4.0.1"
"unused-filename": "^4.0.1",
"uuid": "^10.0.0"
}
}

View File

@ -7,7 +7,7 @@ import { useDebounceFn } from "@vueuse/core";
import { clone } from "@/utils/clone";
import { Base64 } from "js-base64";
import IconifyIconOffline from "@/components/IconifyIcon/src/iconifyIconOffline";
import confetti from "canvas-confetti/src/confetti.js";
defineComponent({
name: "Config"
});
@ -219,7 +219,14 @@ onMounted(() => {
ipcRenderer.on("Config.importConfig.hook", (event, args) => {
const { success, data } = args;
if (success) {
ElMessageBox.alert("导入成功 请重启软件", `提示`, {
//
confetti({
zIndex: 12002,
particleCount: 200,
spread: 70,
origin: { y: 0.6 }
});
ElMessageBox.alert("🎉 恭喜你,导入成功 请重启软件", `提示`, {
closeOnClickModal: false,
showClose: false,
confirmButtonText: "立即重启"