diff --git a/frontend/src/components/EmptyFolder.vue b/frontend/src/components/EmptyFolder.vue new file mode 100644 index 0000000..4313f8a --- /dev/null +++ b/frontend/src/components/EmptyFolder.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/frontend/src/repositories/Document.ts b/frontend/src/repositories/Document.ts index 1ee9d46..2b311d8 100644 --- a/frontend/src/repositories/Document.ts +++ b/frontend/src/repositories/Document.ts @@ -40,6 +40,12 @@ export class Doc { const ext = this.name.split('.').pop()?.toLowerCase() return ['jpg', 'jpeg', 'png', 'gif', 'webp', 'avif', 'svg'].includes(ext || '') } + get previewable(): boolean { + if (this.img) return true + const ext = this.name.split('.').pop()?.toLowerCase() + // Not a comprehensive list, but good enough for now + return ['mp4', 'mkv', 'webm', 'ogg', 'mp3', 'flac', 'aac', 'pdf'].includes(ext || '') + } get previewurl(): string { return this.url.replace(/^\/files/, '/preview') } diff --git a/frontend/src/views/ExplorerView.vue b/frontend/src/views/ExplorerView.vue index 6511945..4ec9aef 100644 --- a/frontend/src/views/ExplorerView.vue +++ b/frontend/src/views/ExplorerView.vue @@ -1,14 +1,6 @@