feat: light theme, frontend link, nav fix, rename to 七虎AI
This commit is contained in:
1 parent
effef176e2
commit
e38a32e04e
12 files changed
+429
-345
No files matched your search
@@ -11,8 +11,8 @@
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background: #0A0E1A;
|
||||
color: #E8ECF4;
|
||||
background: #F5F7FC;
|
||||
color: #1A1F36;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
.admin-sidebar {
|
||||
width: var(--admin-sidebar-width);
|
||||
min-width: var(--admin-sidebar-width);
|
||||
background: linear-gradient(180deg, #0E1225 0%, #111627 100%);
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.06);
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFE 100%);
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.08);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: width 0.25s ease, min-width 0.25s ease;
|
||||
@@ -41,7 +41,7 @@
|
||||
justify-content: space-between;
|
||||
padding: 16px 16px 16px 20px;
|
||||
height: 60px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
.admin-brand {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: #E8ECF4;
|
||||
color: #1A1F36;
|
||||
letter-spacing: -0.02em;
|
||||
white-space: nowrap;
|
||||
background: linear-gradient(135deg, #C4B5FD, #A78BFA);
|
||||
background: linear-gradient(135deg, #6C63FF, #A78BFA);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
@@ -72,7 +72,7 @@
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: #5A6480;
|
||||
color: #8892B0;
|
||||
transition: all 0.15s ease;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
@@ -109,7 +109,7 @@
|
||||
}
|
||||
|
||||
.admin-nav::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
background: rgba(108, 99, 255, 0.10);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
}
|
||||
|
||||
.admin-nav-item:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
background: rgba(108, 99, 255, 0.06);
|
||||
color: #CCD6F6;
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
/* Sidebar Footer */
|
||||
.admin-sidebar-footer {
|
||||
padding: 8px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
justify-content: space-between;
|
||||
padding: 0 32px;
|
||||
height: 60px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
background: rgba(10, 14, 26, 0.85);
|
||||
backdrop-filter: blur(12px);
|
||||
flex-shrink: 0;
|
||||
@@ -292,7 +292,7 @@
|
||||
.admin-page-title {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
color: #E8ECF4;
|
||||
color: #1A1F36;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -306,7 +306,7 @@
|
||||
}
|
||||
|
||||
.breadcrumb-item {
|
||||
color: #5A6480;
|
||||
color: #8892B0;
|
||||
}
|
||||
|
||||
.breadcrumb-item.current {
|
||||
@@ -343,7 +343,7 @@
|
||||
}
|
||||
|
||||
.admin-topbar-action:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
background: rgba(108, 99, 255, 0.06);
|
||||
color: #A78BFA;
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
padding: 2px 12px 2px 4px;
|
||||
border-radius: 20px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(0, 0, 0, 0.10);
|
||||
font-size: 13px;
|
||||
color: #CCD6F6;
|
||||
}
|
||||
@@ -379,7 +379,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background: #0A0E1A;
|
||||
background: #F5F7FC;
|
||||
}
|
||||
|
||||
.admin-content {
|
||||
@@ -398,7 +398,7 @@
|
||||
}
|
||||
|
||||
.admin-content::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
background: rgba(108, 99, 255, 0.10);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@
|
||||
|
||||
.admin-stat-card {
|
||||
background: linear-gradient(135deg, rgba(17, 22, 39, 0.8), rgba(17, 22, 39, 0.6));
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
transition: all 0.2s ease;
|
||||
@@ -435,7 +435,7 @@
|
||||
.admin-stat-card .stat-value {
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
color: #E8ECF4;
|
||||
color: #1A1F36;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@
|
||||
/* Page section card */
|
||||
.admin-section {
|
||||
background: rgba(17, 22, 39, 0.5);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
margin-bottom: 20px;
|
||||
@@ -467,13 +467,13 @@
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.admin-section-header h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #E8ECF4;
|
||||
color: #1A1F36;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -522,7 +522,7 @@
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@
|
||||
.admin-btn-secondary {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
color: #8892B0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(0, 0, 0, 0.10);
|
||||
}
|
||||
|
||||
.admin-btn-secondary:hover {
|
||||
@@ -614,7 +614,7 @@
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(0, 0, 0, 0.10);
|
||||
border-radius: 8px;
|
||||
color: #8892B0;
|
||||
flex: 1;
|
||||
@@ -631,7 +631,7 @@
|
||||
flex: 1;
|
||||
border: none;
|
||||
background: none;
|
||||
color: #E8ECF4;
|
||||
color: #1A1F36;
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
}
|
||||
@@ -708,8 +708,8 @@
|
||||
}
|
||||
|
||||
.admin-modal {
|
||||
background: #111627;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
background: #FFFFFF;
|
||||
border: 1px solid rgba(0, 0, 0, 0.10);
|
||||
border-radius: 16px;
|
||||
padding: 24px;
|
||||
min-width: 420px;
|
||||
@@ -722,7 +722,7 @@
|
||||
.admin-modal h3 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #E8ECF4;
|
||||
color: #1A1F36;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
@@ -745,9 +745,9 @@
|
||||
width: 100%;
|
||||
padding: 10px 14px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(0, 0, 0, 0.10);
|
||||
border-radius: 8px;
|
||||
color: #E8ECF4;
|
||||
color: #1A1F36;
|
||||
font-size: 13px;
|
||||
transition: border-color 0.15s ease;
|
||||
outline: none;
|
||||
@@ -766,8 +766,8 @@
|
||||
}
|
||||
|
||||
.admin-form-group select option {
|
||||
background: #111627;
|
||||
color: #E8ECF4;
|
||||
background: #FFFFFF;
|
||||
color: #1A1F36;
|
||||
}
|
||||
|
||||
/* Toggle switch */
|
||||
@@ -840,7 +840,7 @@
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(0, 0, 0, 0.10);
|
||||
background: transparent;
|
||||
color: #8892B0;
|
||||
font-size: 13px;
|
||||
@@ -905,7 +905,7 @@
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.admin-modal-header h3 {
|
||||
@@ -926,7 +926,7 @@
|
||||
}
|
||||
|
||||
.admin-modal-close:hover {
|
||||
color: #E8ECF4;
|
||||
color: #1A1F36;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
@@ -939,7 +939,7 @@
|
||||
gap: 8px;
|
||||
justify-content: flex-end;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* Spinner animation for logo upload */
|
||||
@@ -987,3 +987,31 @@
|
||||
max-width: 90vw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Frontend access link */
|
||||
.admin-frontend-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 16px;
|
||||
margin: 8px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #6C63FF;
|
||||
background: rgba(108, 99, 255, 0.08);
|
||||
text-decoration: none;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.admin-frontend-link:hover {
|
||||
background: rgba(108, 99, 255, 0.15);
|
||||
color: #5B5FED;
|
||||
}
|
||||
|
||||
/* Nav link cursor pointer */
|
||||
.landing-nav-v2 a {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -139,9 +139,13 @@ const AdminLayout: React.FC = () => {
|
||||
<div className="admin-layout">
|
||||
<aside className="admin-sidebar">
|
||||
<div className="admin-sidebar-header">
|
||||
<h1 className="admin-logo">AIFlow</h1>
|
||||
<h1 className="admin-logo">七虎AI</h1>
|
||||
<span className="admin-subtitle">管理控制台</span>
|
||||
</div>
|
||||
<a href="/#/portal" target="_blank" rel="noopener noreferrer" className="admin-frontend-link">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
|
||||
<span>访问前台</span>
|
||||
</a>
|
||||
<nav className="sidebar-nav">
|
||||
{adminNavGroups.map((group) => {
|
||||
const isCollapsed = collapsedGroups.has(group.title);
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
/* ===== Front Layout ===== */
|
||||
/* ===== Front Layout V3 - Light Theme ===== */
|
||||
.front-layout {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background: #F5F7FC;
|
||||
color: #1A1F36;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.front-sidebar {
|
||||
width: var(--sidebar-width);
|
||||
min-width: var(--sidebar-width);
|
||||
background: var(--color-sidebar-bg);
|
||||
border-right: 1px solid var(--color-border-light);
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFE 100%);
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.08);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: width var(--transition-slow), min-width var(--transition-slow);
|
||||
@@ -29,7 +31,7 @@
|
||||
justify-content: space-between;
|
||||
padding: var(--space-lg) var(--space-lg);
|
||||
height: var(--header-height);
|
||||
border-bottom: 1px solid var(--color-border-light);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.sidebar-logo {
|
||||
@@ -41,7 +43,7 @@
|
||||
.sidebar-brand {
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
color: var(--color-text-primary);
|
||||
color: #1A1F36;
|
||||
letter-spacing: -0.02em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -53,13 +55,14 @@
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--color-text-tertiary);
|
||||
color: #8892B0;
|
||||
transition: all var(--transition-fast);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.collapse-btn:hover {
|
||||
background: var(--color-bg-hover);
|
||||
color: var(--color-text-primary);
|
||||
background: rgba(0, 0, 0, 0.08);
|
||||
color: #8892B0;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
@@ -68,7 +71,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: var(--space-sm) var(--space-sm);
|
||||
padding: var(--space-sm);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -79,12 +82,13 @@
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-md);
|
||||
padding: var(--space-md) var(--space-md);
|
||||
padding: 10px var(--space-md);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--color-text-secondary);
|
||||
color: #8892B0;
|
||||
text-decoration: none;
|
||||
font-size: var(--text-base);
|
||||
font-weight: 500;
|
||||
@@ -93,13 +97,13 @@
|
||||
}
|
||||
|
||||
.nav-item:hover {
|
||||
background: var(--color-sidebar-hover);
|
||||
color: var(--color-text-primary);
|
||||
background: rgba(108, 99, 255, 0.06);
|
||||
color: #1A1F36;
|
||||
}
|
||||
|
||||
.nav-item.active {
|
||||
background: var(--color-sidebar-active);
|
||||
color: var(--color-accent);
|
||||
background: rgba(108, 99, 255, 0.12);
|
||||
color: #8B85FF;
|
||||
}
|
||||
|
||||
.nav-icon {
|
||||
@@ -115,10 +119,30 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Active dot indicator */
|
||||
.nav-active-dot {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav-item.active .nav-active-dot {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: #6C63FF;
|
||||
box-shadow: 0 0 8px rgba(108, 99, 255, 0.5);
|
||||
}
|
||||
|
||||
/* Sidebar Footer */
|
||||
.sidebar-footer {
|
||||
padding: var(--space-md);
|
||||
border-top: 1px solid var(--color-border-light);
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.sidebar-footer .nav-item {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.user-info-mini {
|
||||
@@ -126,13 +150,14 @@
|
||||
align-items: center;
|
||||
gap: var(--space-md);
|
||||
padding: var(--space-sm);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.user-avatar-sm {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: var(--radius-full);
|
||||
background: linear-gradient(135deg, var(--color-accent), #8B8DFF);
|
||||
background: linear-gradient(135deg, #6C63FF, #A78BFA);
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -151,16 +176,21 @@
|
||||
.user-name {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
color: #1A1F36;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.user-plan {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--color-accent);
|
||||
color: #8B85FF;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.logout-btn:hover {
|
||||
color: #EF4444 !important;
|
||||
background: rgba(239, 68, 68, 0.1) !important;
|
||||
}
|
||||
|
||||
/* Main Content */
|
||||
.front-main {
|
||||
flex: 1;
|
||||
@@ -168,6 +198,12 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
background: #F5F7FC;
|
||||
}
|
||||
|
||||
/* Forward-slash route for apps - hidden default route */
|
||||
.front-main > * {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@@ -187,3 +223,11 @@
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Home & Admin links */
|
||||
.nav-home-link {
|
||||
margin-bottom: 4px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
@@ -5,13 +5,13 @@ import './FrontLayout.css';
|
||||
|
||||
const navItems = [
|
||||
{ path: '/chat', icon: 'chat', label: 'AI聊天' },
|
||||
{ path: '/channels', icon: 'channel', label: '频道' },
|
||||
{ path: '/channels', icon: 'channel', label: 'IM Bot' },
|
||||
{ path: '/knowledge', icon: 'knowledge', label: '知识库' },
|
||||
{ path: '/market', icon: 'market', label: '应用市场' },
|
||||
{ path: '/market', icon: 'market', label: '技能市场' },
|
||||
{ path: '/token', icon: 'token', label: 'Token驾驶舱' },
|
||||
{ path: '/pricing', icon: 'pricing', label: '付费中心' },
|
||||
{ path: '/assets', icon: 'assets', label: '资产' },
|
||||
{ path: '/evolution', icon: 'evolution', label: 'AI进化' },
|
||||
{ path: '/assets', icon: 'assets', label: '资产文件' },
|
||||
{ path: '/evolution', icon: 'evolution', label: 'AI自进化' },
|
||||
];
|
||||
|
||||
const bottomItems = [
|
||||
@@ -24,6 +24,7 @@ const iconPaths: Record<string, JSX.Element> = {
|
||||
channel: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>,
|
||||
knowledge: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>,
|
||||
market: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.2"/><rect x="14" y="3" width="7" height="7" rx="1.2"/><rect x="3" y="14" width="7" height="7" rx="1.2"/><rect x="14" y="14" width="7" height="7" rx="1.2"/></svg>,
|
||||
apps: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="2" y="2" width="9" height="9" rx="2"/><rect x="13" y="2" width="9" height="9" rx="2"/><rect x="2" y="13" width="9" height="9" rx="2"/><rect x="13" y="13" width="5" height="5" rx="1.5"/><path d="M18 18v3"/><path d="M19.5 16.5v6"/></svg>,
|
||||
token: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>,
|
||||
pricing: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="10"/><path d="M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"/><path d="M12 18V6"/></svg>,
|
||||
profile: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>,
|
||||
@@ -46,32 +47,48 @@ const FrontLayout: React.FC = () => {
|
||||
<div className="front-layout">
|
||||
{/* Sidebar */}
|
||||
<aside className={`front-sidebar ${collapsed ? 'collapsed' : ''}`}>
|
||||
{/* Header */}
|
||||
<div className="sidebar-header">
|
||||
<div className="sidebar-logo">
|
||||
<svg width="28" height="28" viewBox="0 0 32 32" fill="none">
|
||||
<rect width="32" height="32" rx="8" fill="#5B5FED"/>
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none">
|
||||
<defs>
|
||||
<linearGradient id="flGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stopColor="#6C63FF"/>
|
||||
<stop offset="100%" stopColor="#A78BFA"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="32" height="32" rx="8" fill="url(#flGrad)"/>
|
||||
<path d="M8 20V12l4 4 4-4v8" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill="none"/>
|
||||
<path d="M6 22h20" stroke="white" strokeWidth="1.5" strokeLinecap="round" opacity="0.5"/>
|
||||
</svg>
|
||||
{!collapsed && <span className="sidebar-brand">Qihu-AIFlow</span>}
|
||||
{!collapsed && <span className="sidebar-brand">七虎AI</span>}
|
||||
</div>
|
||||
<button className="collapse-btn" onClick={() => setCollapsed(!collapsed)}>
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/>
|
||||
{collapsed ? <><polyline points="13 17 18 12 13 7"/><polyline points="6 17 11 12 6 7"/></> : <><polyline points="11 17 6 12 11 7"/><polyline points="18 17 13 12 18 7"/></>}
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Navigation */}
|
||||
<nav className="sidebar-nav">
|
||||
<NavLink to="/" className={({ isActive }) => `nav-item nav-home-link`} end>
|
||||
<span className="nav-item-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
</span>
|
||||
{!collapsed && <span className="nav-item-label">返回首页</span>}
|
||||
</NavLink>
|
||||
<div className="nav-section">
|
||||
{navItems.map(item => (
|
||||
<NavLink
|
||||
key={item.path}
|
||||
to={item.path}
|
||||
className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}
|
||||
title={collapsed ? item.label : undefined}
|
||||
>
|
||||
<span className="nav-icon">{iconPaths[item.icon]}</span>
|
||||
{!collapsed && <span className="nav-label">{item.label}</span>}
|
||||
{!collapsed && <span className="nav-active-dot" />}
|
||||
</NavLink>
|
||||
))}
|
||||
</div>
|
||||
@@ -81,14 +98,17 @@ const FrontLayout: React.FC = () => {
|
||||
key={item.path}
|
||||
to={item.path}
|
||||
className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}
|
||||
title={collapsed ? item.label : undefined}
|
||||
>
|
||||
<span className="nav-icon">{iconPaths[item.icon]}</span>
|
||||
{!collapsed && <span className="nav-label">{item.label}</span>}
|
||||
{!collapsed && <span className="nav-active-dot" />}
|
||||
</NavLink>
|
||||
))}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{/* Footer */}
|
||||
<div className="sidebar-footer">
|
||||
<div className="user-info-mini">
|
||||
<div className="user-avatar-sm">
|
||||
@@ -105,17 +125,14 @@ const FrontLayout: React.FC = () => {
|
||||
<NavLink
|
||||
to="/admin"
|
||||
className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}
|
||||
title="返回后台"
|
||||
title="管理后台"
|
||||
>
|
||||
<span className="nav-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
||||
<rect x="3" y="3" width="7" height="7" rx="1.2"/>
|
||||
<rect x="14" y="3" width="7" height="7" rx="1.2"/>
|
||||
<rect x="3" y="14" width="7" height="7" rx="1.2"/>
|
||||
<rect x="14" y="14" width="7" height="7" rx="1.2"/>
|
||||
<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>
|
||||
</svg>
|
||||
</span>
|
||||
{!collapsed && <span className="nav-label">返回后台</span>}
|
||||
{!collapsed && <span className="nav-label">管理后台</span>}
|
||||
</NavLink>
|
||||
)}
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user