chore: release v1.4.0
- Decentralized Room Registry pattern - Each room registers itself with central registry - Dynamic navigation tabs and settings dropdown - New Media Room and Parlor feature folders - Permission-based room filtering support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
40ba6a869d
commit
c3f6d27a52
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tatlock_ui/features/control_room/presentation/pages/control_room_page.dart';
|
||||
import 'package:tatlock_ui/routing/app_router.dart';
|
||||
import 'package:tatlock_ui/routing/room_registry.dart';
|
||||
import 'package:tatlock_ui/shared/layouts/widgets/nav_panel.dart';
|
||||
|
||||
/// Route paths for Control Room.
|
||||
@@ -49,6 +50,22 @@ enum ControlRoomNav {
|
||||
/// Get route path for a nav item.
|
||||
String pathForNav(ControlRoomNav nav) => nav.path;
|
||||
|
||||
/// Control Room room definition.
|
||||
final controlRoomRoom = RoomDefinition(
|
||||
id: 'control-room',
|
||||
label: 'Control Room',
|
||||
icon: Icons.dns_outlined,
|
||||
selectedIcon: Icons.dns,
|
||||
defaultRoute: ControlRoomRoutes.containers,
|
||||
routes: controlRoomRoutes,
|
||||
// No permissions required - accessible to all authenticated users
|
||||
);
|
||||
|
||||
/// Register Control Room with the room registry.
|
||||
void registerControlRoom() {
|
||||
roomRegistry.register(controlRoomRoom);
|
||||
}
|
||||
|
||||
/// Control Room routes for go_router.
|
||||
List<RouteBase> controlRoomRoutes() {
|
||||
return [
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tatlock_ui/features/front_hall/presentation/pages/front_hall_page.dart';
|
||||
import 'package:tatlock_ui/routing/app_router.dart';
|
||||
import 'package:tatlock_ui/routing/room_registry.dart';
|
||||
|
||||
/// Route paths for Front Hall.
|
||||
abstract class FrontHallRoutes {
|
||||
static const base = '/front-hall';
|
||||
}
|
||||
|
||||
/// Front Hall room definition.
|
||||
final frontHallRoom = RoomDefinition(
|
||||
id: 'front-hall',
|
||||
label: 'Front Hall',
|
||||
icon: Icons.door_front_door_outlined,
|
||||
selectedIcon: Icons.door_front_door,
|
||||
defaultRoute: FrontHallRoutes.base,
|
||||
routes: frontHallRoutes,
|
||||
// No permissions required - accessible to all authenticated users
|
||||
);
|
||||
|
||||
/// Register Front Hall with the room registry.
|
||||
void registerFrontHall() {
|
||||
roomRegistry.register(frontHallRoom);
|
||||
}
|
||||
|
||||
/// Front Hall routes for go_router.
|
||||
List<RouteBase> frontHallRoutes() {
|
||||
return [
|
||||
GoRoute(
|
||||
path: FrontHallRoutes.base,
|
||||
name: 'frontHall',
|
||||
pageBuilder: (context, state) =>
|
||||
noTransitionPage(context, state, const FrontHallPage()),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Media Room - media management and playback.
|
||||
///
|
||||
/// Placeholder page for future implementation.
|
||||
class MediaRoomPage extends StatelessWidget {
|
||||
const MediaRoomPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.movie,
|
||||
size: 64,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Media Room',
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Media management and playback - coming soon',
|
||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tatlock_ui/features/media_room/presentation/pages/media_room_page.dart';
|
||||
import 'package:tatlock_ui/routing/app_router.dart';
|
||||
import 'package:tatlock_ui/routing/room_registry.dart';
|
||||
|
||||
/// Route paths for Media Room.
|
||||
abstract class MediaRoomRoutes {
|
||||
static const base = '/media-room';
|
||||
}
|
||||
|
||||
/// Media Room room definition.
|
||||
final mediaRoomRoom = RoomDefinition(
|
||||
id: 'media-room',
|
||||
label: 'Media Room',
|
||||
icon: Icons.movie_outlined,
|
||||
selectedIcon: Icons.movie,
|
||||
defaultRoute: MediaRoomRoutes.base,
|
||||
routes: mediaRoomRoutes,
|
||||
// No permissions required - accessible to all authenticated users
|
||||
);
|
||||
|
||||
/// Register Media Room with the room registry.
|
||||
void registerMediaRoom() {
|
||||
roomRegistry.register(mediaRoomRoom);
|
||||
}
|
||||
|
||||
/// Media Room routes for go_router.
|
||||
List<RouteBase> mediaRoomRoutes() {
|
||||
return [
|
||||
GoRoute(
|
||||
path: MediaRoomRoutes.base,
|
||||
name: 'mediaRoom',
|
||||
pageBuilder: (context, state) =>
|
||||
noTransitionPage(context, state, const MediaRoomPage()),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Parlor - AI chat and automation hub.
|
||||
///
|
||||
/// Placeholder page for future implementation.
|
||||
class ParlorPage extends StatelessWidget {
|
||||
const ParlorPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.lightbulb,
|
||||
size: 64,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Parlor',
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'AI chat and automation hub - coming soon',
|
||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tatlock_ui/features/parlor/presentation/pages/parlor_page.dart';
|
||||
import 'package:tatlock_ui/routing/app_router.dart';
|
||||
import 'package:tatlock_ui/routing/room_registry.dart';
|
||||
|
||||
/// Route paths for Parlor.
|
||||
abstract class ParlorRoutes {
|
||||
static const base = '/parlor';
|
||||
}
|
||||
|
||||
/// Parlor room definition.
|
||||
final parlorRoom = RoomDefinition(
|
||||
id: 'parlor',
|
||||
label: 'Parlor',
|
||||
icon: Icons.lightbulb_outline,
|
||||
selectedIcon: Icons.lightbulb,
|
||||
defaultRoute: ParlorRoutes.base,
|
||||
routes: parlorRoutes,
|
||||
// No permissions required - accessible to all authenticated users
|
||||
);
|
||||
|
||||
/// Register Parlor with the room registry.
|
||||
void registerParlor() {
|
||||
roomRegistry.register(parlorRoom);
|
||||
}
|
||||
|
||||
/// Parlor routes for go_router.
|
||||
List<RouteBase> parlorRoutes() {
|
||||
return [
|
||||
GoRoute(
|
||||
path: ParlorRoutes.base,
|
||||
name: 'parlor',
|
||||
pageBuilder: (context, state) =>
|
||||
noTransitionPage(context, state, const ParlorPage()),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tatlock_ui/features/security/presentation/pages/security_page.dart';
|
||||
import 'package:tatlock_ui/routing/app_router.dart';
|
||||
import 'package:tatlock_ui/routing/room_registry.dart';
|
||||
import 'package:tatlock_ui/shared/layouts/widgets/nav_panel.dart';
|
||||
|
||||
/// Route paths for Security room.
|
||||
@@ -47,6 +48,22 @@ enum SecurityNav {
|
||||
/// Get route path for a nav item.
|
||||
String pathForSecurityNav(SecurityNav nav) => nav.path;
|
||||
|
||||
/// Security room definition.
|
||||
final securityRoom = RoomDefinition(
|
||||
id: 'security',
|
||||
label: 'Security',
|
||||
icon: Icons.security_outlined,
|
||||
selectedIcon: Icons.security,
|
||||
defaultRoute: SecurityRoutes.users,
|
||||
routes: securityRoutes,
|
||||
// No permissions required - accessible to all authenticated users
|
||||
);
|
||||
|
||||
/// Register Security room with the room registry.
|
||||
void registerSecurity() {
|
||||
roomRegistry.register(securityRoom);
|
||||
}
|
||||
|
||||
/// Security room routes for go_router.
|
||||
List<RouteBase> securityRoutes() {
|
||||
return [
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:tatlock_ui/core/auth/auth_provider.dart';
|
||||
import 'package:tatlock_ui/core/theme/theme_provider.dart';
|
||||
import 'package:tatlock_ui/routing/room_registry.dart';
|
||||
|
||||
/// Settings page with user preferences.
|
||||
class SettingsPage extends ConsumerWidget {
|
||||
@@ -129,20 +130,14 @@ class SettingsPage extends ConsumerWidget {
|
||||
_updateDefaultRoom(ref, value);
|
||||
}
|
||||
},
|
||||
items: const [
|
||||
DropdownMenuItem(
|
||||
value: 'front-hall',
|
||||
child: Text('Front Hall'),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: 'control-room',
|
||||
child: Text('Control Room'),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: 'parlor',
|
||||
child: Text('Parlor'),
|
||||
),
|
||||
],
|
||||
items: roomRegistry.all
|
||||
.map(
|
||||
(room) => DropdownMenuItem(
|
||||
value: room.id,
|
||||
child: Text(room.label),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user