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);