feat(05): cloud folder browser views, routing, and sidebar nav

Add CloudStorageView (/cloud) and CloudFolderView (/cloud/:provider/:folderId).
Tree items filter to directories only (is_dir) to hide files in the nav tree.
CloudProviderTreeItem root click navigates to /cloud/{provider}/root instead
of /settings. AppSidebar Cloud Storage link upgraded to router-link with
active-class highlighting. Router registers both cloud routes with requiresAuth.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
curo1305
2026-05-30 11:58:08 +02:00
parent 54ef3357ba
commit 5250895587
6 changed files with 291 additions and 7 deletions
@@ -102,7 +102,7 @@ async function loadChildren() {
loadError.value = false
try {
const data = await api.getCloudFolders(props.provider, props.folder.id)
children.value = data.items ?? []
children.value = (data.items ?? []).filter(i => i.is_dir)
childrenLoaded.value = true
} catch {
loadError.value = true
@@ -92,7 +92,7 @@ async function loadChildren() {
loadError.value = false
try {
const data = await api.getCloudFolders(props.connection.provider, 'root')
children.value = data.items ?? []
children.value = (data.items ?? []).filter(i => i.is_dir)
childrenLoaded.value = true
} catch {
loadError.value = true
@@ -113,6 +113,6 @@ async function retry() {
}
function navigateToRoot() {
router.push('/settings')
router.push(`/cloud/${props.connection.provider}/root`)
}
</script>
@@ -128,17 +128,18 @@
</svg>
</button>
<!-- "Cloud Storage" navigates to /settings -->
<a
href="/settings"
<!-- "Cloud Storage" navigates to the cloud overview -->
<router-link
to="/cloud"
class="nav-link flex-1 min-w-0"
:class="{ 'nav-link-active': $route.path.startsWith('/cloud') }"
>
<svg class="w-4 h-4 mr-2 shrink-0 text-sky-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z" />
</svg>
Cloud Storage
</a>
</router-link>
</div>
<!-- Collapsible content -->