refactor: ui/ux refinements
This commit is contained in:
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../features/chat/views/chat_page.dart';
|
||||
import '../../features/files/views/files_page.dart';
|
||||
import '../../features/files/views/workspace_page.dart';
|
||||
import '../../features/profile/views/profile_page.dart';
|
||||
|
||||
/// Service for handling deep links and navigation routing
|
||||
@@ -16,11 +16,11 @@ class DeepLinkService {
|
||||
);
|
||||
}
|
||||
|
||||
/// In single-screen mode, files/profile deep links route via navigator
|
||||
static void navigateToFiles(BuildContext context) {
|
||||
/// In single-screen mode, workspace/profile deep links route via navigator
|
||||
static void navigateToWorkspace(BuildContext context) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const FilesPage()),
|
||||
MaterialPageRoute(builder: (context) => const WorkspacePage()),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -37,9 +37,12 @@ class DeepLinkService {
|
||||
case '/chat':
|
||||
case '/main/chat':
|
||||
return '/chat';
|
||||
case '/files':
|
||||
case '/main/files':
|
||||
return '/files';
|
||||
// Support both new and legacy paths for workspace
|
||||
case '/workspace':
|
||||
case '/main/workspace':
|
||||
case '/files': // legacy
|
||||
case '/main/files': // legacy
|
||||
return '/workspace';
|
||||
case '/profile':
|
||||
case '/main/profile':
|
||||
return '/profile';
|
||||
@@ -52,8 +55,8 @@ class DeepLinkService {
|
||||
static Widget handleDeepLink(String route) {
|
||||
final path = parsePath(route);
|
||||
switch (path) {
|
||||
case '/files':
|
||||
return const FilesPage();
|
||||
case '/workspace':
|
||||
return const WorkspacePage();
|
||||
case '/profile':
|
||||
return const ProfilePage();
|
||||
case '/chat':
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
// ThemedDialogs handles theming; no direct use of extensions here
|
||||
import '../../features/auth/views/connect_signin_page.dart';
|
||||
import '../../features/chat/views/chat_page.dart';
|
||||
import '../../features/files/views/files_page.dart';
|
||||
import '../../features/files/views/workspace_page.dart';
|
||||
import '../../features/profile/views/profile_page.dart';
|
||||
import '../../shared/widgets/themed_dialogs.dart';
|
||||
|
||||
@@ -130,8 +130,8 @@ class NavigationService {
|
||||
page = const ConnectAndSignInPage();
|
||||
break;
|
||||
|
||||
case Routes.files:
|
||||
page = const FilesPage();
|
||||
case Routes.workspace:
|
||||
page = const WorkspacePage();
|
||||
break;
|
||||
|
||||
// chats list route removed (replaced by drawer)
|
||||
@@ -154,5 +154,5 @@ class Routes {
|
||||
static const String login = '/login';
|
||||
static const String profile = '/profile';
|
||||
static const String serverConnection = '/server-connection';
|
||||
static const String files = '/files';
|
||||
static const String workspace = '/workspace';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user