feat(cloud): Folders/My Files/Peer Files polish + readable file rows
- Top-level Cloud tabs get their own orange-tinted switcher (clearly distinct from the category pills); full-width thirds on mobile - 'All Files' tab renamed Folders; categories only show on the file-list tabs (My Files / Peer Files / search) - My Files is now a flat list of every own file rendered with FileCard — real actions (share/download/delete) and clicking opens the FILE (media lightbox incl. audio, downloads for documents), never a folder; own search results get the same treatment - Folder list rows get card backgrounds (readable over the wallpaper), same info as before Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,7 +110,7 @@ const imgFailed = ref(false)
|
||||
|
||||
const ext = computed(() => props.item.extension)
|
||||
const isDir = computed(() => props.item.isDir)
|
||||
const { isImage, isVideo, iconPaths, iconColor, badgeLabel, badgeClass } = useFileType(ext, isDir)
|
||||
const { isImage, isVideo, isAudio, iconPaths, iconColor, badgeLabel, badgeClass } = useFileType(ext, isDir)
|
||||
|
||||
const thumbnailUrl = computed(() => {
|
||||
if (!isImage.value || imgFailed.value) return null
|
||||
@@ -122,8 +122,12 @@ const downloadHref = computed(() => cloudStore.downloadUrl(props.item.path))
|
||||
function handleClick() {
|
||||
if (props.item.isDir) {
|
||||
emit('navigate', props.item.path)
|
||||
} else if (isImage.value || isVideo.value) {
|
||||
} else if (isImage.value || isVideo.value || isAudio.value) {
|
||||
// MediaLightbox handles all three media kinds.
|
||||
emit('preview', props.item.path)
|
||||
} else {
|
||||
// Non-media files open by downloading — a click should always act on the file.
|
||||
window.location.href = downloadHref.value
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user