diff --git a/lib/components/navigation_sidebar.dart b/lib/components/navigation_sidebar.dart index cbf71bb..ee77946 100644 --- a/lib/components/navigation_sidebar.dart +++ b/lib/components/navigation_sidebar.dart @@ -58,8 +58,8 @@ class _NavigationSidebarState extends State { const SizedBox(height: 8), _buildMenuItem( icon: Iconsax.hierarchy_square, - title: 'The Architect', - pageId: 'architect', + title: 'The Architech', + pageId: 'architech', colorScheme: colorScheme, ), const SizedBox(height: 8), diff --git a/lib/console_landing_page.dart b/lib/console_landing_page.dart index cb995a2..06f291a 100644 --- a/lib/console_landing_page.dart +++ b/lib/console_landing_page.dart @@ -3,6 +3,8 @@ import 'package:iconsax/iconsax.dart'; import 'package:animate_do/animate_do.dart'; import 'package:getwidget/getwidget.dart'; import 'components/navigation_sidebar.dart'; +import 'pages/architech_page.dart'; +import 'dart:html' as html; class ConsoleLandingPage extends StatefulWidget { const ConsoleLandingPage({Key? key}) : super(key: key); @@ -25,10 +27,6 @@ class _ConsoleLandingPageState extends State { setState(() { _currentPage = pageId; }); - // Handle page navigation here - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Navigating to: $pageId')), - ); } @override @@ -153,8 +151,8 @@ class _ConsoleLandingPageState extends State { switch (_currentPage) { case 'dashboard': return 'Dashboard'; - case 'architect': - return 'The Architect'; + case 'architech': + return 'The Architech'; case 'agents': return 'AI Agents'; case 'analytics': @@ -169,6 +167,17 @@ class _ConsoleLandingPageState extends State { } Widget _buildMainContent(ColorScheme colorScheme) { + // Switch between different pages + switch (_currentPage) { + case 'architech': + return const ArchitechPage(); + case 'dashboard': + default: + return _buildDashboardContent(colorScheme); + } + } + + Widget _buildDashboardContent(ColorScheme colorScheme) { return LayoutBuilder( builder: (context, constraints) { return SingleChildScrollView( @@ -176,69 +185,6 @@ class _ConsoleLandingPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // Page Title - Container( - padding: const EdgeInsets.all(20), - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - colorScheme.primary.withOpacity(0.2), - colorScheme.secondary.withOpacity(0.15), - ], - ), - borderRadius: BorderRadius.circular(16), - border: Border.all( - color: colorScheme.primary.withOpacity(0.5), - width: 1, - ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - padding: const EdgeInsets.all(6), - decoration: BoxDecoration( - color: colorScheme.primary, - borderRadius: BorderRadius.circular(6), - ), - child: const Text( - 'S', - style: TextStyle( - color: Colors.white, - fontSize: 20, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(width: 10), - Text( - 'Svrnty Console', - style: TextStyle( - fontSize: 28, - fontWeight: FontWeight.bold, - color: colorScheme.onSurface, - ), - ), - ], - ), - const SizedBox(height: 8), - Text( - 'sovereign AI solutions • 30 October 2025', - style: TextStyle( - fontSize: 14, - color: colorScheme.onSurfaceVariant, - fontFamily: 'Montserrat', - ), - ), - ], - ), - ), - const SizedBox(height: 28), - // Status Cards Grid _buildResponsiveGrid( constraints.maxWidth, @@ -249,6 +195,7 @@ class _ConsoleLandingPageState extends State { colorScheme.primary, Icons.api, 'Active', + url: 'https://localhost:7108/swagger/', ), _buildStatusCard( 'Frontend', @@ -376,8 +323,9 @@ class _ConsoleLandingPageState extends State { String subtitle, Color color, IconData icon, - String status, - ) { + String status, { + String? url, + }) { final colorScheme = Theme.of(context).colorScheme; return FadeInUp( @@ -406,14 +354,18 @@ class _ConsoleLandingPageState extends State { ), child: InkWell( onTap: () { - GFToast.showToast( - '$title tapped', - context, - toastPosition: GFToastPosition.BOTTOM, - textStyle: const TextStyle(fontSize: 14, color: Colors.white), - backgroundColor: color.withOpacity(0.9), - toastDuration: 2, - ); + if (url != null) { + html.window.open(url, '_blank'); + } else { + GFToast.showToast( + '$title tapped', + context, + toastPosition: GFToastPosition.BOTTOM, + textStyle: const TextStyle(fontSize: 14, color: Colors.white), + backgroundColor: color.withOpacity(0.9), + toastDuration: 2, + ); + } }, borderRadius: BorderRadius.circular(16), child: Container( diff --git a/lib/pages/architech_page.dart b/lib/pages/architech_page.dart new file mode 100644 index 0000000..057eaed --- /dev/null +++ b/lib/pages/architech_page.dart @@ -0,0 +1,101 @@ +import 'package:flutter/material.dart'; +import 'package:iconsax/iconsax.dart'; +import 'package:animate_do/animate_do.dart'; + +class ArchitechPage extends StatelessWidget { + const ArchitechPage({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final colorScheme = Theme.of(context).colorScheme; + + return SingleChildScrollView( + padding: const EdgeInsets.all(32.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Empty State Content + FadeInUp( + duration: const Duration(milliseconds: 600), + child: Center( + child: Container( + constraints: const BoxConstraints(maxWidth: 600), + padding: const EdgeInsets.all(48), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + padding: const EdgeInsets.all(32), + decoration: BoxDecoration( + color: colorScheme.surfaceContainerHighest, + shape: BoxShape.circle, + ), + child: Icon( + Iconsax.hierarchy_square, + size: 80, + color: colorScheme.primary.withOpacity(0.5), + ), + ), + const SizedBox(height: 32), + Text( + 'Coming Soon', + style: TextStyle( + fontSize: 32, + fontWeight: FontWeight.bold, + color: colorScheme.onSurface, + ), + ), + const SizedBox(height: 16), + Text( + 'The Architech module is currently under development. This powerful tool will allow you to design, visualize, and manage your AI infrastructure with ease.', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + color: colorScheme.onSurfaceVariant, + height: 1.5, + ), + ), + const SizedBox(height: 32), + Container( + padding: const EdgeInsets.symmetric( + horizontal: 24, + vertical: 12, + ), + decoration: BoxDecoration( + color: colorScheme.primary.withOpacity(0.1), + borderRadius: BorderRadius.circular(12), + border: Border.all( + color: colorScheme.primary.withOpacity(0.3), + width: 1, + ), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + Iconsax.info_circle, + color: colorScheme.primary, + size: 20, + ), + const SizedBox(width: 12), + Text( + 'Stay tuned for updates', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: colorScheme.primary, + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), + ], + ), + ); + } +}