mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-22 14:13:49 +08:00
feat(settings): 添加安装设置模态框及配置管理功能
实现安装设置功能,包括更新检测通知和自动创建桌面启动器的开关配置 重构原有的安装设置逻辑,使用模态框替代直接调用脚本 新增 IPC 接口用于获取和保存设置配置
This commit is contained in:
+10
-9
@@ -151,6 +151,8 @@
|
||||
/>
|
||||
|
||||
<AboutModal :show="showAboutModal" @close="closeAboutModal" />
|
||||
|
||||
<SettingsModal :show="showSettingsModal" @close="closeSettingsModal" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -170,6 +172,7 @@ import InstalledAppsModal from "./components/InstalledAppsModal.vue";
|
||||
import UpdateCenterModal from "./components/UpdateCenterModal.vue";
|
||||
import UninstallConfirmModal from "./components/UninstallConfirmModal.vue";
|
||||
import AboutModal from "./components/AboutModal.vue";
|
||||
import SettingsModal from "./components/SettingsModal.vue";
|
||||
import {
|
||||
APM_STORE_BASE_URL,
|
||||
currentApp,
|
||||
@@ -260,6 +263,7 @@ const updateCenterStore = createUpdateCenterStore();
|
||||
const showUninstallModal = ref(false);
|
||||
const uninstallTargetApp: Ref<App | null> = ref(null);
|
||||
const showAboutModal = ref(false);
|
||||
const showSettingsModal = ref(false);
|
||||
const apmAvailable = ref(false);
|
||||
|
||||
/** 启动参数 --no-apm => 仅 Spark;--no-spark => 仅 APM;由主进程 IPC 提供 */
|
||||
@@ -747,15 +751,8 @@ const handleUpdate = async () => {
|
||||
await openUpdateModal();
|
||||
};
|
||||
|
||||
const handleOpenInstallSettings = async () => {
|
||||
try {
|
||||
const result = await window.ipcRenderer.invoke("open-install-settings");
|
||||
if (!result || !result.success) {
|
||||
logger.warn(`启动安装设置失败: ${result?.message || "未知错误"}`);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error(`调用安装设置时出错: ${error}`);
|
||||
}
|
||||
const handleOpenInstallSettings = () => {
|
||||
showSettingsModal.value = true;
|
||||
};
|
||||
|
||||
const handleList = () => {
|
||||
@@ -937,6 +934,10 @@ const closeAboutModal = () => {
|
||||
showAboutModal.value = false;
|
||||
};
|
||||
|
||||
const closeSettingsModal = () => {
|
||||
showSettingsModal.value = false;
|
||||
};
|
||||
|
||||
// TODO: 目前 APM 商店不能暂停下载
|
||||
const pauseDownload = (id: DownloadItem) => {
|
||||
const download = downloads.value.find((d) => d.id === id.id);
|
||||
|
||||
Reference in New Issue
Block a user