90686e6deb
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>
27 lines
607 B
Vue
27 lines
607 B
Vue
<template>
|
|
<v-snackbar
|
|
v-model="show" :color="color" location="bottom right" timeout="4000"
|
|
multi-line elevation="4"
|
|
>
|
|
{{ message }}
|
|
<template #actions>
|
|
<v-btn variant="text" @click="show = false">Dismiss</v-btn>
|
|
</template>
|
|
</v-snackbar>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
const show = ref(false)
|
|
const message = ref('')
|
|
const color = ref('error')
|
|
|
|
function open({ text, type = 'error' }) {
|
|
message.value = text
|
|
color.value = type === 'error' ? 'error' : type === 'success' ? 'success' : 'info'
|
|
show.value = true
|
|
}
|
|
|
|
defineExpose({ open })
|
|
</script>
|