chore(fc2a): polish pass — toasts, loading skeletons, focus guards, mobile breakpoints

AppSnackbar mounts once at the app root and exposes a window.__fcToast
function the stores call from error paths. This avoids prop-drilling a
toast emitter through every component while keeping the snackbar
component itself testable in isolation.

GalleryGrid renders shimmer-skeleton placeholders on initial load so the
first paint isn't empty. Skeleton uses the same auto-fill grid columns
as the real items so layout doesn't shift when content arrives.

Modal arrow nav now ignores text-entry elements so typing in the tag
autocomplete doesn't navigate prev/next. Small-screen breakpoint
(<600px) tightens gallery thumbnails to 120px min.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-14 12:36:25 -04:00
parent dcf3af88bd
commit 90686e6deb
6 changed files with 89 additions and 2 deletions
+2
View File
@@ -37,6 +37,7 @@ export const useImportStore = defineStore('import', () => {
settings.value = await api.patch('/api/settings/import', { body: patch })
} catch (e) {
settingsError.value = e.message
window.__fcToast?.({ text: `Settings save failed: ${e.message}`, type: 'error' })
throw e
}
}
@@ -58,6 +59,7 @@ export const useImportStore = defineStore('import', () => {
await refreshStatus()
} catch (e) {
triggerError.value = e.message
window.__fcToast?.({ text: `Scan failed: ${e.message}`, type: 'error' })
throw e
}
}
+1
View File
@@ -56,6 +56,7 @@ export const useModalStore = defineStore('modal', () => {
await api.delete(`/api/images/${currentImageId.value}/tags/${tagId}`)
} catch (e) {
current.value.tags = prev
window.__fcToast?.({ text: `Failed to remove tag: ${e.message}`, type: 'error' })
throw e
}
}