feat(组件): --no-spark时不展示 Spark 应用管理

在InstalledAppsModal和AppSidebar组件中添加storeFilter属性,用于控制不同应用商店的显示逻辑
This commit is contained in:
2026-04-05 11:53:12 +08:00
parent 8be9e1a6cb
commit bcae531387
3 changed files with 6 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
:category-counts="categoryCounts"
:theme-mode="themeMode"
:apm-available="apmAvailable"
:store-filter="storeFilter"
@toggle-theme="toggleTheme"
@select-category="selectCategory"
@close="isSidebarOpen = false"
@@ -117,6 +118,7 @@
:loading="installedLoading"
:error="installedError"
:active-origin="activeInstalledOrigin"
:store-filter="storeFilter"
@close="closeInstalledModal"
@refresh="refreshInstalledApps"
@uninstall="uninstallInstalledApp"

View File

@@ -89,7 +89,7 @@
<div class="border-t border-slate-200 pt-4 dark:border-slate-800">
<button
v-if="apmAvailable"
v-if="apmAvailable && storeFilter !== 'spark'"
type="button"
class="flex w-full items-center gap-3 rounded-2xl border border-transparent px-4 py-3 text-left text-sm font-medium text-slate-600 transition hover:border-brand/30 hover:bg-brand/5 hover:text-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 dark:text-slate-300 dark:hover:bg-slate-800"
@click="$emit('list')"
@@ -120,6 +120,7 @@ defineProps<{
categoryCounts: Record<string, number>;
themeMode: "light" | "dark" | "auto";
apmAvailable: boolean;
storeFilter: "spark" | "apm" | "both";
}>();
const emit = defineEmits<{

View File

@@ -28,6 +28,7 @@
</div>
<div class="flex items-center gap-3">
<div
v-if="storeFilter === 'both'"
class="flex items-center rounded-2xl border border-slate-200/70 p-1 dark:border-slate-800/70"
>
<button
@@ -181,6 +182,7 @@ defineProps<{
loading: boolean;
error: string;
activeOrigin: "apm" | "spark";
storeFilter: "spark" | "apm" | "both";
}>();
defineEmits<{