AI Agent commited on
Commit ·
60367a0
1
Parent(s): 6c7ab33
Add matplotlib, light mode, and fixes
Browse files- backend/requirements.txt +1 -0
- frontend/src/App.jsx +5 -2
- frontend/src/components/Layout.jsx +9 -2
- frontend/src/index.css +301 -94
- frontend/src/store/index.js +7 -2
backend/requirements.txt
CHANGED
|
@@ -9,3 +9,4 @@ scipy>=1.11.0
|
|
| 9 |
numpy>=1.24.0
|
| 10 |
pydantic>=2.0.0
|
| 11 |
jinja2>=3.1.2
|
|
|
|
|
|
| 9 |
numpy>=1.24.0
|
| 10 |
pydantic>=2.0.0
|
| 11 |
jinja2>=3.1.2
|
| 12 |
+
matplotlib>=3.7.0
|
frontend/src/App.jsx
CHANGED
|
@@ -6,14 +6,17 @@ import Dashboard from './pages/Dashboard';
|
|
| 6 |
import Quantizer from './pages/Quantizer';
|
| 7 |
import Analysis from './pages/Analysis';
|
| 8 |
import ModelLoader from './pages/ModelLoader';
|
| 9 |
-
import { useSystemStore } from './store';
|
| 10 |
import './index.css';
|
| 11 |
|
| 12 |
function App() {
|
| 13 |
const fetchSystemInfo = useSystemStore((state) => state.fetchSystemInfo);
|
|
|
|
| 14 |
|
| 15 |
useEffect(() => {
|
| 16 |
-
//
|
|
|
|
|
|
|
| 17 |
fetchSystemInfo();
|
| 18 |
|
| 19 |
const handleOffline = () => toast.error("Internet connection lost");
|
|
|
|
| 6 |
import Quantizer from './pages/Quantizer';
|
| 7 |
import Analysis from './pages/Analysis';
|
| 8 |
import ModelLoader from './pages/ModelLoader';
|
| 9 |
+
import { useSystemStore, useUIStore } from './store';
|
| 10 |
import './index.css';
|
| 11 |
|
| 12 |
function App() {
|
| 13 |
const fetchSystemInfo = useSystemStore((state) => state.fetchSystemInfo);
|
| 14 |
+
const theme = useUIStore((state) => state.theme);
|
| 15 |
|
| 16 |
useEffect(() => {
|
| 17 |
+
// Sync theme on mount
|
| 18 |
+
document.documentElement.setAttribute('data-theme', theme);
|
| 19 |
+
// Fetch system info
|
| 20 |
fetchSystemInfo();
|
| 21 |
|
| 22 |
const handleOffline = () => toast.error("Internet connection lost");
|
frontend/src/components/Layout.jsx
CHANGED
|
@@ -10,7 +10,9 @@ import {
|
|
| 10 |
Zap,
|
| 11 |
Github,
|
| 12 |
Menu,
|
| 13 |
-
X
|
|
|
|
|
|
|
| 14 |
} from 'lucide-react';
|
| 15 |
import { useSystemStore, useUIStore, useModelStore } from '../store';
|
| 16 |
import { motion, AnimatePresence } from 'framer-motion';
|
|
@@ -19,7 +21,7 @@ import { motion, AnimatePresence } from 'framer-motion';
|
|
| 19 |
* Main application layout with sidebar navigation
|
| 20 |
*/
|
| 21 |
export default function Layout() {
|
| 22 |
-
const { sidebarOpen, toggleSidebar } = useUIStore();
|
| 23 |
const systemInfo = useSystemStore((state) => state.systemInfo);
|
| 24 |
const checkLoadedModel = useModelStore((state) => state.checkLoadedModel);
|
| 25 |
const location = useLocation();
|
|
@@ -106,6 +108,11 @@ export default function Layout() {
|
|
| 106 |
)}
|
| 107 |
</div>
|
| 108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
<a
|
| 110 |
href="https://github.com"
|
| 111 |
target="_blank"
|
|
|
|
| 10 |
Zap,
|
| 11 |
Github,
|
| 12 |
Menu,
|
| 13 |
+
X,
|
| 14 |
+
Sun,
|
| 15 |
+
Moon
|
| 16 |
} from 'lucide-react';
|
| 17 |
import { useSystemStore, useUIStore, useModelStore } from '../store';
|
| 18 |
import { motion, AnimatePresence } from 'framer-motion';
|
|
|
|
| 21 |
* Main application layout with sidebar navigation
|
| 22 |
*/
|
| 23 |
export default function Layout() {
|
| 24 |
+
const { sidebarOpen, toggleSidebar, theme, toggleTheme } = useUIStore();
|
| 25 |
const systemInfo = useSystemStore((state) => state.systemInfo);
|
| 26 |
const checkLoadedModel = useModelStore((state) => state.checkLoadedModel);
|
| 27 |
const location = useLocation();
|
|
|
|
| 108 |
)}
|
| 109 |
</div>
|
| 110 |
|
| 111 |
+
<button className="nav-item w-full" onClick={toggleTheme}>
|
| 112 |
+
{theme === 'dark' ? <Sun size={20} /> : <Moon size={20} />}
|
| 113 |
+
<span>{theme === 'dark' ? 'Light Mode' : 'Dark Mode'}</span>
|
| 114 |
+
</button>
|
| 115 |
+
|
| 116 |
<a
|
| 117 |
href="https://github.com"
|
| 118 |
target="_blank"
|
frontend/src/index.css
CHANGED
|
@@ -6,25 +6,26 @@
|
|
| 6 |
/* ============================================
|
| 7 |
CSS Variables - Design Tokens
|
| 8 |
============================================ */
|
|
|
|
| 9 |
:root {
|
| 10 |
/* Colors - Dark Theme */
|
| 11 |
--color-bg-primary: #0a0a0f;
|
| 12 |
--color-bg-secondary: #12121a;
|
| 13 |
--color-bg-tertiary: #1a1a25;
|
| 14 |
--color-bg-elevated: #22222f;
|
| 15 |
-
|
| 16 |
/* Glass effect backgrounds */
|
| 17 |
--glass-bg: rgba(255, 255, 255, 0.03);
|
| 18 |
--glass-bg-hover: rgba(255, 255, 255, 0.06);
|
| 19 |
--glass-border: rgba(255, 255, 255, 0.08);
|
| 20 |
--glass-border-hover: rgba(255, 255, 255, 0.15);
|
| 21 |
-
|
| 22 |
/* Accent colors */
|
| 23 |
--color-accent-primary: #6366f1;
|
| 24 |
--color-accent-secondary: #8b5cf6;
|
| 25 |
--color-accent-tertiary: #a855f7;
|
| 26 |
--color-accent-glow: rgba(99, 102, 241, 0.3);
|
| 27 |
-
|
| 28 |
/* Status colors */
|
| 29 |
--color-success: #10b981;
|
| 30 |
--color-success-bg: rgba(16, 185, 129, 0.1);
|
|
@@ -34,22 +35,22 @@
|
|
| 34 |
--color-error-bg: rgba(239, 68, 68, 0.1);
|
| 35 |
--color-info: #06b6d4;
|
| 36 |
--color-info-bg: rgba(6, 182, 212, 0.1);
|
| 37 |
-
|
| 38 |
/* Text colors */
|
| 39 |
--text-primary: #f8fafc;
|
| 40 |
--text-secondary: #94a3b8;
|
| 41 |
--text-tertiary: #64748b;
|
| 42 |
--text-muted: #475569;
|
| 43 |
-
|
| 44 |
/* Gradients */
|
| 45 |
--gradient-primary: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
|
| 46 |
--gradient-secondary: linear-gradient(135deg, var(--color-accent-secondary) 0%, var(--color-accent-tertiary) 100%);
|
| 47 |
--gradient-glow: radial-gradient(ellipse at center, var(--color-accent-glow) 0%, transparent 70%);
|
| 48 |
-
--gradient-mesh: radial-gradient(at 40% 20%, hsla(228,100%,74%,0.15) 0px, transparent 50%),
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
/* Spacing */
|
| 54 |
--space-xs: 0.25rem;
|
| 55 |
--space-sm: 0.5rem;
|
|
@@ -58,7 +59,7 @@
|
|
| 58 |
--space-xl: 2rem;
|
| 59 |
--space-2xl: 3rem;
|
| 60 |
--space-3xl: 4rem;
|
| 61 |
-
|
| 62 |
/* Border radius */
|
| 63 |
--radius-sm: 0.375rem;
|
| 64 |
--radius-md: 0.5rem;
|
|
@@ -66,18 +67,18 @@
|
|
| 66 |
--radius-xl: 1rem;
|
| 67 |
--radius-2xl: 1.5rem;
|
| 68 |
--radius-full: 9999px;
|
| 69 |
-
|
| 70 |
/* Shadows */
|
| 71 |
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
|
| 72 |
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
|
| 73 |
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
|
| 74 |
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
|
| 75 |
--shadow-glow: 0 0 40px var(--color-accent-glow);
|
| 76 |
-
|
| 77 |
/* Typography */
|
| 78 |
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 79 |
--font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
|
| 80 |
-
|
| 81 |
--text-xs: 0.75rem;
|
| 82 |
--text-sm: 0.875rem;
|
| 83 |
--text-base: 1rem;
|
|
@@ -86,23 +87,60 @@
|
|
| 86 |
--text-2xl: 1.5rem;
|
| 87 |
--text-3xl: 1.875rem;
|
| 88 |
--text-4xl: 2.25rem;
|
| 89 |
-
|
| 90 |
/* Transitions */
|
| 91 |
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
| 92 |
--transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
| 93 |
--transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
| 94 |
--transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
| 95 |
-
|
| 96 |
/* Layout */
|
| 97 |
--sidebar-width: 280px;
|
| 98 |
--header-height: 64px;
|
| 99 |
--max-content-width: 1400px;
|
| 100 |
}
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
/* ============================================
|
| 103 |
Base Styles
|
| 104 |
============================================ */
|
| 105 |
-
*,
|
|
|
|
|
|
|
| 106 |
box-sizing: border-box;
|
| 107 |
margin: 0;
|
| 108 |
padding: 0;
|
|
@@ -145,18 +183,40 @@ body::before {
|
|
| 145 |
/* ============================================
|
| 146 |
Typography
|
| 147 |
============================================ */
|
| 148 |
-
h1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
font-weight: 600;
|
| 150 |
line-height: 1.3;
|
| 151 |
color: var(--text-primary);
|
| 152 |
}
|
| 153 |
|
| 154 |
-
h1 {
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
|
| 161 |
p {
|
| 162 |
color: var(--text-secondary);
|
|
@@ -447,26 +507,43 @@ code {
|
|
| 447 |
gap: var(--space-lg);
|
| 448 |
}
|
| 449 |
|
| 450 |
-
.grid-2 {
|
| 451 |
-
|
| 452 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 453 |
|
| 454 |
@media (max-width: 1024px) {
|
| 455 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 456 |
}
|
| 457 |
|
| 458 |
@media (max-width: 768px) {
|
| 459 |
-
|
| 460 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 461 |
.sidebar {
|
| 462 |
transform: translateX(-100%);
|
| 463 |
transition: transform var(--transition-base);
|
| 464 |
}
|
| 465 |
-
|
| 466 |
.sidebar.open {
|
| 467 |
transform: translateX(0);
|
| 468 |
}
|
| 469 |
-
|
| 470 |
.main-content {
|
| 471 |
margin-left: 0;
|
| 472 |
max-width: 100vw;
|
|
@@ -503,8 +580,13 @@ code {
|
|
| 503 |
gap: var(--space-xs);
|
| 504 |
}
|
| 505 |
|
| 506 |
-
.stat-change.positive {
|
| 507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 508 |
|
| 509 |
/* ============================================
|
| 510 |
Progress Bar
|
|
@@ -581,20 +663,23 @@ code {
|
|
| 581 |
Loading States
|
| 582 |
============================================ */
|
| 583 |
.skeleton {
|
| 584 |
-
background: linear-gradient(
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
var(--glass-bg) 75%
|
| 589 |
-
);
|
| 590 |
background-size: 200% 100%;
|
| 591 |
animation: shimmer 1.5s infinite;
|
| 592 |
border-radius: var(--radius-md);
|
| 593 |
}
|
| 594 |
|
| 595 |
@keyframes shimmer {
|
| 596 |
-
0% {
|
| 597 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 598 |
}
|
| 599 |
|
| 600 |
.spinner {
|
|
@@ -607,7 +692,9 @@ code {
|
|
| 607 |
}
|
| 608 |
|
| 609 |
@keyframes spin {
|
| 610 |
-
to {
|
|
|
|
|
|
|
| 611 |
}
|
| 612 |
|
| 613 |
/* ============================================
|
|
@@ -643,8 +730,13 @@ code {
|
|
| 643 |
Animations
|
| 644 |
============================================ */
|
| 645 |
@keyframes fadeIn {
|
| 646 |
-
from {
|
| 647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 648 |
}
|
| 649 |
|
| 650 |
@keyframes slideUp {
|
|
@@ -652,6 +744,7 @@ code {
|
|
| 652 |
opacity: 0;
|
| 653 |
transform: translateY(20px);
|
| 654 |
}
|
|
|
|
| 655 |
to {
|
| 656 |
opacity: 1;
|
| 657 |
transform: translateY(0);
|
|
@@ -663,28 +756,54 @@ code {
|
|
| 663 |
opacity: 0;
|
| 664 |
transform: scale(0.95);
|
| 665 |
}
|
|
|
|
| 666 |
to {
|
| 667 |
opacity: 1;
|
| 668 |
transform: scale(1);
|
| 669 |
}
|
| 670 |
}
|
| 671 |
|
| 672 |
-
.animate-fade-in {
|
| 673 |
-
|
| 674 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 675 |
|
| 676 |
/* Staggered animations */
|
| 677 |
-
.stagger
|
| 678 |
animation: slideUp var(--transition-slow) ease-out forwards;
|
| 679 |
opacity: 0;
|
| 680 |
}
|
| 681 |
|
| 682 |
-
.stagger
|
| 683 |
-
|
| 684 |
-
|
| 685 |
-
|
| 686 |
-
.stagger
|
| 687 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 688 |
|
| 689 |
/* ============================================
|
| 690 |
Scrollbar Styles
|
|
@@ -710,42 +829,130 @@ code {
|
|
| 710 |
/* ============================================
|
| 711 |
Utility Classes
|
| 712 |
============================================ */
|
| 713 |
-
.text-center {
|
| 714 |
-
|
| 715 |
-
|
| 716 |
-
|
| 717 |
-
.text-
|
| 718 |
-
|
| 719 |
-
|
| 720 |
-
|
| 721 |
-
.
|
| 722 |
-
|
| 723 |
-
|
| 724 |
-
|
| 725 |
-
.
|
| 726 |
-
|
| 727 |
-
|
| 728 |
-
|
| 729 |
-
.
|
| 730 |
-
|
| 731 |
-
|
| 732 |
-
|
| 733 |
-
.
|
| 734 |
-
|
| 735 |
-
|
| 736 |
-
|
| 737 |
-
.
|
| 738 |
-
|
| 739 |
-
|
| 740 |
-
|
| 741 |
-
|
| 742 |
-
|
| 743 |
-
|
| 744 |
-
|
| 745 |
-
.
|
| 746 |
-
|
| 747 |
-
|
| 748 |
-
|
| 749 |
-
.
|
| 750 |
-
|
| 751 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
/* ============================================
|
| 7 |
CSS Variables - Design Tokens
|
| 8 |
============================================ */
|
| 9 |
+
/* Dark Theme (Default) */
|
| 10 |
:root {
|
| 11 |
/* Colors - Dark Theme */
|
| 12 |
--color-bg-primary: #0a0a0f;
|
| 13 |
--color-bg-secondary: #12121a;
|
| 14 |
--color-bg-tertiary: #1a1a25;
|
| 15 |
--color-bg-elevated: #22222f;
|
| 16 |
+
|
| 17 |
/* Glass effect backgrounds */
|
| 18 |
--glass-bg: rgba(255, 255, 255, 0.03);
|
| 19 |
--glass-bg-hover: rgba(255, 255, 255, 0.06);
|
| 20 |
--glass-border: rgba(255, 255, 255, 0.08);
|
| 21 |
--glass-border-hover: rgba(255, 255, 255, 0.15);
|
| 22 |
+
|
| 23 |
/* Accent colors */
|
| 24 |
--color-accent-primary: #6366f1;
|
| 25 |
--color-accent-secondary: #8b5cf6;
|
| 26 |
--color-accent-tertiary: #a855f7;
|
| 27 |
--color-accent-glow: rgba(99, 102, 241, 0.3);
|
| 28 |
+
|
| 29 |
/* Status colors */
|
| 30 |
--color-success: #10b981;
|
| 31 |
--color-success-bg: rgba(16, 185, 129, 0.1);
|
|
|
|
| 35 |
--color-error-bg: rgba(239, 68, 68, 0.1);
|
| 36 |
--color-info: #06b6d4;
|
| 37 |
--color-info-bg: rgba(6, 182, 212, 0.1);
|
| 38 |
+
|
| 39 |
/* Text colors */
|
| 40 |
--text-primary: #f8fafc;
|
| 41 |
--text-secondary: #94a3b8;
|
| 42 |
--text-tertiary: #64748b;
|
| 43 |
--text-muted: #475569;
|
| 44 |
+
|
| 45 |
/* Gradients */
|
| 46 |
--gradient-primary: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
|
| 47 |
--gradient-secondary: linear-gradient(135deg, var(--color-accent-secondary) 0%, var(--color-accent-tertiary) 100%);
|
| 48 |
--gradient-glow: radial-gradient(ellipse at center, var(--color-accent-glow) 0%, transparent 70%);
|
| 49 |
+
--gradient-mesh: radial-gradient(at 40% 20%, hsla(228, 100%, 74%, 0.15) 0px, transparent 50%),
|
| 50 |
+
radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.1) 0px, transparent 50%),
|
| 51 |
+
radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 0.05) 0px, transparent 50%),
|
| 52 |
+
radial-gradient(at 80% 50%, hsla(340, 100%, 76%, 0.1) 0px, transparent 50%);
|
| 53 |
+
|
| 54 |
/* Spacing */
|
| 55 |
--space-xs: 0.25rem;
|
| 56 |
--space-sm: 0.5rem;
|
|
|
|
| 59 |
--space-xl: 2rem;
|
| 60 |
--space-2xl: 3rem;
|
| 61 |
--space-3xl: 4rem;
|
| 62 |
+
|
| 63 |
/* Border radius */
|
| 64 |
--radius-sm: 0.375rem;
|
| 65 |
--radius-md: 0.5rem;
|
|
|
|
| 67 |
--radius-xl: 1rem;
|
| 68 |
--radius-2xl: 1.5rem;
|
| 69 |
--radius-full: 9999px;
|
| 70 |
+
|
| 71 |
/* Shadows */
|
| 72 |
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
|
| 73 |
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
|
| 74 |
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
|
| 75 |
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
|
| 76 |
--shadow-glow: 0 0 40px var(--color-accent-glow);
|
| 77 |
+
|
| 78 |
/* Typography */
|
| 79 |
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 80 |
--font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
|
| 81 |
+
|
| 82 |
--text-xs: 0.75rem;
|
| 83 |
--text-sm: 0.875rem;
|
| 84 |
--text-base: 1rem;
|
|
|
|
| 87 |
--text-2xl: 1.5rem;
|
| 88 |
--text-3xl: 1.875rem;
|
| 89 |
--text-4xl: 2.25rem;
|
| 90 |
+
|
| 91 |
/* Transitions */
|
| 92 |
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
| 93 |
--transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
| 94 |
--transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
| 95 |
--transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
| 96 |
+
|
| 97 |
/* Layout */
|
| 98 |
--sidebar-width: 280px;
|
| 99 |
--header-height: 64px;
|
| 100 |
--max-content-width: 1400px;
|
| 101 |
}
|
| 102 |
|
| 103 |
+
/* Light Theme */
|
| 104 |
+
[data-theme="light"] {
|
| 105 |
+
/* Colors - Light Theme */
|
| 106 |
+
--color-bg-primary: #f8fafc;
|
| 107 |
+
--color-bg-secondary: #ffffff;
|
| 108 |
+
--color-bg-tertiary: #f1f5f9;
|
| 109 |
+
--color-bg-elevated: #e2e8f0;
|
| 110 |
+
|
| 111 |
+
/* Glass effect backgrounds - Frosty */
|
| 112 |
+
--glass-bg: rgba(255, 255, 255, 0.7);
|
| 113 |
+
--glass-bg-hover: rgba(255, 255, 255, 0.85);
|
| 114 |
+
--glass-border: rgba(0, 0, 0, 0.06);
|
| 115 |
+
--glass-border-hover: rgba(0, 0, 0, 0.12);
|
| 116 |
+
|
| 117 |
+
/* Text colors */
|
| 118 |
+
--text-primary: #0f172a;
|
| 119 |
+
--text-secondary: #475569;
|
| 120 |
+
--text-tertiary: #64748b;
|
| 121 |
+
--text-muted: #94a3b8;
|
| 122 |
+
|
| 123 |
+
/* Gradient tweaks for light mode */
|
| 124 |
+
--color-accent-glow: rgba(99, 102, 241, 0.15);
|
| 125 |
+
|
| 126 |
+
--gradient-mesh: radial-gradient(at 40% 20%, hsla(228, 100%, 74%, 0.10) 0px, transparent 50%),
|
| 127 |
+
radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.08) 0px, transparent 50%),
|
| 128 |
+
radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 0.08) 0px, transparent 50%),
|
| 129 |
+
radial-gradient(at 80% 50%, hsla(340, 100%, 76%, 0.05) 0px, transparent 50%);
|
| 130 |
+
|
| 131 |
+
/* Adjust shadows for light mode */
|
| 132 |
+
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
| 133 |
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
|
| 134 |
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
|
| 135 |
+
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
/* ============================================
|
| 139 |
Base Styles
|
| 140 |
============================================ */
|
| 141 |
+
*,
|
| 142 |
+
*::before,
|
| 143 |
+
*::after {
|
| 144 |
box-sizing: border-box;
|
| 145 |
margin: 0;
|
| 146 |
padding: 0;
|
|
|
|
| 183 |
/* ============================================
|
| 184 |
Typography
|
| 185 |
============================================ */
|
| 186 |
+
h1,
|
| 187 |
+
h2,
|
| 188 |
+
h3,
|
| 189 |
+
h4,
|
| 190 |
+
h5,
|
| 191 |
+
h6 {
|
| 192 |
font-weight: 600;
|
| 193 |
line-height: 1.3;
|
| 194 |
color: var(--text-primary);
|
| 195 |
}
|
| 196 |
|
| 197 |
+
h1 {
|
| 198 |
+
font-size: var(--text-4xl);
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
h2 {
|
| 202 |
+
font-size: var(--text-3xl);
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
h3 {
|
| 206 |
+
font-size: var(--text-2xl);
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
h4 {
|
| 210 |
+
font-size: var(--text-xl);
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
h5 {
|
| 214 |
+
font-size: var(--text-lg);
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
h6 {
|
| 218 |
+
font-size: var(--text-base);
|
| 219 |
+
}
|
| 220 |
|
| 221 |
p {
|
| 222 |
color: var(--text-secondary);
|
|
|
|
| 507 |
gap: var(--space-lg);
|
| 508 |
}
|
| 509 |
|
| 510 |
+
.grid-2 {
|
| 511 |
+
grid-template-columns: repeat(2, 1fr);
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
.grid-3 {
|
| 515 |
+
grid-template-columns: repeat(3, 1fr);
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
.grid-4 {
|
| 519 |
+
grid-template-columns: repeat(4, 1fr);
|
| 520 |
+
}
|
| 521 |
|
| 522 |
@media (max-width: 1024px) {
|
| 523 |
+
|
| 524 |
+
.grid-3,
|
| 525 |
+
.grid-4 {
|
| 526 |
+
grid-template-columns: repeat(2, 1fr);
|
| 527 |
+
}
|
| 528 |
}
|
| 529 |
|
| 530 |
@media (max-width: 768px) {
|
| 531 |
+
|
| 532 |
+
.grid-2,
|
| 533 |
+
.grid-3,
|
| 534 |
+
.grid-4 {
|
| 535 |
+
grid-template-columns: 1fr;
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
.sidebar {
|
| 539 |
transform: translateX(-100%);
|
| 540 |
transition: transform var(--transition-base);
|
| 541 |
}
|
| 542 |
+
|
| 543 |
.sidebar.open {
|
| 544 |
transform: translateX(0);
|
| 545 |
}
|
| 546 |
+
|
| 547 |
.main-content {
|
| 548 |
margin-left: 0;
|
| 549 |
max-width: 100vw;
|
|
|
|
| 580 |
gap: var(--space-xs);
|
| 581 |
}
|
| 582 |
|
| 583 |
+
.stat-change.positive {
|
| 584 |
+
color: var(--color-success);
|
| 585 |
+
}
|
| 586 |
+
|
| 587 |
+
.stat-change.negative {
|
| 588 |
+
color: var(--color-error);
|
| 589 |
+
}
|
| 590 |
|
| 591 |
/* ============================================
|
| 592 |
Progress Bar
|
|
|
|
| 663 |
Loading States
|
| 664 |
============================================ */
|
| 665 |
.skeleton {
|
| 666 |
+
background: linear-gradient(90deg,
|
| 667 |
+
var(--glass-bg) 25%,
|
| 668 |
+
var(--glass-bg-hover) 50%,
|
| 669 |
+
var(--glass-bg) 75%);
|
|
|
|
|
|
|
| 670 |
background-size: 200% 100%;
|
| 671 |
animation: shimmer 1.5s infinite;
|
| 672 |
border-radius: var(--radius-md);
|
| 673 |
}
|
| 674 |
|
| 675 |
@keyframes shimmer {
|
| 676 |
+
0% {
|
| 677 |
+
background-position: 200% 0;
|
| 678 |
+
}
|
| 679 |
+
|
| 680 |
+
100% {
|
| 681 |
+
background-position: -200% 0;
|
| 682 |
+
}
|
| 683 |
}
|
| 684 |
|
| 685 |
.spinner {
|
|
|
|
| 692 |
}
|
| 693 |
|
| 694 |
@keyframes spin {
|
| 695 |
+
to {
|
| 696 |
+
transform: rotate(360deg);
|
| 697 |
+
}
|
| 698 |
}
|
| 699 |
|
| 700 |
/* ============================================
|
|
|
|
| 730 |
Animations
|
| 731 |
============================================ */
|
| 732 |
@keyframes fadeIn {
|
| 733 |
+
from {
|
| 734 |
+
opacity: 0;
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
to {
|
| 738 |
+
opacity: 1;
|
| 739 |
+
}
|
| 740 |
}
|
| 741 |
|
| 742 |
@keyframes slideUp {
|
|
|
|
| 744 |
opacity: 0;
|
| 745 |
transform: translateY(20px);
|
| 746 |
}
|
| 747 |
+
|
| 748 |
to {
|
| 749 |
opacity: 1;
|
| 750 |
transform: translateY(0);
|
|
|
|
| 756 |
opacity: 0;
|
| 757 |
transform: scale(0.95);
|
| 758 |
}
|
| 759 |
+
|
| 760 |
to {
|
| 761 |
opacity: 1;
|
| 762 |
transform: scale(1);
|
| 763 |
}
|
| 764 |
}
|
| 765 |
|
| 766 |
+
.animate-fade-in {
|
| 767 |
+
animation: fadeIn var(--transition-slow) ease-out;
|
| 768 |
+
}
|
| 769 |
+
|
| 770 |
+
.animate-slide-up {
|
| 771 |
+
animation: slideUp var(--transition-slow) ease-out;
|
| 772 |
+
}
|
| 773 |
+
|
| 774 |
+
.animate-scale-in {
|
| 775 |
+
animation: scaleIn var(--transition-spring) ease-out;
|
| 776 |
+
}
|
| 777 |
|
| 778 |
/* Staggered animations */
|
| 779 |
+
.stagger>* {
|
| 780 |
animation: slideUp var(--transition-slow) ease-out forwards;
|
| 781 |
opacity: 0;
|
| 782 |
}
|
| 783 |
|
| 784 |
+
.stagger>*:nth-child(1) {
|
| 785 |
+
animation-delay: 0ms;
|
| 786 |
+
}
|
| 787 |
+
|
| 788 |
+
.stagger>*:nth-child(2) {
|
| 789 |
+
animation-delay: 50ms;
|
| 790 |
+
}
|
| 791 |
+
|
| 792 |
+
.stagger>*:nth-child(3) {
|
| 793 |
+
animation-delay: 100ms;
|
| 794 |
+
}
|
| 795 |
+
|
| 796 |
+
.stagger>*:nth-child(4) {
|
| 797 |
+
animation-delay: 150ms;
|
| 798 |
+
}
|
| 799 |
+
|
| 800 |
+
.stagger>*:nth-child(5) {
|
| 801 |
+
animation-delay: 200ms;
|
| 802 |
+
}
|
| 803 |
+
|
| 804 |
+
.stagger>*:nth-child(6) {
|
| 805 |
+
animation-delay: 250ms;
|
| 806 |
+
}
|
| 807 |
|
| 808 |
/* ============================================
|
| 809 |
Scrollbar Styles
|
|
|
|
| 829 |
/* ============================================
|
| 830 |
Utility Classes
|
| 831 |
============================================ */
|
| 832 |
+
.text-center {
|
| 833 |
+
text-align: center;
|
| 834 |
+
}
|
| 835 |
+
|
| 836 |
+
.text-right {
|
| 837 |
+
text-align: right;
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
+
.text-sm {
|
| 841 |
+
font-size: var(--text-sm);
|
| 842 |
+
}
|
| 843 |
+
|
| 844 |
+
.text-xs {
|
| 845 |
+
font-size: var(--text-xs);
|
| 846 |
+
}
|
| 847 |
+
|
| 848 |
+
.text-muted {
|
| 849 |
+
color: var(--text-secondary);
|
| 850 |
+
}
|
| 851 |
+
|
| 852 |
+
.text-accent {
|
| 853 |
+
color: var(--color-accent-primary);
|
| 854 |
+
}
|
| 855 |
+
|
| 856 |
+
.flex {
|
| 857 |
+
display: flex;
|
| 858 |
+
}
|
| 859 |
+
|
| 860 |
+
.flex-col {
|
| 861 |
+
flex-direction: column;
|
| 862 |
+
}
|
| 863 |
+
|
| 864 |
+
.items-center {
|
| 865 |
+
align-items: center;
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
.justify-between {
|
| 869 |
+
justify-content: space-between;
|
| 870 |
+
}
|
| 871 |
+
|
| 872 |
+
.justify-center {
|
| 873 |
+
justify-content: center;
|
| 874 |
+
}
|
| 875 |
+
|
| 876 |
+
.gap-sm {
|
| 877 |
+
gap: var(--space-sm);
|
| 878 |
+
}
|
| 879 |
+
|
| 880 |
+
.gap-md {
|
| 881 |
+
gap: var(--space-md);
|
| 882 |
+
}
|
| 883 |
+
|
| 884 |
+
.gap-lg {
|
| 885 |
+
gap: var(--space-lg);
|
| 886 |
+
}
|
| 887 |
+
|
| 888 |
+
.mt-sm {
|
| 889 |
+
margin-top: var(--space-sm);
|
| 890 |
+
}
|
| 891 |
+
|
| 892 |
+
.mt-md {
|
| 893 |
+
margin-top: var(--space-md);
|
| 894 |
+
}
|
| 895 |
+
|
| 896 |
+
.mt-lg {
|
| 897 |
+
margin-top: var(--space-lg);
|
| 898 |
+
}
|
| 899 |
+
|
| 900 |
+
.mb-sm {
|
| 901 |
+
margin-bottom: var(--space-sm);
|
| 902 |
+
}
|
| 903 |
+
|
| 904 |
+
.mb-md {
|
| 905 |
+
margin-bottom: var(--space-md);
|
| 906 |
+
}
|
| 907 |
+
|
| 908 |
+
.mb-lg {
|
| 909 |
+
margin-bottom: var(--space-lg);
|
| 910 |
+
}
|
| 911 |
+
|
| 912 |
+
.w-full {
|
| 913 |
+
width: 100%;
|
| 914 |
+
}
|
| 915 |
+
|
| 916 |
+
.h-full {
|
| 917 |
+
height: 100%;
|
| 918 |
+
}
|
| 919 |
+
|
| 920 |
+
.overflow-hidden {
|
| 921 |
+
overflow: hidden;
|
| 922 |
+
}
|
| 923 |
+
|
| 924 |
+
.overflow-auto {
|
| 925 |
+
overflow: auto;
|
| 926 |
+
}
|
| 927 |
+
|
| 928 |
+
.relative {
|
| 929 |
+
position: relative;
|
| 930 |
+
}
|
| 931 |
+
|
| 932 |
+
.absolute {
|
| 933 |
+
position: absolute;
|
| 934 |
+
}
|
| 935 |
+
|
| 936 |
+
.rounded {
|
| 937 |
+
border-radius: var(--radius-md);
|
| 938 |
+
}
|
| 939 |
+
|
| 940 |
+
.rounded-lg {
|
| 941 |
+
border-radius: var(--radius-lg);
|
| 942 |
+
}
|
| 943 |
+
|
| 944 |
+
.rounded-xl {
|
| 945 |
+
border-radius: var(--radius-xl);
|
| 946 |
+
}
|
| 947 |
+
|
| 948 |
+
.shadow {
|
| 949 |
+
box-shadow: var(--shadow-md);
|
| 950 |
+
}
|
| 951 |
+
|
| 952 |
+
.shadow-lg {
|
| 953 |
+
box-shadow: var(--shadow-lg);
|
| 954 |
+
}
|
| 955 |
+
|
| 956 |
+
.shadow-glow {
|
| 957 |
+
box-shadow: var(--shadow-glow);
|
| 958 |
+
}
|
frontend/src/store/index.js
CHANGED
|
@@ -323,9 +323,14 @@ export const useQuantizationStore = create((set, get) => ({
|
|
| 323 |
export const useUIStore = create((set) => ({
|
| 324 |
sidebarOpen: true,
|
| 325 |
activeTab: 'quantize',
|
| 326 |
-
theme: 'dark',
|
| 327 |
|
| 328 |
toggleSidebar: () => set((state) => ({ sidebarOpen: !state.sidebarOpen })),
|
| 329 |
setActiveTab: (tab) => set({ activeTab: tab }),
|
| 330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
}));
|
|
|
|
| 323 |
export const useUIStore = create((set) => ({
|
| 324 |
sidebarOpen: true,
|
| 325 |
activeTab: 'quantize',
|
| 326 |
+
theme: localStorage.getItem('theme') || 'dark',
|
| 327 |
|
| 328 |
toggleSidebar: () => set((state) => ({ sidebarOpen: !state.sidebarOpen })),
|
| 329 |
setActiveTab: (tab) => set({ activeTab: tab }),
|
| 330 |
+
toggleTheme: () => set((state) => {
|
| 331 |
+
const newTheme = state.theme === 'dark' ? 'light' : 'dark';
|
| 332 |
+
document.documentElement.setAttribute('data-theme', newTheme);
|
| 333 |
+
localStorage.setItem('theme', newTheme);
|
| 334 |
+
return { theme: newTheme };
|
| 335 |
+
})
|
| 336 |
}));
|