Compare commits
2 Commits
e20ea43a85
...
e23969c3e4
| Author | SHA1 | Date | |
|---|---|---|---|
| e23969c3e4 | |||
| 8a12b7e1da |
Binary file not shown.
|
Before Width: | Height: | Size: 138 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 306 KiB |
@ -58,8 +58,8 @@ class _NavigationSidebarState extends State<NavigationSidebar> {
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
_buildMenuItem(
|
_buildMenuItem(
|
||||||
icon: Iconsax.hierarchy_square,
|
icon: Iconsax.hierarchy_square,
|
||||||
title: 'The Architect',
|
title: 'The Architech',
|
||||||
pageId: 'architect',
|
pageId: 'architech',
|
||||||
colorScheme: colorScheme,
|
colorScheme: colorScheme,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
|||||||
@ -3,6 +3,8 @@ import 'package:iconsax/iconsax.dart';
|
|||||||
import 'package:animate_do/animate_do.dart';
|
import 'package:animate_do/animate_do.dart';
|
||||||
import 'package:getwidget/getwidget.dart';
|
import 'package:getwidget/getwidget.dart';
|
||||||
import 'components/navigation_sidebar.dart';
|
import 'components/navigation_sidebar.dart';
|
||||||
|
import 'pages/architech_page.dart';
|
||||||
|
import 'dart:html' as html;
|
||||||
|
|
||||||
class ConsoleLandingPage extends StatefulWidget {
|
class ConsoleLandingPage extends StatefulWidget {
|
||||||
const ConsoleLandingPage({Key? key}) : super(key: key);
|
const ConsoleLandingPage({Key? key}) : super(key: key);
|
||||||
@ -25,10 +27,6 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_currentPage = pageId;
|
_currentPage = pageId;
|
||||||
});
|
});
|
||||||
// Handle page navigation here
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
SnackBar(content: Text('Navigating to: $pageId')),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -153,8 +151,8 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
switch (_currentPage) {
|
switch (_currentPage) {
|
||||||
case 'dashboard':
|
case 'dashboard':
|
||||||
return 'Dashboard';
|
return 'Dashboard';
|
||||||
case 'architect':
|
case 'architech':
|
||||||
return 'The Architect';
|
return 'The Architech';
|
||||||
case 'agents':
|
case 'agents':
|
||||||
return 'AI Agents';
|
return 'AI Agents';
|
||||||
case 'analytics':
|
case 'analytics':
|
||||||
@ -169,6 +167,17 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainContent(ColorScheme colorScheme) {
|
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(
|
return LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
@ -176,69 +185,6 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
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
|
// Status Cards Grid
|
||||||
_buildResponsiveGrid(
|
_buildResponsiveGrid(
|
||||||
constraints.maxWidth,
|
constraints.maxWidth,
|
||||||
@ -249,6 +195,7 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
colorScheme.primary,
|
colorScheme.primary,
|
||||||
Icons.api,
|
Icons.api,
|
||||||
'Active',
|
'Active',
|
||||||
|
url: 'https://localhost:7108/swagger/',
|
||||||
),
|
),
|
||||||
_buildStatusCard(
|
_buildStatusCard(
|
||||||
'Frontend',
|
'Frontend',
|
||||||
@ -336,39 +283,37 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
// Helper method: Build responsive grid
|
// Helper method: Build responsive grid
|
||||||
Widget _buildResponsiveGrid(double width, List<Widget> children) {
|
Widget _buildResponsiveGrid(double width, List<Widget> children) {
|
||||||
int crossAxisCount;
|
int crossAxisCount;
|
||||||
double childAspectRatio;
|
|
||||||
double spacing;
|
double spacing;
|
||||||
|
|
||||||
if (width < 600) {
|
if (width < 600) {
|
||||||
// Mobile: 1 column
|
// Mobile: 1 column
|
||||||
crossAxisCount = 1;
|
crossAxisCount = 1;
|
||||||
childAspectRatio = 1.8;
|
|
||||||
spacing = 12.0;
|
spacing = 12.0;
|
||||||
} else if (width < 900) {
|
} else if (width < 900) {
|
||||||
// Tablet: 2 columns
|
// Tablet: 2 columns
|
||||||
crossAxisCount = 2;
|
crossAxisCount = 2;
|
||||||
childAspectRatio = 1.3;
|
|
||||||
spacing = 16.0;
|
spacing = 16.0;
|
||||||
} else if (width < 1200) {
|
} else if (width < 1200) {
|
||||||
// Small desktop: 3 columns
|
// Small desktop: 3 columns
|
||||||
crossAxisCount = 3;
|
crossAxisCount = 3;
|
||||||
childAspectRatio = 1.1;
|
|
||||||
spacing = 20.0;
|
spacing = 20.0;
|
||||||
} else {
|
} else {
|
||||||
// Large desktop: 3 columns with more space
|
// Large desktop: 3 columns with more space
|
||||||
crossAxisCount = 3;
|
crossAxisCount = 3;
|
||||||
childAspectRatio = 1.3;
|
|
||||||
spacing = 24.0;
|
spacing = 24.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GridView.count(
|
return GridView.builder(
|
||||||
crossAxisCount: crossAxisCount,
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
childAspectRatio: childAspectRatio,
|
crossAxisCount: crossAxisCount,
|
||||||
crossAxisSpacing: spacing,
|
mainAxisExtent: 140,
|
||||||
mainAxisSpacing: spacing,
|
crossAxisSpacing: spacing,
|
||||||
|
mainAxisSpacing: spacing,
|
||||||
|
),
|
||||||
|
itemCount: children.length,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: children,
|
itemBuilder: (context, index) => children[index],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,8 +323,9 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
String subtitle,
|
String subtitle,
|
||||||
Color color,
|
Color color,
|
||||||
IconData icon,
|
IconData icon,
|
||||||
String status,
|
String status, {
|
||||||
) {
|
String? url,
|
||||||
|
}) {
|
||||||
final colorScheme = Theme.of(context).colorScheme;
|
final colorScheme = Theme.of(context).colorScheme;
|
||||||
|
|
||||||
return FadeInUp(
|
return FadeInUp(
|
||||||
@ -408,14 +354,18 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
),
|
),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
GFToast.showToast(
|
if (url != null) {
|
||||||
'$title tapped',
|
html.window.open(url, '_blank');
|
||||||
context,
|
} else {
|
||||||
toastPosition: GFToastPosition.BOTTOM,
|
GFToast.showToast(
|
||||||
textStyle: const TextStyle(fontSize: 14, color: Colors.white),
|
'$title tapped',
|
||||||
backgroundColor: color.withOpacity(0.9),
|
context,
|
||||||
toastDuration: 2,
|
toastPosition: GFToastPosition.BOTTOM,
|
||||||
);
|
textStyle: const TextStyle(fontSize: 14, color: Colors.white),
|
||||||
|
backgroundColor: color.withOpacity(0.9),
|
||||||
|
toastDuration: 2,
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -428,7 +378,7 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(12.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@ -438,13 +388,13 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
children: [
|
children: [
|
||||||
GFAvatar(
|
GFAvatar(
|
||||||
backgroundColor: color.withOpacity(0.3),
|
backgroundColor: color.withOpacity(0.3),
|
||||||
child: Icon(icon, size: 28, color: color),
|
child: Icon(icon, size: 24, color: color),
|
||||||
radius: 26,
|
radius: 22,
|
||||||
shape: GFAvatarShape.standard,
|
shape: GFAvatarShape.standard,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
constraints: const BoxConstraints(minWidth: 100),
|
constraints: const BoxConstraints(minWidth: 90),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color,
|
color: color,
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
@ -454,7 +404,7 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
status,
|
status,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 12,
|
fontSize: 11,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
letterSpacing: 0.5,
|
letterSpacing: 0.5,
|
||||||
),
|
),
|
||||||
@ -463,21 +413,21 @@ class _ConsoleLandingPageState extends State<ConsoleLandingPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 12),
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: colorScheme.onSurface,
|
color: colorScheme.onSurface,
|
||||||
letterSpacing: 0.3,
|
letterSpacing: 0.3,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
subtitle,
|
subtitle,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 13,
|
||||||
color: colorScheme.onSurfaceVariant,
|
color: colorScheme.onSurfaceVariant,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
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