Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c8020d5fb | ||
|
|
a2773aa1a7 | ||
|
|
9cc2fa8076 |
@@ -163,13 +163,21 @@ jobs:
|
|||||||
id: release_notes
|
id: release_notes
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ inputs.release_notes }}" ]; then
|
if [ -n "${{ inputs.release_notes }}" ]; then
|
||||||
|
# 使用用户输入的 release notes
|
||||||
echo "${{ inputs.release_notes }}" > release_notes.md
|
echo "${{ inputs.release_notes }}" > release_notes.md
|
||||||
else
|
else
|
||||||
echo "Release ${{ inputs.version }}" > release_notes.md
|
# 使用最近一次 commit message 作为 release notes
|
||||||
|
echo "## Release ${{ inputs.version }}" > release_notes.md
|
||||||
echo "" >> release_notes.md
|
echo "" >> release_notes.md
|
||||||
echo "## Assets" >> release_notes.md
|
echo "### Changes" >> release_notes.md
|
||||||
echo "" >> release_notes.md
|
echo "" >> release_notes.md
|
||||||
echo "Download the appropriate binary for your platform:" >> release_notes.md
|
# 获取最近一次 commit 的完整 message
|
||||||
|
git log -1 --pretty=format:"%B" >> release_notes.md
|
||||||
|
echo "" >> release_notes.md
|
||||||
|
echo "" >> release_notes.md
|
||||||
|
echo "---" >> release_notes.md
|
||||||
|
echo "" >> release_notes.md
|
||||||
|
echo "### Assets" >> release_notes.md
|
||||||
echo "" >> release_notes.md
|
echo "" >> release_notes.md
|
||||||
echo "- **Linux (amd64/arm64)**: \`.tar.gz\` files" >> release_notes.md
|
echo "- **Linux (amd64/arm64)**: \`.tar.gz\` files" >> release_notes.md
|
||||||
echo "- **macOS (amd64/arm64)**: \`.tar.gz\` files" >> release_notes.md
|
echo "- **macOS (amd64/arm64)**: \`.tar.gz\` files" >> release_notes.md
|
||||||
@@ -177,6 +185,7 @@ jobs:
|
|||||||
echo "" >> release_notes.md
|
echo "" >> release_notes.md
|
||||||
echo "Verify downloads with \`SHA256SUMS\`" >> release_notes.md
|
echo "Verify downloads with \`SHA256SUMS\`" >> release_notes.md
|
||||||
fi
|
fi
|
||||||
|
echo "=== Release Notes ==="
|
||||||
cat release_notes.md
|
cat release_notes.md
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
|
|||||||
190
web/src/App.vue
190
web/src/App.vue
@@ -290,13 +290,16 @@ const handleApplyServerUpdate = () => {
|
|||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background: var(--color-bg-primary);
|
background: var(--gradient-bg);
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Header */
|
/* Header - 毛玻璃效果 */
|
||||||
.app-header {
|
.app-header {
|
||||||
height: 56px;
|
height: 64px;
|
||||||
background: var(--color-bg-secondary);
|
background: var(--glass-bg);
|
||||||
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
border-bottom: 1px solid var(--color-border);
|
border-bottom: 1px solid var(--color-border);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -305,41 +308,62 @@ const handleApplyServerUpdate = () => {
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 头部顶部高光线 */
|
||||||
|
.app-header::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.1) 50%,
|
||||||
|
transparent 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
font-size: 18px;
|
font-size: 20px;
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
color: var(--color-text-primary);
|
background: var(--gradient-accent);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
letter-spacing: -0.5px;
|
letter-spacing: -0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Navigation */
|
/* Navigation */
|
||||||
.header-nav {
|
.header-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 4px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item {
|
.nav-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 8px;
|
||||||
padding: 8px 16px;
|
padding: 10px 18px;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-radius: 6px;
|
border-radius: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
transition: all 0.15s;
|
font-weight: 500;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item:hover {
|
.nav-item:hover {
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
background: rgba(255, 255, 255, 0.06);
|
background: var(--glass-bg-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item.active {
|
.nav-item.active {
|
||||||
color: var(--color-text-primary);
|
color: white;
|
||||||
background: var(--color-accent);
|
background: var(--gradient-accent);
|
||||||
|
box-shadow: 0 4px 15px var(--color-accent-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-icon {
|
.nav-icon {
|
||||||
@@ -354,21 +378,24 @@ const handleApplyServerUpdate = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-icon {
|
.user-icon {
|
||||||
width: 28px;
|
width: 32px;
|
||||||
height: 28px;
|
height: 32px;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
transition: color 0.15s;
|
transition: all 0.2s ease;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-icon:hover {
|
.user-icon:hover {
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
|
background: var(--glass-bg-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Theme Menu */
|
/* Theme Menu */
|
||||||
.header-right {
|
.header-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme-menu {
|
.theme-menu {
|
||||||
@@ -377,14 +404,17 @@ const handleApplyServerUpdate = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.theme-icon {
|
.theme-icon {
|
||||||
width: 24px;
|
width: 28px;
|
||||||
height: 24px;
|
height: 28px;
|
||||||
|
padding: 4px;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
transition: color 0.15s;
|
transition: all 0.2s ease;
|
||||||
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme-icon:hover {
|
.theme-icon:hover {
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
|
background: var(--glass-bg-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme-dropdown {
|
.theme-dropdown {
|
||||||
@@ -392,21 +422,24 @@ const handleApplyServerUpdate = () => {
|
|||||||
top: 100%;
|
top: 100%;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
padding: 4px;
|
padding: 6px;
|
||||||
min-width: 120px;
|
min-width: 130px;
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
box-shadow: var(--shadow-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item.active {
|
.dropdown-item.active {
|
||||||
background: var(--color-accent);
|
background: var(--gradient-accent);
|
||||||
color: white;
|
color: white;
|
||||||
|
box-shadow: 0 2px 8px var(--color-accent-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item.active:hover {
|
.dropdown-item.active:hover {
|
||||||
background: var(--color-accent-hover);
|
filter: brightness(1.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-dropdown {
|
.user-dropdown {
|
||||||
@@ -414,31 +447,33 @@ const handleApplyServerUpdate = () => {
|
|||||||
top: 100%;
|
top: 100%;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
padding: 4px;
|
padding: 6px;
|
||||||
min-width: 140px;
|
min-width: 150px;
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
box-shadow: var(--shadow-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item {
|
.dropdown-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px 12px;
|
padding: 10px 14px;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item:hover {
|
.dropdown-item:hover {
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-icon {
|
.dropdown-icon {
|
||||||
@@ -451,10 +486,12 @@ const handleApplyServerUpdate = () => {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Footer */
|
/* Footer - 毛玻璃效果 */
|
||||||
.app-footer {
|
.app-footer {
|
||||||
height: 48px;
|
height: 52px;
|
||||||
background: var(--color-bg-secondary);
|
background: var(--glass-bg);
|
||||||
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
border-top: 1px solid var(--color-border);
|
border-top: 1px solid var(--color-border);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -466,20 +503,24 @@ const handleApplyServerUpdate = () => {
|
|||||||
.footer-left {
|
.footer-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand {
|
.brand {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--color-text-primary);
|
background: var(--gradient-accent);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
.version {
|
.version {
|
||||||
padding: 2px 8px;
|
padding: 4px 10px;
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg-light);
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.version-info {
|
.version-info {
|
||||||
@@ -499,24 +540,33 @@ const handleApplyServerUpdate = () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 2px 8px;
|
padding: 4px 10px;
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.update-status:hover {
|
.update-status:hover {
|
||||||
opacity: 0.8;
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.update-status.latest {
|
.update-status.latest {
|
||||||
color: #00ba7c;
|
color: var(--color-success);
|
||||||
background: rgba(0, 186, 124, 0.1);
|
background: rgba(16, 185, 129, 0.1);
|
||||||
|
border-color: rgba(16, 185, 129, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.update-status.has-update {
|
.update-status.has-update {
|
||||||
color: #f7931a;
|
color: var(--color-warning);
|
||||||
background: rgba(247, 147, 26, 0.1);
|
background: rgba(245, 158, 11, 0.1);
|
||||||
|
border-color: rgba(245, 158, 11, 0.2);
|
||||||
|
animation: pulse-glow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-glow {
|
||||||
|
0%, 100% { box-shadow: 0 0 0 0 var(--color-warning-glow); }
|
||||||
|
50% { box-shadow: 0 0 8px 2px var(--color-warning-glow); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-icon {
|
.status-icon {
|
||||||
@@ -562,11 +612,12 @@ const handleApplyServerUpdate = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update Modal */
|
/* Update Modal - 毛玻璃效果 */
|
||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: rgba(0, 0, 0, 0.7);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -574,16 +625,18 @@ const handleApplyServerUpdate = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.update-modal {
|
.update-modal {
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 12px;
|
border-radius: 16px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 480px;
|
max-width: 480px;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
|
box-shadow: var(--shadow-lg), var(--shadow-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-header {
|
.modal-header {
|
||||||
@@ -681,29 +734,32 @@ const handleApplyServerUpdate = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal-btn {
|
.modal-btn {
|
||||||
padding: 8px 16px;
|
padding: 10px 18px;
|
||||||
border-radius: 6px;
|
border-radius: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-btn:hover:not(:disabled) {
|
.modal-btn:hover:not(:disabled) {
|
||||||
background: var(--color-border);
|
background: var(--glass-bg-hover);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-btn.primary {
|
.modal-btn.primary {
|
||||||
background: var(--color-accent);
|
background: var(--gradient-accent);
|
||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: white;
|
||||||
|
box-shadow: 0 4px 15px var(--color-accent-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-btn.primary:hover:not(:disabled) {
|
.modal-btn.primary:hover:not(:disabled) {
|
||||||
background: var(--color-accent-hover);
|
box-shadow: 0 6px 20px var(--color-accent-glow);
|
||||||
|
filter: brightness(1.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-btn:disabled {
|
.modal-btn:disabled {
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ const emit = defineEmits<{
|
|||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: rgba(0, 0, 0, 0.7);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -47,10 +48,28 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
.modal-container {
|
.modal-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
border-radius: 12px;
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
|
border-radius: 16px;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
box-shadow: var(--shadow-lg), var(--shadow-glow);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 顶部高光 */
|
||||||
|
.modal-container::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 15%;
|
||||||
|
right: 15%;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.15) 50%,
|
||||||
|
transparent 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-header {
|
.modal-header {
|
||||||
@@ -69,20 +88,20 @@ const emit = defineEmits<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.close-btn {
|
.close-btn {
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg-light);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-btn:hover {
|
.close-btn:hover {
|
||||||
background: rgba(244, 33, 46, 0.15);
|
background: rgba(239, 68, 68, 0.15);
|
||||||
color: var(--color-error);
|
color: var(--color-error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,9 +134,9 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.inline-log-panel {
|
.inline-log-panel {
|
||||||
background: rgba(0, 0, 0, 0.3);
|
background: var(--glass-bg);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
border: 1px solid var(--color-border);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,8 +145,8 @@ onUnmounted(() => {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
border-bottom: 1px solid var(--color-border);
|
||||||
background: rgba(255, 255, 255, 0.03);
|
background: var(--glass-bg-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar-left {
|
.toolbar-left {
|
||||||
@@ -158,7 +158,7 @@ onUnmounted(() => {
|
|||||||
.log-title {
|
.log-title {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: white;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.streaming-badge {
|
.streaming-badge {
|
||||||
@@ -166,8 +166,8 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: #34d399;
|
color: var(--color-success);
|
||||||
background: rgba(52, 211, 153, 0.15);
|
background: rgba(16, 185, 129, 0.15);
|
||||||
padding: 2px 8px;
|
padding: 2px 8px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@ onUnmounted(() => {
|
|||||||
width: 6px;
|
width: 6px;
|
||||||
height: 6px;
|
height: 6px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #34d399;
|
background: var(--color-success);
|
||||||
animation: pulse 1.5s ease-in-out infinite;
|
animation: pulse 1.5s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,11 +192,11 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tool-btn {
|
.tool-btn {
|
||||||
background: rgba(255, 255, 255, 0.1);
|
background: var(--color-border);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
color: rgba(255, 255, 255, 0.7);
|
color: var(--color-text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -205,8 +205,8 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tool-btn:hover {
|
.tool-btn:hover {
|
||||||
background: rgba(255, 255, 255, 0.2);
|
background: var(--color-bg-elevated);
|
||||||
color: white;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-icon {
|
.tool-icon {
|
||||||
@@ -219,14 +219,14 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: rgba(255, 255, 255, 0.6);
|
color: var(--color-text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auto-scroll-toggle input {
|
.auto-scroll-toggle input {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
accent-color: #a78bfa;
|
accent-color: var(--color-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-content {
|
.log-content {
|
||||||
@@ -235,6 +235,7 @@ onUnmounted(() => {
|
|||||||
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
|
background: var(--color-bg-elevated);
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-loading,
|
.log-loading,
|
||||||
@@ -243,7 +244,7 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
color: rgba(255, 255, 255, 0.4);
|
color: var(--color-text-muted);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,7 +260,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.log-time {
|
.log-time {
|
||||||
color: rgba(255, 255, 255, 0.4);
|
color: var(--color-text-muted);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,12 +270,12 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.log-src {
|
.log-src {
|
||||||
color: rgba(255, 255, 255, 0.5);
|
color: var(--color-text-muted);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-msg {
|
.log-msg {
|
||||||
color: rgba(255, 255, 255, 0.8);
|
color: var(--color-text-secondary);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
@@ -289,11 +290,11 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.log-content::-webkit-scrollbar-thumb {
|
.log-content::-webkit-scrollbar-thumb {
|
||||||
background: rgba(255, 255, 255, 0.2);
|
background: var(--color-border);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-content::-webkit-scrollbar-thumb:hover {
|
.log-content::-webkit-scrollbar-thumb:hover {
|
||||||
background: rgba(255, 255, 255, 0.3);
|
background: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,42 +1,121 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
/* 深色主题(默认) */
|
/* ========================================
|
||||||
|
GoTunnel 毛玻璃设计系统
|
||||||
|
Glassmorphism Design System
|
||||||
|
======================================== */
|
||||||
|
|
||||||
|
/* 深色主题(默认) - 深邃渐变背景 */
|
||||||
:root,
|
:root,
|
||||||
[data-theme="dark"] {
|
[data-theme="dark"] {
|
||||||
--color-bg-primary: #0f1419;
|
/* 背景色 - 深色渐变基底 */
|
||||||
--color-bg-secondary: #15202b;
|
--color-bg-primary: #0a0e17;
|
||||||
--color-bg-tertiary: #1e2732;
|
--color-bg-secondary: #0d1220;
|
||||||
--color-bg-elevated: #253341;
|
--color-bg-tertiary: #111827;
|
||||||
--color-border: #38444d;
|
--color-bg-elevated: #1a2332;
|
||||||
--color-border-light: #2f3336;
|
|
||||||
--color-text-primary: #e7e9ea;
|
/* 玻璃态背景 - 半透明 */
|
||||||
--color-text-secondary: #8b98a5;
|
--glass-bg: rgba(17, 24, 39, 0.6);
|
||||||
--color-text-muted: #6e767d;
|
--glass-bg-hover: rgba(26, 35, 50, 0.7);
|
||||||
--color-accent: #1d9bf0;
|
--glass-bg-light: rgba(255, 255, 255, 0.03);
|
||||||
--color-accent-hover: #1a8cd8;
|
--glass-bg-card: rgba(17, 24, 39, 0.5);
|
||||||
--color-success: #00ba7c;
|
|
||||||
--color-warning: #f7931a;
|
/* 边框 - 高光描边 */
|
||||||
--color-error: #f4212e;
|
--color-border: rgba(255, 255, 255, 0.08);
|
||||||
--color-info: #1d9bf0;
|
--color-border-light: rgba(255, 255, 255, 0.05);
|
||||||
|
--color-border-glow: rgba(99, 179, 237, 0.3);
|
||||||
|
--glass-border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
--glass-border-hover: 1px solid rgba(255, 255, 255, 0.15);
|
||||||
|
|
||||||
|
/* 文字颜色 */
|
||||||
|
--color-text-primary: #f0f4f8;
|
||||||
|
--color-text-secondary: rgba(240, 244, 248, 0.7);
|
||||||
|
--color-text-muted: rgba(240, 244, 248, 0.45);
|
||||||
|
|
||||||
|
/* 强调色 - 霓虹高光 */
|
||||||
|
--color-accent: #3b82f6;
|
||||||
|
--color-accent-hover: #60a5fa;
|
||||||
|
--color-accent-glow: rgba(59, 130, 246, 0.4);
|
||||||
|
--color-success: #10b981;
|
||||||
|
--color-success-glow: rgba(16, 185, 129, 0.4);
|
||||||
|
--color-warning: #f59e0b;
|
||||||
|
--color-warning-glow: rgba(245, 158, 11, 0.4);
|
||||||
|
--color-error: #ef4444;
|
||||||
|
--color-error-glow: rgba(239, 68, 68, 0.4);
|
||||||
|
--color-info: #06b6d4;
|
||||||
|
--color-info-glow: rgba(6, 182, 212, 0.4);
|
||||||
|
|
||||||
|
/* 渐变背景 */
|
||||||
|
--gradient-bg: linear-gradient(135deg, #0a0e17 0%, #1a1f35 50%, #0d1220 100%);
|
||||||
|
--gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
|
||||||
|
--gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
|
||||||
|
|
||||||
|
/* 模糊效果 */
|
||||||
|
--glass-blur: blur(20px);
|
||||||
|
--glass-blur-light: blur(12px);
|
||||||
|
|
||||||
|
/* 阴影 - 悬浮感 */
|
||||||
|
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
|
||||||
|
--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
|
||||||
|
--shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
|
||||||
|
--shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 浅色主题 */
|
/* 浅色主题 - 柔和渐变背景 */
|
||||||
[data-theme="light"] {
|
[data-theme="light"] {
|
||||||
--color-bg-primary: #ffffff;
|
/* 背景色 - 浅色渐变基底 */
|
||||||
--color-bg-secondary: #f7f9fa;
|
--color-bg-primary: #f0f4f8;
|
||||||
--color-bg-tertiary: #eff3f4;
|
--color-bg-secondary: #e8eef4;
|
||||||
--color-bg-elevated: #e7e9ea;
|
--color-bg-tertiary: #ffffff;
|
||||||
--color-border: #cfd9de;
|
--color-bg-elevated: #ffffff;
|
||||||
--color-border-light: #eff3f4;
|
|
||||||
--color-text-primary: #0f1419;
|
/* 玻璃态背景 - 半透明白 */
|
||||||
--color-text-secondary: #536471;
|
--glass-bg: rgba(255, 255, 255, 0.7);
|
||||||
--color-text-muted: #8b98a5;
|
--glass-bg-hover: rgba(255, 255, 255, 0.85);
|
||||||
--color-accent: #1d9bf0;
|
--glass-bg-light: rgba(255, 255, 255, 0.5);
|
||||||
--color-accent-hover: #1a8cd8;
|
--glass-bg-card: rgba(255, 255, 255, 0.6);
|
||||||
--color-success: #00ba7c;
|
|
||||||
--color-warning: #f7931a;
|
/* 边框 - 柔和描边 */
|
||||||
--color-error: #f4212e;
|
--color-border: rgba(0, 0, 0, 0.08);
|
||||||
--color-info: #1d9bf0;
|
--color-border-light: rgba(0, 0, 0, 0.05);
|
||||||
|
--color-border-glow: rgba(59, 130, 246, 0.3);
|
||||||
|
--glass-border: 1px solid rgba(255, 255, 255, 0.8);
|
||||||
|
--glass-border-hover: 1px solid rgba(255, 255, 255, 0.95);
|
||||||
|
|
||||||
|
/* 文字颜色 */
|
||||||
|
--color-text-primary: #1a202c;
|
||||||
|
--color-text-secondary: rgba(26, 32, 44, 0.7);
|
||||||
|
--color-text-muted: rgba(26, 32, 44, 0.5);
|
||||||
|
|
||||||
|
/* 强调色 */
|
||||||
|
--color-accent: #3b82f6;
|
||||||
|
--color-accent-hover: #2563eb;
|
||||||
|
--color-accent-glow: rgba(59, 130, 246, 0.3);
|
||||||
|
--color-success: #10b981;
|
||||||
|
--color-success-glow: rgba(16, 185, 129, 0.3);
|
||||||
|
--color-warning: #f59e0b;
|
||||||
|
--color-warning-glow: rgba(245, 158, 11, 0.3);
|
||||||
|
--color-error: #ef4444;
|
||||||
|
--color-error-glow: rgba(239, 68, 68, 0.3);
|
||||||
|
--color-info: #06b6d4;
|
||||||
|
--color-info-glow: rgba(6, 182, 212, 0.3);
|
||||||
|
|
||||||
|
/* 渐变背景 */
|
||||||
|
--gradient-bg: linear-gradient(135deg, #e8eef4 0%, #f0f4f8 50%, #e0e8f0 100%);
|
||||||
|
--gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
|
||||||
|
--gradient-card: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
|
||||||
|
|
||||||
|
/* 模糊效果 */
|
||||||
|
--glass-blur: blur(20px);
|
||||||
|
--glass-blur-light: blur(12px);
|
||||||
|
|
||||||
|
/* 阴影 */
|
||||||
|
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
|
--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
|
||||||
|
--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
|
||||||
|
--shadow-glow: 0 0 20px rgba(59, 130, 246, 0.1);
|
||||||
|
--shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
@@ -49,21 +128,205 @@ body {
|
|||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
background: var(--color-bg-primary);
|
background: var(--gradient-bg);
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Card utilities */
|
/* ========================================
|
||||||
|
玻璃态卡片组件
|
||||||
|
======================================== */
|
||||||
|
|
||||||
.glass-card {
|
.glass-card {
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
border-radius: 12px;
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
|
border-radius: 16px;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
|
box-shadow: var(--shadow-card);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 卡片顶部高光 */
|
||||||
|
.glass-card::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.1) 50%,
|
||||||
|
transparent 100%);
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.glass-card-hover:hover {
|
.glass-card-hover:hover {
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg-hover);
|
||||||
|
border-color: rgba(255, 255, 255, 0.12);
|
||||||
|
box-shadow: var(--shadow-lg), var(--shadow-glow);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========================================
|
||||||
|
玻璃态按钮
|
||||||
|
======================================== */
|
||||||
|
|
||||||
|
.glass-btn {
|
||||||
|
background: var(--glass-bg);
|
||||||
|
backdrop-filter: var(--glass-blur-light);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur-light);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px 18px;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-btn:hover {
|
||||||
|
background: var(--glass-bg-hover);
|
||||||
|
border-color: rgba(255, 255, 255, 0.15);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-btn:active {
|
||||||
|
transform: scale(0.98);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-btn.primary {
|
||||||
|
background: var(--gradient-accent);
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
box-shadow: 0 4px 15px var(--color-accent-glow);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-btn.primary:hover {
|
||||||
|
box-shadow: 0 6px 20px var(--color-accent-glow);
|
||||||
|
filter: brightness(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-btn.small {
|
||||||
|
padding: 6px 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========================================
|
||||||
|
玻璃态输入框
|
||||||
|
======================================== */
|
||||||
|
|
||||||
|
.glass-input {
|
||||||
|
background: var(--glass-bg-light);
|
||||||
|
backdrop-filter: var(--glass-blur-light);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur-light);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 12px 16px;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: 15px;
|
||||||
|
width: 100%;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-input:focus {
|
||||||
|
border-color: var(--color-accent);
|
||||||
|
box-shadow: 0 0 0 3px var(--color-accent-glow);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-input::placeholder {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========================================
|
||||||
|
动画背景粒子
|
||||||
|
======================================== */
|
||||||
|
|
||||||
|
.particles {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50%;
|
||||||
|
opacity: 0.15;
|
||||||
|
filter: blur(60px);
|
||||||
|
animation: float 20s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-1 {
|
||||||
|
width: 400px;
|
||||||
|
height: 400px;
|
||||||
|
background: var(--color-accent);
|
||||||
|
top: -100px;
|
||||||
|
right: -100px;
|
||||||
|
animation-delay: 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-2 {
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
background: #8b5cf6;
|
||||||
|
bottom: -50px;
|
||||||
|
left: -50px;
|
||||||
|
animation-delay: -5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-3 {
|
||||||
|
width: 250px;
|
||||||
|
height: 250px;
|
||||||
|
background: var(--color-info);
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
animation-delay: -10s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-4 {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
background: var(--color-success);
|
||||||
|
bottom: 20%;
|
||||||
|
right: 20%;
|
||||||
|
animation-delay: -15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-5 {
|
||||||
|
width: 350px;
|
||||||
|
height: 350px;
|
||||||
|
background: #ec4899;
|
||||||
|
top: 30%;
|
||||||
|
left: 10%;
|
||||||
|
animation-delay: -7s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes float {
|
||||||
|
0%, 100% {
|
||||||
|
transform: translate(0, 0) scale(1);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: translate(30px, -30px) scale(1.05);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: translate(-20px, 20px) scale(0.95);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: translate(-30px, -20px) scale(1.02);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ import {
|
|||||||
getClient, updateClient, deleteClient, pushConfigToClient, disconnectClient, restartClient,
|
getClient, updateClient, deleteClient, pushConfigToClient, disconnectClient, restartClient,
|
||||||
getClientPluginConfig, updateClientPluginConfig,
|
getClientPluginConfig, updateClientPluginConfig,
|
||||||
getStorePlugins, installStorePlugin, getRuleSchemas, startClientPlugin, restartClientPlugin, stopClientPlugin, deleteClientPlugin,
|
getStorePlugins, installStorePlugin, getRuleSchemas, startClientPlugin, restartClientPlugin, stopClientPlugin, deleteClientPlugin,
|
||||||
checkClientUpdate, applyClientUpdate, getClientSystemStats, type UpdateInfo, type SystemStats
|
checkClientUpdate, applyClientUpdate, getClientSystemStats, getVersionInfo,
|
||||||
|
type UpdateInfo, type SystemStats
|
||||||
} from '../api'
|
} from '../api'
|
||||||
import type { ProxyRule, ClientPlugin, ConfigField, StorePluginInfo, RuleSchemasMap } from '../types'
|
import type { ProxyRule, ClientPlugin, ConfigField, StorePluginInfo, RuleSchemasMap } from '../types'
|
||||||
import LogViewer from '../components/LogViewer.vue'
|
import LogViewer from '../components/LogViewer.vue'
|
||||||
@@ -42,6 +43,7 @@ const clientVersion = ref('')
|
|||||||
// 客户端更新相关
|
// 客户端更新相关
|
||||||
const clientUpdate = ref<UpdateInfo | null>(null)
|
const clientUpdate = ref<UpdateInfo | null>(null)
|
||||||
const updatingClient = ref(false)
|
const updatingClient = ref(false)
|
||||||
|
const serverVersion = ref('')
|
||||||
|
|
||||||
// 系统状态相关
|
// 系统状态相关
|
||||||
const systemStats = ref<SystemStats | null>(null)
|
const systemStats = ref<SystemStats | null>(null)
|
||||||
@@ -94,6 +96,61 @@ const getExtraFields = (type: string): ConfigField[] => {
|
|||||||
return schema?.extra_fields || []
|
return schema?.extra_fields || []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加载服务端版本
|
||||||
|
const loadServerVersion = async () => {
|
||||||
|
try {
|
||||||
|
const { data } = await getVersionInfo()
|
||||||
|
serverVersion.value = data.version || ''
|
||||||
|
} catch (e) {
|
||||||
|
console.error('Failed to load server version', e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 版本比较函数:返回 -1 (v1 < v2), 0 (v1 == v2), 1 (v1 > v2)
|
||||||
|
const compareVersions = (v1: string, v2: string): number => {
|
||||||
|
const normalize = (v: string) => v.replace(/^v/, '').split('.').map(n => parseInt(n, 10) || 0)
|
||||||
|
const parts1 = normalize(v1)
|
||||||
|
const parts2 = normalize(v2)
|
||||||
|
const len = Math.max(parts1.length, parts2.length)
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
const p1 = parts1[i] || 0
|
||||||
|
const p2 = parts2[i] || 0
|
||||||
|
if (p1 < p2) return -1
|
||||||
|
if (p1 > p2) return 1
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断客户端是否需要更新
|
||||||
|
// 逻辑:如果客户端最新版>=服务端版本,则目标版本为服务端版本;否则为客户端最新版
|
||||||
|
const needsUpdate = (): boolean => {
|
||||||
|
if (!clientUpdate.value?.latest || !clientVersion.value) return false
|
||||||
|
const latestClientVer = clientUpdate.value.latest
|
||||||
|
const currentClientVer = clientVersion.value
|
||||||
|
const serverVer = serverVersion.value
|
||||||
|
|
||||||
|
// 确定目标版本
|
||||||
|
let targetVersion = latestClientVer
|
||||||
|
if (serverVer && compareVersions(latestClientVer, serverVer) >= 0) {
|
||||||
|
targetVersion = serverVer
|
||||||
|
}
|
||||||
|
|
||||||
|
// 比较当前客户端版本和目标版本
|
||||||
|
return compareVersions(currentClientVer, targetVersion) < 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取目标更新版本
|
||||||
|
const getTargetVersion = (): string => {
|
||||||
|
if (!clientUpdate.value?.latest) return ''
|
||||||
|
const latestClientVer = clientUpdate.value.latest
|
||||||
|
const serverVer = serverVersion.value
|
||||||
|
|
||||||
|
if (serverVer && compareVersions(latestClientVer, serverVer) >= 0) {
|
||||||
|
return serverVer
|
||||||
|
}
|
||||||
|
return latestClientVer
|
||||||
|
}
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
const loadClient = async () => {
|
const loadClient = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
@@ -441,6 +498,7 @@ const pollTimer = ref<number | null>(null)
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadRuleSchemas()
|
loadRuleSchemas()
|
||||||
|
loadServerVersion()
|
||||||
loadClient()
|
loadClient()
|
||||||
// 启动自动轮询,每 5 秒刷新一次
|
// 启动自动轮询,每 5 秒刷新一次
|
||||||
pollTimer.value = window.setInterval(() => {
|
pollTimer.value = window.setInterval(() => {
|
||||||
@@ -557,10 +615,10 @@ const handleDeletePlugin = (plugin: ClientPlugin) => {
|
|||||||
<span class="stat-label">客户端版本</span>
|
<span class="stat-label">客户端版本</span>
|
||||||
<span class="stat-value">
|
<span class="stat-value">
|
||||||
{{ clientVersion || '-' }}
|
{{ clientVersion || '-' }}
|
||||||
<span v-if="clientUpdate?.available" class="update-badge" @click="handleApplyClientUpdate">
|
<span v-if="needsUpdate()" class="update-badge" @click="handleApplyClientUpdate">
|
||||||
可更新
|
可更新 → {{ getTargetVersion() }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="clientUpdate && !clientUpdate.available" class="latest-badge">
|
<span v-else-if="clientVersion" class="latest-badge">
|
||||||
最新版本
|
最新版本
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -853,7 +911,7 @@ const handleDeletePlugin = (plugin: ClientPlugin) => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.client-page {
|
.client-page {
|
||||||
min-height: calc(100vh - 108px);
|
min-height: calc(100vh - 108px);
|
||||||
background: var(--color-bg-primary);
|
background: transparent;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
@@ -1484,7 +1542,7 @@ const handleDeletePlugin = (plugin: ClientPlugin) => {
|
|||||||
.progress-bar {
|
.progress-bar {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
background: var(--color-bg-elevated);
|
background: var(--color-border);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,16 +106,60 @@ onMounted(loadClients)
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.clients-page {
|
.clients-page {
|
||||||
min-height: calc(100vh - 108px);
|
min-height: calc(100vh - 116px);
|
||||||
background: var(--color-bg-primary);
|
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide particles */
|
/* 动画背景粒子 */
|
||||||
.particles {
|
.particles {
|
||||||
display: none;
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50%;
|
||||||
|
opacity: 0.15;
|
||||||
|
filter: blur(60px);
|
||||||
|
animation: float 20s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-1 {
|
||||||
|
width: 350px;
|
||||||
|
height: 350px;
|
||||||
|
background: var(--color-accent);
|
||||||
|
top: -80px;
|
||||||
|
right: -80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-2 {
|
||||||
|
width: 280px;
|
||||||
|
height: 280px;
|
||||||
|
background: #8b5cf6;
|
||||||
|
bottom: -40px;
|
||||||
|
left: -40px;
|
||||||
|
animation-delay: -5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-3 {
|
||||||
|
width: 220px;
|
||||||
|
height: 220px;
|
||||||
|
background: var(--color-success);
|
||||||
|
top: 40%;
|
||||||
|
left: 30%;
|
||||||
|
animation-delay: -10s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes float {
|
||||||
|
0%, 100% { transform: translate(0, 0) scale(1); }
|
||||||
|
25% { transform: translate(30px, -30px) scale(1.05); }
|
||||||
|
50% { transform: translate(-20px, 20px) scale(0.95); }
|
||||||
|
75% { transform: translate(-30px, -20px) scale(1.02); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.clients-content {
|
.clients-content {
|
||||||
@@ -147,11 +191,34 @@ onMounted(loadClients)
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stat-card {
|
.stat-card {
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
border-radius: 12px;
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
|
border-radius: 16px;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: var(--shadow-card);
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 20%;
|
||||||
|
right: 20%;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.1) 50%,
|
||||||
|
transparent 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: var(--shadow-lg), var(--shadow-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-value {
|
.stat-value {
|
||||||
@@ -169,9 +236,26 @@ onMounted(loadClients)
|
|||||||
|
|
||||||
/* Glass Card */
|
/* Glass Card */
|
||||||
.glass-card {
|
.glass-card {
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
border-radius: 12px;
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
|
border-radius: 16px;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
|
box-shadow: var(--shadow-card);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-card::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 10%;
|
||||||
|
right: 10%;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.1) 50%,
|
||||||
|
transparent 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header {
|
.card-header {
|
||||||
@@ -216,16 +300,18 @@ onMounted(loadClients)
|
|||||||
}
|
}
|
||||||
|
|
||||||
.client-card {
|
.client-card {
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg-light);
|
||||||
border-radius: 10px;
|
border-radius: 12px;
|
||||||
padding: 16px;
|
padding: 18px;
|
||||||
border: 1px solid var(--color-border-light);
|
border: 1px solid var(--color-border);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.client-card:hover {
|
.client-card:hover {
|
||||||
background: var(--color-border);
|
background: var(--glass-bg-hover);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-header {
|
.client-header {
|
||||||
@@ -243,7 +329,7 @@ onMounted(loadClients)
|
|||||||
}
|
}
|
||||||
.client-status.online {
|
.client-status.online {
|
||||||
background: var(--color-success);
|
background: var(--color-success);
|
||||||
box-shadow: 0 0 8px rgba(0, 186, 124, 0.6);
|
box-shadow: 0 0 10px var(--color-success-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-name {
|
.client-name {
|
||||||
@@ -272,38 +358,44 @@ onMounted(loadClients)
|
|||||||
.client-tag {
|
.client-tag {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.client-tag.online {
|
.client-tag.online {
|
||||||
background: rgba(0, 186, 124, 0.15);
|
background: rgba(16, 185, 129, 0.15);
|
||||||
color: var(--color-success);
|
color: var(--color-success);
|
||||||
|
border: 1px solid rgba(16, 185, 129, 0.2);
|
||||||
}
|
}
|
||||||
.client-tag.offline {
|
.client-tag.offline {
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg-light);
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Button */
|
/* Button */
|
||||||
.glass-btn {
|
.glass-btn {
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg);
|
||||||
|
backdrop-filter: var(--glass-blur-light);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 8px;
|
border-radius: 10px;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
.glass-btn:hover {
|
||||||
|
background: var(--glass-bg-hover);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
.glass-btn:hover { background: var(--color-border); }
|
|
||||||
.glass-btn.small { padding: 6px 12px; font-size: 12px; }
|
.glass-btn.small { padding: 6px 12px; font-size: 12px; }
|
||||||
|
|
||||||
/* Heartbeat Indicator */
|
/* Heartbeat Indicator */
|
||||||
.heartbeat-indicator {
|
.heartbeat-indicator {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 16px;
|
top: 18px;
|
||||||
right: 16px;
|
right: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heartbeat-dot {
|
.heartbeat-dot {
|
||||||
@@ -317,6 +409,7 @@ onMounted(loadClients)
|
|||||||
.heartbeat-indicator.online .heartbeat-dot {
|
.heartbeat-indicator.online .heartbeat-dot {
|
||||||
background: var(--color-success);
|
background: var(--color-success);
|
||||||
animation: heartbeat-pulse 2s ease-in-out infinite;
|
animation: heartbeat-pulse 2s ease-in-out infinite;
|
||||||
|
box-shadow: 0 0 8px var(--color-success-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.heartbeat-indicator.offline .heartbeat-dot {
|
.heartbeat-indicator.offline .heartbeat-dot {
|
||||||
@@ -326,11 +419,11 @@ onMounted(loadClients)
|
|||||||
|
|
||||||
@keyframes heartbeat-pulse {
|
@keyframes heartbeat-pulse {
|
||||||
0%, 100% {
|
0%, 100% {
|
||||||
box-shadow: 0 0 0 0 rgba(0, 186, 124, 0.5);
|
box-shadow: 0 0 0 0 var(--color-success-glow);
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
50% {
|
50% {
|
||||||
box-shadow: 0 0 0 6px rgba(0, 186, 124, 0);
|
box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
|
||||||
transform: scale(1.1);
|
transform: scale(1.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,91 +123,84 @@ onMounted(() => {
|
|||||||
<div class="dashboard-content">
|
<div class="dashboard-content">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div class="dashboard-header">
|
<div class="dashboard-header">
|
||||||
<h1 class="text-3xl font-bold text-white mb-2">仪表盘</h1>
|
<h1 class="dashboard-title">仪表盘</h1>
|
||||||
<p class="text-white/70">监控隧道连接和流量状态</p>
|
<p class="dashboard-subtitle">监控隧道连接和流量状态</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Stats Grid -->
|
<!-- Stats Grid -->
|
||||||
<div class="stats-grid">
|
<div class="stats-grid">
|
||||||
<!-- Outbound Traffic -->
|
<!-- 24H Traffic Combined -->
|
||||||
<div class="stat-card glass-stat">
|
<div class="stat-card glass-stat">
|
||||||
<div class="stat-icon outbound">
|
<div class="stat-icon-large traffic-24h">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon-lg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 11l5-5m0 0l5 5m-5-5v12" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-content">
|
<div class="stat-details">
|
||||||
<span class="stat-label">24h出站</span>
|
<div class="stat-row">
|
||||||
<div class="stat-value-row">
|
<span class="stat-title">24H 出站</span>
|
||||||
<span class="stat-value">{{ formatted24hOutbound.value }}</span>
|
<div class="stat-data">
|
||||||
<span class="stat-unit-inline">{{ formatted24hOutbound.unit }}</span>
|
<span class="stat-number">{{ formatted24hOutbound.value }}</span>
|
||||||
|
<span class="stat-unit">{{ formatted24hOutbound.unit }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-row">
|
||||||
|
<span class="stat-title">24H 入站</span>
|
||||||
|
<div class="stat-data">
|
||||||
|
<span class="stat-number">{{ formatted24hInbound.value }}</span>
|
||||||
|
<span class="stat-unit">{{ formatted24hInbound.unit }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Inbound Traffic -->
|
<!-- Total Traffic Combined -->
|
||||||
<div class="stat-card glass-stat">
|
<div class="stat-card glass-stat">
|
||||||
<div class="stat-icon inbound">
|
<div class="stat-icon-large traffic-total">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon-lg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 13l-5 5m0 0l-5-5m5 5V6" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-content">
|
<div class="stat-details">
|
||||||
<span class="stat-label">24h入站</span>
|
<div class="stat-row">
|
||||||
<div class="stat-value-row">
|
<span class="stat-title">总出站</span>
|
||||||
<span class="stat-value">{{ formatted24hInbound.value }}</span>
|
<div class="stat-data">
|
||||||
<span class="stat-unit-inline">{{ formatted24hInbound.unit }}</span>
|
<span class="stat-number">{{ formattedTotalOutbound.value }}</span>
|
||||||
|
<span class="stat-unit">{{ formattedTotalOutbound.unit }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="stat-row">
|
||||||
|
<span class="stat-title">总入站</span>
|
||||||
|
<div class="stat-data">
|
||||||
|
<span class="stat-number">{{ formattedTotalInbound.value }}</span>
|
||||||
|
<span class="stat-unit">{{ formattedTotalInbound.unit }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Total Outbound Traffic -->
|
|
||||||
<div class="stat-card glass-stat">
|
|
||||||
<div class="stat-icon total-out">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 11l5-5m0 0l5 5m-5-5v12" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
<div class="stat-content">
|
|
||||||
<span class="stat-label">总出站</span>
|
|
||||||
<div class="stat-value-row">
|
|
||||||
<span class="stat-value">{{ formattedTotalOutbound.value }}</span>
|
|
||||||
<span class="stat-unit-inline">{{ formattedTotalOutbound.unit }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Total Inbound Traffic -->
|
|
||||||
<div class="stat-card glass-stat">
|
|
||||||
<div class="stat-icon total-in">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 13l-5 5m0 0l-5-5m5 5V6" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
<div class="stat-content">
|
|
||||||
<span class="stat-label">总入站</span>
|
|
||||||
<div class="stat-value-row">
|
|
||||||
<span class="stat-value">{{ formattedTotalInbound.value }}</span>
|
|
||||||
<span class="stat-unit-inline">{{ formattedTotalInbound.unit }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Client Count -->
|
<!-- Client Count -->
|
||||||
<div class="stat-card glass-stat">
|
<div class="stat-card glass-stat">
|
||||||
<div class="stat-icon clients">
|
<div class="stat-icon-large clients">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon-lg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-content">
|
<div class="stat-details">
|
||||||
<span class="stat-label">客户端</span>
|
<div class="stat-row">
|
||||||
<div class="client-count">
|
<span class="stat-title">在线客户端</span>
|
||||||
<span class="stat-value online">{{ onlineClients }}</span>
|
<div class="stat-data">
|
||||||
<span class="stat-separator">/</span>
|
<span class="stat-number online">{{ onlineClients }}</span>
|
||||||
<span class="stat-value total">{{ clients.length }}</span>
|
<span class="stat-unit">个</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-row">
|
||||||
|
<span class="stat-title">总客户端</span>
|
||||||
|
<div class="stat-data">
|
||||||
|
<span class="stat-number">{{ clients.length }}</span>
|
||||||
|
<span class="stat-unit">个</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="stat-unit">在线 / 总数</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="online-indicator" :class="{ active: onlineClients > 0 }">
|
<div class="online-indicator" :class="{ active: onlineClients > 0 }">
|
||||||
<span class="pulse"></span>
|
<span class="pulse"></span>
|
||||||
@@ -216,15 +209,19 @@ onMounted(() => {
|
|||||||
|
|
||||||
<!-- Rules Count -->
|
<!-- Rules Count -->
|
||||||
<div class="stat-card glass-stat">
|
<div class="stat-card glass-stat">
|
||||||
<div class="stat-icon rules">
|
<div class="stat-icon-large rules">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon-lg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-content">
|
<div class="stat-details">
|
||||||
<span class="stat-label">代理规则</span>
|
<div class="stat-row single">
|
||||||
<span class="stat-value">{{ totalRules }}</span>
|
<span class="stat-title">代理规则</span>
|
||||||
<span class="stat-unit">条规则</span>
|
<div class="stat-data">
|
||||||
|
<span class="stat-number">{{ totalRules }}</span>
|
||||||
|
<span class="stat-unit">条</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -260,16 +257,78 @@ onMounted(() => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
/* Container */
|
/* Container */
|
||||||
.dashboard-container {
|
.dashboard-container {
|
||||||
min-height: calc(100vh - 108px);
|
min-height: calc(100vh - 116px);
|
||||||
background: var(--color-bg-primary);
|
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide particles */
|
/* 动画背景粒子 */
|
||||||
.particles {
|
.particles {
|
||||||
display: none;
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50%;
|
||||||
|
opacity: 0.15;
|
||||||
|
filter: blur(60px);
|
||||||
|
animation: float 20s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-1 {
|
||||||
|
width: 400px;
|
||||||
|
height: 400px;
|
||||||
|
background: var(--color-accent);
|
||||||
|
top: -100px;
|
||||||
|
right: -100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-2 {
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
background: #8b5cf6;
|
||||||
|
bottom: -50px;
|
||||||
|
left: -50px;
|
||||||
|
animation-delay: -5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-3 {
|
||||||
|
width: 250px;
|
||||||
|
height: 250px;
|
||||||
|
background: var(--color-info);
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
animation-delay: -10s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-4 {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
background: var(--color-success);
|
||||||
|
bottom: 20%;
|
||||||
|
right: 20%;
|
||||||
|
animation-delay: -15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-5 {
|
||||||
|
width: 350px;
|
||||||
|
height: 350px;
|
||||||
|
background: #ec4899;
|
||||||
|
top: 30%;
|
||||||
|
left: 10%;
|
||||||
|
animation-delay: -7s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes float {
|
||||||
|
0%, 100% { transform: translate(0, 0) scale(1); }
|
||||||
|
25% { transform: translate(30px, -30px) scale(1.05); }
|
||||||
|
50% { transform: translate(-20px, 20px) scale(0.95); }
|
||||||
|
75% { transform: translate(-30px, -20px) scale(1.02); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Main content */
|
/* Main content */
|
||||||
@@ -284,10 +343,23 @@ onMounted(() => {
|
|||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dashboard-title {
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
margin: 0 0 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-subtitle {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
margin: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Stats Grid */
|
/* Stats Grid */
|
||||||
.stats-grid {
|
.stats-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
}
|
}
|
||||||
@@ -304,138 +376,119 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Glass stat card */
|
/* Glass stat card - 毛玻璃效果 */
|
||||||
.glass-stat {
|
.glass-stat {
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
border-radius: 12px;
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
|
border-radius: 16px;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
|
box-shadow: var(--shadow-card);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 卡片顶部高光 */
|
||||||
|
.glass-stat::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 10%;
|
||||||
|
right: 10%;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.1) 50%,
|
||||||
|
transparent 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.glass-stat:hover {
|
.glass-stat:hover {
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg-hover);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: var(--shadow-lg), var(--shadow-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stat icon */
|
/* Large Stat icon */
|
||||||
.stat-icon {
|
.stat-icon-large {
|
||||||
width: 44px;
|
width: 64px;
|
||||||
height: 44px;
|
height: 64px;
|
||||||
border-radius: 10px;
|
border-radius: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-icon.outbound {
|
.stat-icon-large.traffic-24h {
|
||||||
background: var(--color-accent);
|
background: var(--gradient-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-icon.inbound {
|
.stat-icon-large.traffic-total {
|
||||||
background: #8b5cf6;
|
background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-icon.clients {
|
.stat-icon-large.clients {
|
||||||
background: var(--color-success);
|
background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-icon.rules {
|
.stat-icon-large.rules {
|
||||||
background: var(--color-warning);
|
background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-icon.total-out {
|
.icon-lg {
|
||||||
background: #0284c7;
|
width: 32px;
|
||||||
}
|
height: 32px;
|
||||||
|
|
||||||
.stat-icon.total-in {
|
|
||||||
background: #9333ea;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-icon svg {
|
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stat content */
|
/* Stat details */
|
||||||
.stat-content {
|
.stat-details {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 2px;
|
gap: 8px;
|
||||||
min-height: 44px;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-label {
|
.stat-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-row.single {
|
||||||
|
padding: 12px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-title {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1.2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-value {
|
.stat-data {
|
||||||
font-size: 26px;
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-number {
|
||||||
|
font-size: 20px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
line-height: 1.2;
|
}
|
||||||
|
|
||||||
|
.stat-number.online {
|
||||||
|
color: var(--color-success);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-unit {
|
.stat-unit {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-value-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: baseline;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-unit-inline {
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--color-text-muted);
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Client count special styling */
|
|
||||||
.client-count {
|
|
||||||
display: flex;
|
|
||||||
align-items: baseline;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.client-count .stat-value.online {
|
|
||||||
color: var(--color-success);
|
|
||||||
}
|
|
||||||
|
|
||||||
.client-count .stat-value.total {
|
|
||||||
font-size: 24px;
|
|
||||||
color: var(--color-text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-separator {
|
|
||||||
font-size: 20px;
|
|
||||||
color: var(--color-text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Stat trend indicator */
|
|
||||||
.stat-trend {
|
|
||||||
position: absolute;
|
|
||||||
top: 16px;
|
|
||||||
right: 16px;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-trend.up {
|
|
||||||
background: rgba(0, 186, 124, 0.15);
|
|
||||||
color: var(--color-success);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Online indicator with pulse */
|
/* Online indicator with pulse */
|
||||||
@@ -456,11 +509,12 @@ onMounted(() => {
|
|||||||
.online-indicator.active .pulse {
|
.online-indicator.active .pulse {
|
||||||
background: var(--color-success);
|
background: var(--color-success);
|
||||||
animation: pulse-animation 2s ease-in-out infinite;
|
animation: pulse-animation 2s ease-in-out infinite;
|
||||||
|
box-shadow: 0 0 8px var(--color-success-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes pulse-animation {
|
@keyframes pulse-animation {
|
||||||
0%, 100% { box-shadow: 0 0 0 0 rgba(0, 186, 124, 0.5); }
|
0%, 100% { box-shadow: 0 0 0 0 var(--color-success-glow); }
|
||||||
50% { box-shadow: 0 0 0 6px rgba(0, 186, 124, 0); }
|
50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chart Section */
|
/* Chart Section */
|
||||||
@@ -573,10 +627,27 @@ onMounted(() => {
|
|||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Glass card base */
|
/* Glass card base - 毛玻璃效果 */
|
||||||
.glass-card {
|
.glass-card {
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
border-radius: 12px;
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
|
border-radius: 16px;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
|
box-shadow: var(--shadow-card);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-card::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 10%;
|
||||||
|
right: 10%;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.1) 50%,
|
||||||
|
transparent 100%);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -101,57 +101,131 @@ const handleLogin = async () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: var(--color-bg-primary);
|
background: var(--gradient-bg);
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 移除浮动粒子动画 */
|
/* 动画背景粒子 */
|
||||||
.particles {
|
.particles {
|
||||||
display: none;
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Login card */
|
.particle {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50%;
|
||||||
|
opacity: 0.2;
|
||||||
|
filter: blur(60px);
|
||||||
|
animation: float 20s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-1 {
|
||||||
|
width: 400px;
|
||||||
|
height: 400px;
|
||||||
|
background: var(--color-accent);
|
||||||
|
top: -100px;
|
||||||
|
right: -100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-2 {
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
background: #8b5cf6;
|
||||||
|
bottom: -50px;
|
||||||
|
left: -50px;
|
||||||
|
animation-delay: -5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-3 {
|
||||||
|
width: 250px;
|
||||||
|
height: 250px;
|
||||||
|
background: var(--color-info);
|
||||||
|
top: 50%;
|
||||||
|
left: 20%;
|
||||||
|
animation-delay: -10s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.particle-4 {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
background: #ec4899;
|
||||||
|
bottom: 30%;
|
||||||
|
right: 10%;
|
||||||
|
animation-delay: -15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes float {
|
||||||
|
0%, 100% { transform: translate(0, 0) scale(1); }
|
||||||
|
25% { transform: translate(30px, -30px) scale(1.05); }
|
||||||
|
50% { transform: translate(-20px, 20px) scale(0.95); }
|
||||||
|
75% { transform: translate(-30px, -20px) scale(1.02); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Login card - 毛玻璃效果 */
|
||||||
.login-card {
|
.login-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 380px;
|
max-width: 400px;
|
||||||
background: var(--color-bg-tertiary);
|
background: var(--glass-bg);
|
||||||
border-radius: 16px;
|
backdrop-filter: var(--glass-blur);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur);
|
||||||
|
border-radius: 20px;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
|
box-shadow: var(--shadow-card);
|
||||||
padding: 40px 32px;
|
padding: 48px 36px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 卡片顶部高光 */
|
||||||
|
.login-card::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 20%;
|
||||||
|
right: 20%;
|
||||||
|
height: 1px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.15) 50%,
|
||||||
|
transparent 100%);
|
||||||
|
}
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
.login-header {
|
.login-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-icon {
|
.logo-icon {
|
||||||
width: 56px;
|
width: 64px;
|
||||||
height: 56px;
|
height: 64px;
|
||||||
margin: 0 auto 16px;
|
margin: 0 auto 20px;
|
||||||
background: var(--color-accent);
|
background: var(--gradient-accent);
|
||||||
border-radius: 12px;
|
border-radius: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
box-shadow: 0 8px 24px var(--color-accent-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-icon svg {
|
.logo-icon svg {
|
||||||
color: white;
|
color: white;
|
||||||
width: 28px;
|
width: 32px;
|
||||||
height: 28px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-text {
|
.logo-text {
|
||||||
font-size: 24px;
|
font-size: 28px;
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
color: var(--color-text-primary);
|
background: var(--gradient-accent);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
margin: 0 0 8px 0;
|
margin: 0 0 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,19 +255,22 @@ const handleLogin = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.glass-input {
|
.glass-input {
|
||||||
background: var(--color-bg-elevated);
|
background: var(--glass-bg-light);
|
||||||
|
backdrop-filter: var(--glass-blur-light);
|
||||||
|
-webkit-backdrop-filter: var(--glass-blur-light);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
padding: 12px 14px;
|
padding: 14px 16px;
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.glass-input:focus {
|
.glass-input:focus {
|
||||||
border-color: var(--color-accent);
|
border-color: var(--color-accent);
|
||||||
|
box-shadow: 0 0 0 3px var(--color-accent-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.glass-input::placeholder {
|
.glass-input::placeholder {
|
||||||
@@ -211,9 +288,9 @@ const handleLogin = async () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding: 12px 14px;
|
padding: 12px 14px;
|
||||||
background: rgba(244, 33, 46, 0.1);
|
background: rgba(239, 68, 68, 0.1);
|
||||||
border: 1px solid rgba(244, 33, 46, 0.3);
|
border: 1px solid rgba(239, 68, 68, 0.3);
|
||||||
border-radius: 8px;
|
border-radius: 10px;
|
||||||
color: var(--color-error);
|
color: var(--color-error);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
@@ -224,23 +301,30 @@ const handleLogin = async () => {
|
|||||||
|
|
||||||
/* Button */
|
/* Button */
|
||||||
.glass-button {
|
.glass-button {
|
||||||
background: var(--color-accent);
|
background: var(--gradient-accent);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
padding: 12px 24px;
|
padding: 14px 24px;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.15s;
|
transition: all 0.2s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
box-shadow: 0 4px 15px var(--color-accent-glow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.glass-button:hover:not(:disabled) {
|
.glass-button:hover:not(:disabled) {
|
||||||
background: var(--color-accent-hover);
|
box-shadow: 0 6px 20px var(--color-accent-glow);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
filter: brightness(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-button:active:not(:disabled) {
|
||||||
|
transform: translateY(0) scale(0.98);
|
||||||
}
|
}
|
||||||
|
|
||||||
.glass-button:disabled {
|
.glass-button:disabled {
|
||||||
@@ -265,7 +349,7 @@ const handleLogin = async () => {
|
|||||||
/* Footer */
|
/* Footer */
|
||||||
.login-footer {
|
.login-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 24px;
|
margin-top: 28px;
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
border-top: 1px solid var(--color-border);
|
border-top: 1px solid var(--color-border);
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ onMounted(() => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.settings-page {
|
.settings-page {
|
||||||
min-height: calc(100vh - 108px);
|
min-height: calc(100vh - 108px);
|
||||||
background: var(--color-bg-primary);
|
background: transparent;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
|
|||||||
Reference in New Issue
Block a user