refactor(desktop): reorganize workspace panels and navigation
This commit is contained in:
1 parent
826745b407
commit
1f73765745
92 files changed
+5811
-2650
No files matched your search
@@ -1,3 +1,6 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:cutdex/features/settings/settings_page.dart';
|
||||
import 'package:cutdex/shared/widgets/error_notification_host.dart';
|
||||
import 'package:cutdex/app/editor_theme.dart';
|
||||
|
||||
import 'dart:io';
|
||||
@@ -110,14 +113,11 @@ void main() {
|
||||
Future<void> panel(WidgetTester tester, {String? conversationId}) async {
|
||||
await tester.binding.setSurfaceSize(const Size(1000, 760));
|
||||
addTearDown(() => tester.binding.setSurfaceSize(null));
|
||||
await tester.pumpWidget(
|
||||
UncontrolledProviderScope(
|
||||
container: container,
|
||||
child: MaterialApp(
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
theme: EditorTheme.penDark,
|
||||
home: Scaffold(
|
||||
final router = GoRouter(
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/',
|
||||
builder: (context, state) => Scaffold(
|
||||
body: SizedBox(
|
||||
width: 360,
|
||||
child: AgentChatPanel(
|
||||
@@ -128,6 +128,25 @@ void main() {
|
||||
),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/settings',
|
||||
builder: (context, state) => SettingsPage(
|
||||
initialTab: int.parse(state.uri.queryParameters['tab'] ?? '0'),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
addTearDown(router.dispose);
|
||||
await tester.pumpWidget(
|
||||
UncontrolledProviderScope(
|
||||
container: container,
|
||||
child: MaterialApp.router(
|
||||
routerConfig: router,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
theme: EditorTheme.penDark,
|
||||
builder: (context, child) => ErrorNotificationHost(child: child!),
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
Reference in new issue
Block a user