Button working
This commit is contained in:
parent
8a12b7e1da
commit
e23969c3e4
@ -58,8 +58,8 @@ class _NavigationSidebarState extends State<NavigationSidebar> {
|
||||
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),
|
||||
|
||||
@ -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<ConsoleLandingPage> {
|
||||
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<ConsoleLandingPage> {
|
||||
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<ConsoleLandingPage> {
|
||||
}
|
||||
|
||||
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<ConsoleLandingPage> {
|
||||
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<ConsoleLandingPage> {
|
||||
colorScheme.primary,
|
||||
Icons.api,
|
||||
'Active',
|
||||
url: 'https://localhost:7108/swagger/',
|
||||
),
|
||||
_buildStatusCard(
|
||||
'Frontend',
|
||||
@ -376,8 +323,9 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
||||
String subtitle,
|
||||
Color color,
|
||||
IconData icon,
|
||||
String status,
|
||||
) {
|
||||
String status, {
|
||||
String? url,
|
||||
}) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
return FadeInUp(
|
||||
@ -406,6 +354,9 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
if (url != null) {
|
||||
html.window.open(url, '_blank');
|
||||
} else {
|
||||
GFToast.showToast(
|
||||
'$title tapped',
|
||||
context,
|
||||
@ -414,6 +365,7 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
||||
backgroundColor: color.withOpacity(0.9),
|
||||
toastDuration: 2,
|
||||
);
|
||||
}
|
||||
},
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Container(
|
||||
|
||||
101
lib/pages/architech_page.dart
Normal file
101
lib/pages/architech_page.dart
Normal file
@ -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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user