fix: add loading state to Cloud file counts
All 30 UX audit findings verified resolved. Added the last missing loading indicator for Cloud.vue file count fetching. All P0, P1, and P2 items from docs/ux-audit-2026-03.md are now addressed across Login, Home, Apps, Server, Chat, Federation, Credentials, Settings, Marketplace, Web5, SystemUpdate, and Cloud views. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
{{ section.appLabel }}
|
||||
</span>
|
||||
<span v-if="!isAppRunning(section.appId)" class="text-white/30">Not installed</span>
|
||||
<span v-else-if="countsLoading" class="text-white/30 animate-pulse">Loading...</span>
|
||||
<span v-else-if="sectionCounts[section.id] !== undefined" class="text-white/30">{{ sectionCounts[section.id] }} items</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,6 +77,7 @@ import { fileBrowserClient } from '@/api/filebrowser-client'
|
||||
const router = useRouter()
|
||||
const store = useAppStore()
|
||||
const sectionCounts = ref<Record<string, number>>({})
|
||||
const countsLoading = ref(false)
|
||||
|
||||
const APP_ALIASES: Record<string, string[]> = {
|
||||
immich: ['immich_server', 'immich-server'],
|
||||
@@ -159,6 +161,7 @@ const SECTION_PATHS: Record<string, string> = {
|
||||
|
||||
async function loadCounts() {
|
||||
if (!fileBrowserRunning.value) return
|
||||
countsLoading.value = true
|
||||
try {
|
||||
const ok = await fileBrowserClient.login()
|
||||
if (!ok) return
|
||||
@@ -174,6 +177,8 @@ async function loadCounts() {
|
||||
}
|
||||
} catch (e) {
|
||||
if (import.meta.env.DEV) console.warn('FileBrowser count loading failed silently', e)
|
||||
} finally {
|
||||
countsLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user