From 7adde54a410ca1223adbec057819331a3638c2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Thu, 8 Jan 2026 21:40:55 +0100 Subject: [PATCH] Support personal workspace without requiring organization --- b0esche_cloud/lib/pages/home_page.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/b0esche_cloud/lib/pages/home_page.dart b/b0esche_cloud/lib/pages/home_page.dart index 914575b..052d640 100644 --- a/b0esche_cloud/lib/pages/home_page.dart +++ b/b0esche_cloud/lib/pages/home_page.dart @@ -190,10 +190,16 @@ class _HomePageState extends State with TickerProviderStateMixin { ); } - Widget _buildDrive(OrganizationState state) { - return state is OrganizationLoaded && state.selectedOrg != null - ? FileExplorer(orgId: state.selectedOrg!.id) - : const FileExplorer(orgId: 'org1'); + Widget _buildDrive(OrganizationState state, AuthState authState) { + if (state is OrganizationLoaded && state.selectedOrg != null) { + // Show selected organization's files + return FileExplorer(orgId: state.selectedOrg!.id); + } else if (authState is AuthAuthenticated) { + // Show personal workspace using user's email as workspace ID + return FileExplorer(orgId: authState.user.email ?? 'personal'); + } else { + return const FileExplorer(orgId: 'personal'); + } } Widget _buildNavButton(String label, IconData icon, {bool isAvatar = false}) { @@ -313,6 +319,7 @@ class _HomePageState extends State with TickerProviderStateMixin { Expanded( child: _buildDrive( orgState, + state, ), ), ],