mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 01:10:16 +08:00
feat:修复基础格式问题
This commit is contained in:
@@ -182,7 +182,11 @@ ipcMain.on("queue-install", async (event, download_json) => {
|
||||
execParams.push(SHELL_CALLER_PATH);
|
||||
|
||||
if (metalinkUrl && filename) {
|
||||
execParams.push("ssinstall", `${downloadDir}/${filename}`, "--delete-after-install");
|
||||
execParams.push(
|
||||
"ssinstall",
|
||||
`${downloadDir}/${filename}`,
|
||||
"--delete-after-install",
|
||||
);
|
||||
} else {
|
||||
execParams.push("aptss", "install", "-y", pkgname);
|
||||
}
|
||||
@@ -190,7 +194,11 @@ ipcMain.on("queue-install", async (event, download_json) => {
|
||||
execCommand = SHELL_CALLER_PATH;
|
||||
|
||||
if (metalinkUrl && filename) {
|
||||
execParams.push("ssinstall", `${downloadDir}/${filename}`, "--delete-after-install");
|
||||
execParams.push(
|
||||
"ssinstall",
|
||||
`${downloadDir}/${filename}`,
|
||||
"--delete-after-install",
|
||||
);
|
||||
} else {
|
||||
execParams.push("aptss", "install", "-y", pkgname);
|
||||
}
|
||||
@@ -439,7 +447,11 @@ ipcMain.handle("check-installed", async (_event, pkgname: string) => {
|
||||
|
||||
// 如果脚本不存在或检测不到,使用 dpkg-query 作为后备
|
||||
logger.info(`尝试使用 dpkg-query 检测: ${pkgname}`);
|
||||
const { code } = await runCommandCapture("dpkg-query", ["-W", "-f='${Status}'", pkgname]);
|
||||
const { code } = await runCommandCapture("dpkg-query", [
|
||||
"-W",
|
||||
"-f='${Status}'",
|
||||
pkgname,
|
||||
]);
|
||||
|
||||
if (code === 0) {
|
||||
isInstalled = true;
|
||||
|
||||
@@ -164,7 +164,8 @@ ipcMain.handle("run-update-tool", async () => {
|
||||
ipcMain.handle("open-install-settings", async () => {
|
||||
try {
|
||||
const { spawn } = await import("node:child_process");
|
||||
const scriptPath = "/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh";
|
||||
const scriptPath =
|
||||
"/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh";
|
||||
const child = spawn("/opt/spark-store/extras/host-spawn", [scriptPath], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
|
||||
@@ -180,7 +180,7 @@ const axiosInstance = axios.create({
|
||||
timeout: 5000, // 增加到 5 秒,避免网络波动导致的超时
|
||||
});
|
||||
|
||||
const fetchWithRetry = async <T>(
|
||||
const fetchWithRetry = async <T,>(
|
||||
url: string,
|
||||
retries = 3,
|
||||
delay = 1000,
|
||||
@@ -422,7 +422,8 @@ const loadHome = async () => {
|
||||
if (realRes.ok) {
|
||||
const realApp = await realRes.json();
|
||||
// 用真实json的filename字段和More字段来增补和覆盖当前的json
|
||||
if (realApp.Filename) baseApp.filename = realApp.Filename;
|
||||
if (realApp.Filename)
|
||||
baseApp.filename = realApp.Filename;
|
||||
if (realApp.More) baseApp.more = realApp.More;
|
||||
if (realApp.Name) baseApp.name = realApp.Name;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
>
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
<TopActions @update="$emit('update')" @list="$emit('list')" @open-install-settings="$emit('open-install-settings')" />
|
||||
<TopActions
|
||||
@update="$emit('update')"
|
||||
@list="$emit('list')"
|
||||
@open-install-settings="$emit('open-install-settings')"
|
||||
/>
|
||||
</div>
|
||||
<div class="w-full flex-1">
|
||||
<label for="searchBox" class="sr-only">搜索应用</label>
|
||||
@@ -29,7 +33,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="activeCategory !== 'home'" class="text-sm text-slate-500 dark:text-slate-400" id="currentCount">
|
||||
<div
|
||||
v-if="activeCategory !== 'home'"
|
||||
class="text-sm text-slate-500 dark:text-slate-400"
|
||||
id="currentCount"
|
||||
>
|
||||
共 {{ appsCount }} 个应用
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<div class="space-y-6">
|
||||
<div v-if="loading" class="text-center text-slate-500">正在加载首页内容…</div>
|
||||
<div v-if="loading" class="text-center text-slate-500">
|
||||
正在加载首页内容…
|
||||
</div>
|
||||
<div v-else-if="error" class="text-center text-rose-600">{{ error }}</div>
|
||||
<div v-else>
|
||||
<div class="grid gap-4 auto-fit-grid">
|
||||
@@ -17,7 +19,9 @@
|
||||
class="h-20 w-full object-contain"
|
||||
loading="lazy"
|
||||
/>
|
||||
<div class="text-base font-semibold text-slate-900">{{ link.name }}</div>
|
||||
<div class="text-base font-semibold text-slate-900">
|
||||
{{ link.name }}
|
||||
</div>
|
||||
<div class="text-sm text-slate-500">{{ link.more }}</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -25,7 +29,9 @@
|
||||
<div class="space-y-6 mt-6">
|
||||
<section v-for="section in lists" :key="section.title">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-lg font-semibold text-slate-900">{{ section.title }}</h3>
|
||||
<h3 class="text-lg font-semibold text-slate-900">
|
||||
{{ section.title }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="mt-3 grid gap-4 auto-fit-grid">
|
||||
<AppCard
|
||||
|
||||
Reference in New Issue
Block a user