feat: 更新本地应用列表,区分依赖和用户安装的包

This commit is contained in:
Elysia
2026-01-31 01:07:05 +08:00
parent 4ce097bae0
commit 588eaf9746
2 changed files with 9 additions and 3 deletions

View File

@@ -26,7 +26,7 @@
- [x] 实现应用更新 - [x] 实现应用更新
- [x] 显示本地已安装app - [x] 显示本地已安装app
- [x] 支持显示本地是否已经安装 - [x] 支持显示本地是否已经安装
- [ ] 本地应用列表区分依赖和用户安装的包(或者干脆不显示依赖包) - [x] 本地应用列表区分依赖和用户安装的包(或者干脆不显示依赖包)
- [x] 安装/卸载时UI提示重要 - [x] 安装/卸载时UI提示重要
- [x] 实现应用搜索 - [x] 实现应用搜索
- [ ] 切换分类时默认不应用搜索,需按下回车键才应用搜索 - [ ] 切换分类时默认不应用搜索,需按下回车键才应用搜索

View File

@@ -42,12 +42,18 @@
<div v-for="app in apps" :key="app.pkgname" <div v-for="app in apps" :key="app.pkgname"
class="flex flex-col gap-3 rounded-2xl border border-slate-200/70 bg-white/90 p-4 shadow-sm dark:border-slate-800/70 dark:bg-slate-900/70 sm:flex-row sm:items-center sm:justify-between"> class="flex flex-col gap-3 rounded-2xl border border-slate-200/70 bg-white/90 p-4 shadow-sm dark:border-slate-800/70 dark:bg-slate-900/70 sm:flex-row sm:items-center sm:justify-between">
<div> <div>
<div class="flex items-center gap-2">
<p class="text-base font-semibold text-slate-900 dark:text-white">{{ app.pkgname }}</p> <p class="text-base font-semibold text-slate-900 dark:text-white">{{ app.pkgname }}</p>
<span v-if="app.flags && app.flags.includes('automatic')"
class="rounded-md bg-rose-100 px-2 py-0.5 text-[11px] font-semibold text-rose-600 dark:bg-rose-500/20 dark:text-rose-400">
依赖项
</span>
</div>
<div class="mt-1 flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400"> <div class="mt-1 flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400">
<span>{{ app.version }}</span> <span>{{ app.version }}</span>
<span>·</span> <span>·</span>
<span>{{ app.arch }}</span> <span>{{ app.arch }}</span>
<template v-if="app.flags"> <template v-if="app.flags && !app.flags.includes('automatic')">
<span>·</span> <span>·</span>
<span>{{ app.flags }}</span> <span>{{ app.flags }}</span>
</template> </template>