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
This commit is contained in:
@@ -798,32 +798,38 @@ class _FileExplorerState extends State<FileExplorer> {
|
|||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
// Only show back button and "Empty Folder" text if not at root
|
||||||
Row(
|
if (state.currentPath != '/')
|
||||||
children: [
|
Column(
|
||||||
IconButton(
|
children: [
|
||||||
icon: const Icon(
|
const SizedBox(height: 16),
|
||||||
Icons.arrow_back,
|
Row(
|
||||||
color: AppTheme.primaryText,
|
children: [
|
||||||
),
|
IconButton(
|
||||||
splashColor: Colors.transparent,
|
icon: const Icon(
|
||||||
highlightColor: Colors.transparent,
|
Icons.arrow_back,
|
||||||
onPressed: () {
|
color: AppTheme.primaryText,
|
||||||
final parentPath = _getParentPath(state.currentPath);
|
),
|
||||||
context.read<FileBrowserBloc>().add(
|
splashColor: Colors.transparent,
|
||||||
LoadDirectory(
|
highlightColor: Colors.transparent,
|
||||||
orgId: widget.orgId,
|
onPressed: () {
|
||||||
path: parentPath,
|
final parentPath = _getParentPath(state.currentPath);
|
||||||
|
context.read<FileBrowserBloc>().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),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class ApiClient {
|
|||||||
BaseOptions(
|
BaseOptions(
|
||||||
baseUrl: baseUrl,
|
baseUrl: baseUrl,
|
||||||
connectTimeout: const Duration(seconds: 10),
|
connectTimeout: const Duration(seconds: 10),
|
||||||
receiveTimeout: const Duration(seconds: 10),
|
receiveTimeout: const Duration(seconds: 60), // Increased for file uploads and org operations
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user