diff --git a/electron/api/common.ts b/electron/api/common.ts index 4ca396d..1325b71 100644 --- a/electron/api/common.ts +++ b/electron/api/common.ts @@ -12,5 +12,6 @@ export const initCommonApi = () => { ipcMain.on("common.relaunch", () => { app.relaunch(); + app.quit(); }); }; diff --git a/package.json b/package.json index 6520722..2bedcd4 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/src/views/config/index.vue b/src/views/config/index.vue index a840556..6114726 100644 --- a/src/views/config/index.vue +++ b/src/views/config/index.vue @@ -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: "立即重启"