wip: Sicherungs-Commit aller Änderungen seit April + Arbeitsstruktur (CLAUDE.md, ROADMAP.md, PROGRESS.md, Autopilot)
6 Wochen uncommittete Arbeit (Voice-Channels, LiveKit-Manager, Settings-Modal u.v.m.) als ein WIP-Commit gesichert, damit nichts verloren geht und der Pi den aktuellen Stand klonen kann. Thematische Aufarbeitung: siehe ROADMAP M0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CPrAGBxBT6GfPXzeWQ4AXb
This commit is contained in:
+6
-23
@@ -3,17 +3,14 @@ import 'package:go_router/go_router.dart';
|
||||
import 'package:pyramid/features/auth/login_notifier.dart';
|
||||
import 'package:pyramid/features/auth/login_page.dart';
|
||||
import 'package:pyramid/features/auth/server_page.dart';
|
||||
import 'package:pyramid/features/chat/chat_page.dart';
|
||||
import 'package:pyramid/features/rooms/rooms_page.dart';
|
||||
import 'package:pyramid/features/settings/settings_page.dart';
|
||||
import 'package:pyramid/layout/shell_page.dart';
|
||||
import 'package:pyramid/layout/app_shell.dart';
|
||||
|
||||
final routerProvider = Provider<GoRouter>((ref) {
|
||||
final isLoggedIn = ref.watch(isLoggedInProvider).valueOrNull ?? false;
|
||||
final hasServer = ref.watch(homeserverProvider) != null;
|
||||
|
||||
return GoRouter(
|
||||
initialLocation: '/rooms',
|
||||
initialLocation: '/app',
|
||||
redirect: (context, state) {
|
||||
final loc = state.matchedLocation;
|
||||
final onAuth = loc == '/login' || loc == '/server';
|
||||
@@ -24,7 +21,7 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (isLoggedIn && onAuth) return '/rooms';
|
||||
if (isLoggedIn && onAuth) return '/app';
|
||||
return null;
|
||||
},
|
||||
routes: [
|
||||
@@ -36,23 +33,9 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
path: '/login',
|
||||
builder: (context, state) => const LoginPage(),
|
||||
),
|
||||
ShellRoute(
|
||||
builder: (context, state, child) => ShellPage(child: child),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/rooms',
|
||||
builder: (context, state) => const RoomsPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/chat/:roomId',
|
||||
builder: (context, state) =>
|
||||
ChatPage(roomId: state.pathParameters['roomId']!),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/settings',
|
||||
builder: (context, state) => const SettingsPage(),
|
||||
),
|
||||
],
|
||||
GoRoute(
|
||||
path: '/app',
|
||||
builder: (context, state) => const AppShell(),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user