From ed22c5eda4f1b13e2626d55cb49f3211989b5fb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Sun, 11 Jan 2026 01:19:00 +0100 Subject: [PATCH] Fix file upload timeout and UX issues - Increase Dio receiveTimeout from 10s to 60s to allow file uploads and org creation to complete (Nextcloud user provisioning takes 5-7s) - Hide 'Empty Folder' text and back button in root directory (main folder) - Back button and empty message now only show in actual subdirectories --- b0esche_cloud/lib/pages/file_explorer.dart | 56 ++++++++++++---------- b0esche_cloud/lib/services/api_client.dart | 2 +- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/b0esche_cloud/lib/pages/file_explorer.dart b/b0esche_cloud/lib/pages/file_explorer.dart index bc4611f..bbd9385 100644 --- a/b0esche_cloud/lib/pages/file_explorer.dart +++ b/b0esche_cloud/lib/pages/file_explorer.dart @@ -798,32 +798,38 @@ class _FileExplorerState extends State { return const SizedBox.shrink(); }, ), - const SizedBox(height: 16), - Row( - children: [ - IconButton( - icon: const Icon( - Icons.arrow_back, - color: AppTheme.primaryText, - ), - splashColor: Colors.transparent, - highlightColor: Colors.transparent, - onPressed: () { - final parentPath = _getParentPath(state.currentPath); - context.read().add( - LoadDirectory( - orgId: widget.orgId, - path: parentPath, + // Only show back button and "Empty Folder" text if not at root + if (state.currentPath != '/') + Column( + children: [ + const SizedBox(height: 16), + Row( + children: [ + IconButton( + icon: const Icon( + Icons.arrow_back, + color: AppTheme.primaryText, + ), + splashColor: Colors.transparent, + highlightColor: Colors.transparent, + onPressed: () { + final parentPath = _getParentPath(state.currentPath); + context.read().add( + LoadDirectory( + orgId: widget.orgId, + path: parentPath, + ), + ); + }, ), - ); - }, - ), - const Text( - 'Empty Folder', - style: TextStyle(color: AppTheme.primaryText), - ), - ], - ), + const Text( + 'Empty Folder', + style: TextStyle(color: AppTheme.primaryText), + ), + ], + ), + ], + ), ], ), ); diff --git a/b0esche_cloud/lib/services/api_client.dart b/b0esche_cloud/lib/services/api_client.dart index 2a66f89..7a5fae5 100644 --- a/b0esche_cloud/lib/services/api_client.dart +++ b/b0esche_cloud/lib/services/api_client.dart @@ -13,7 +13,7 @@ class ApiClient { BaseOptions( baseUrl: baseUrl, connectTimeout: const Duration(seconds: 10), - receiveTimeout: const Duration(seconds: 10), + receiveTimeout: const Duration(seconds: 60), // Increased for file uploads and org operations ), );