From fff4a4bd22e37f22bdb85c82156e2f2fb4270f02 Mon Sep 17 00:00:00 2001 From: Elysia Date: Fri, 30 Jan 2026 21:39:50 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0README=E6=96=87?= =?UTF-8?q?=E6=A1=A3=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=8A=A8=E7=94=BB=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E9=97=AE=E9=A2=98=E7=9A=84=E5=BE=85=E5=8A=9E=E4=BA=8B?= =?UTF-8?q?=E9=A1=B9=EF=BC=9B=E4=BF=AE=E6=94=B9=E5=AE=89=E8=A3=85=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=99=A8=E4=BB=A5=E4=BD=BF=E7=94=A8=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=9F=A5=E6=89=BEpkexec=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=EF=BC=9B=E5=88=A0=E9=99=A4=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E7=AE=A1=E7=90=86=E6=A8=A1=E6=8B=9F=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + electron/main/backend/install-manager.ts | 2 +- src/App.vue | 52 ------------------------ 3 files changed, 2 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 74dfb0e4..0dba41f9 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ - [ ] 切换分类时默认不应用搜索,需按下回车键才应用搜索 - [x] 修改UI,使其更美观(考虑换成如tailwindcss等库) - [ ] 实现URL Shceme协议支持 +- [ ] 动画性能问题 ## 📦 关于 APM diff --git a/electron/main/backend/install-manager.ts b/electron/main/backend/install-manager.ts index bce3161c..176e9c48 100644 --- a/electron/main/backend/install-manager.ts +++ b/electron/main/backend/install-manager.ts @@ -22,7 +22,7 @@ const checkSuperUserCommand = async (): Promise => { let superUserCmd = ''; const execAsync = promisify(exec); if (process.getuid && process.getuid() !== 0) { - const { stdout, stderr } = await execAsync('which pkexec'); + const { stdout, stderr } = await execAsync('which /usr/bin/pkexec'); if (stderr) { logger.error('没有找到 pkexec 命令'); return; diff --git a/src/App.vue b/src/App.vue index 3ee8ae4f..c8776684 100644 --- a/src/App.vue +++ b/src/App.vue @@ -376,58 +376,6 @@ const escapeHtml = (s) => { })[c]); }; -// 下载管理方法 -// 在这里保留这个方便以后参考 -// const simulateDownload = (download) => { -// // 模拟下载进度(实际应该调用真实的下载 API) -// const totalSize = Math.random() * 100 + 50; // MB -// download.totalSize = totalSize * 1024 * 1024; - -// const interval = setInterval(() => { -// const downloadObj = downloads.value.find(d => d.id === download.id); -// if (!downloadObj || downloadObj.status !== 'downloading') { -// clearInterval(interval); -// return; -// } - -// // 更新进度 -// downloadObj.progress = Math.min(downloadObj.progress + Math.random() * 10, 100); -// downloadObj.downloadedSize = (downloadObj.progress / 100) * downloadObj.totalSize; -// downloadObj.speed = (Math.random() * 5 + 1) * 1024 * 1024; // 1-6 MB/s - -// const remainingBytes = downloadObj.totalSize - downloadObj.downloadedSize; -// downloadObj.timeRemaining = Math.ceil(remainingBytes / downloadObj.speed); - -// // 添加日志 -// if (downloadObj.progress % 20 === 0 && downloadObj.progress > 0 && downloadObj.progress < 100) { -// downloadObj.logs.push({ -// time: Date.now(), -// message: `下载进度: ${downloadObj.progress.toFixed(0)}%` -// }); -// } - -// // 下载完成 -// if (downloadObj.progress >= 100) { -// clearInterval(interval); -// downloadObj.status = 'installing'; -// downloadObj.logs.push({ -// time: Date.now(), -// message: '下载完成,开始安装...' -// }); - -// // 模拟安装 -// setTimeout(() => { -// downloadObj.status = 'completed'; -// downloadObj.endTime = Date.now(); -// downloadObj.logs.push({ -// time: Date.now(), -// message: '安装完成!' -// }); -// }, 2000); -// } -// }, 500); -// }; - // 目前 APM 商店不能暂停下载(因为 APM 本身不支持),但保留这些方法以备将来使用 const pauseDownload = (id) => { const download = downloads.value.find(d => d.id === id);