fix(cloud): skeleton on first render + informative toast when opening cloud files
- loading initialised to true so skeleton rows show immediately on mount instead of the empty state flashing before data arrives - @file-open no longer a silent no-op; shows an info toast explaining the file must be opened via the cloud provider directly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
210670d033
commit
ce67b9f98a
@@ -11,7 +11,7 @@
|
||||
@breadcrumb-navigate="handleBreadcrumbNavigate"
|
||||
@upload="onFilesSelected"
|
||||
@folder-navigate="item => navigateTo(item)"
|
||||
@file-open="file => {}"
|
||||
@file-open="onFileOpen"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -21,12 +21,15 @@ import { useRoute, useRouter } from 'vue-router'
|
||||
import * as api from '../api/client.js'
|
||||
import StorageBrowser from '../components/storage/StorageBrowser.vue'
|
||||
import { providerLabel } from '../utils/formatters.js'
|
||||
import { useToastStore } from '../stores/toast.js'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const toast = useToastStore()
|
||||
|
||||
const items = ref([])
|
||||
const loading = ref(false)
|
||||
const loading = ref(true)
|
||||
const error = ref('')
|
||||
|
||||
const provider = computed(() => route.params.provider)
|
||||
@@ -92,6 +95,10 @@ async function onFilesSelected({ files: selectedFiles }) {
|
||||
await load()
|
||||
}
|
||||
|
||||
function onFileOpen(file) {
|
||||
toast.show(`"${file.name}" can't be opened here — open it directly in your cloud storage provider.`, 'info')
|
||||
}
|
||||
|
||||
onMounted(load)
|
||||
watch([provider, folderId], load)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user