修改前端配色
All checks were successful
Go CI / test-and-build (push) Successful in 11s
Web CI / lint-test-build (push) Successful in 22s

This commit is contained in:
2026-04-06 15:12:58 +08:00
parent e4615e122e
commit 76e3e3c99f
9 changed files with 50 additions and 41 deletions

View File

@@ -66,7 +66,7 @@ const sidebarOpen = ref(false)
/* === 侧边栏 === */ /* === 侧边栏 === */
.sidebar { .sidebar {
width: 220px; width: 220px;
background: linear-gradient(180deg, var(--stone-1) 0%, var(--stone-0) 100%); background: linear-gradient(180deg, var(--gray-1) 0%, var(--gray-0) 100%);
padding: var(--size-5); padding: var(--size-5);
border-right: 1px solid var(--border); border-right: 1px solid var(--border);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);

View File

@@ -12,7 +12,7 @@
@import 'open-props/buttons/light'; @import 'open-props/buttons/light';
/* individual imports */ /* individual imports */
@import 'open-props/indigo'; @import 'open-props/violet';
@import 'open-props/easings'; @import 'open-props/easings';
@import 'open-props/animations'; @import 'open-props/animations';
@import 'open-props/sizes'; @import 'open-props/sizes';
@@ -43,12 +43,12 @@ html {
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: var(--stone-4); background: var(--gray-4);
border-radius: var(--radius-2); border-radius: var(--radius-2);
} }
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: var(--stone-5); background: var(--gray-5);
} }
/* 按钮重置 — 覆盖 Open Props 默认样式 */ /* 按钮重置 — 覆盖 Open Props 默认样式 */
@@ -67,10 +67,10 @@ textarea {
font-family: inherit; font-family: inherit;
font-size: var(--font-size-1); font-size: var(--font-size-1);
padding: var(--size-2) var(--size-3); padding: var(--size-2) var(--size-3);
border: 1px solid var(--stone-3); border: 1px solid var(--gray-3);
border-radius: var(--radius-2); border-radius: var(--radius-2);
background-color: var(--stone-0); background-color: var(--gray-0);
color: var(--stone-10); color: var(--gray-10);
transition: border-color 0.2s, box-shadow 0.2s; transition: border-color 0.2s, box-shadow 0.2s;
outline: none; outline: none;
width: 100%; width: 100%;
@@ -92,7 +92,7 @@ input[type="email"]::placeholder,
input[type="number"]::placeholder, input[type="number"]::placeholder,
input[type="search"]::placeholder, input[type="search"]::placeholder,
textarea::placeholder { textarea::placeholder {
color: var(--stone-5); color: var(--gray-5);
} }
/* 页面切换过渡 */ /* 页面切换过渡 */

View File

@@ -2,17 +2,17 @@
/* 使用 Open Props 的自定义颜色变量 */ /* 使用 Open Props 的自定义颜色变量 */
:root { :root {
--brand: var(--orange-6); --brand: var(--violet-6);
--brand-hover: var(--orange-7); --brand-hover: var(--violet-7);
--brand-light: var(--orange-2); --brand-light: var(--violet-2);
--text-light: var(--gray-5); --text-light: var(--gray-5);
--body-bg: var(--stone-0); --body-bg: var(--gray-0);
--surface: var(--stone-1); --surface: var(--gray-1);
--surface-hover: var(--stone-2); --surface-hover: var(--gray-2);
--border: var(--stone-3); --border: var(--gray-3);
--text-primary: var(--stone-11); --text-primary: var(--gray-11);
--text-secondary: var(--stone-7); --text-secondary: var(--gray-7);
--text-muted: var(--stone-5); --text-muted: var(--gray-5);
} }
/* 全局背景 */ /* 全局背景 */
@@ -79,7 +79,7 @@ li {
.btn-secondary:hover { .btn-secondary:hover {
background-color: var(--surface-hover); background-color: var(--surface-hover);
border-color: var(--stone-4); border-color: var(--gray-4);
} }
.btn-ghost { .btn-ghost {

View File

@@ -81,7 +81,7 @@ const handleClose = () => emit('update:modelValue', false)
position: relative; position: relative;
border: none; border: none;
border-radius: var(--radius-3); border-radius: var(--radius-3);
background-color: var(--stone-0); background-color: var(--gray-0);
box-shadow: var(--shadow-5); box-shadow: var(--shadow-5);
padding: 0; padding: 0;
width: 100%; width: 100%;

View File

@@ -83,8 +83,8 @@ function onVolumeChange(e) {
align-items: center; align-items: center;
gap: var(--size-3); gap: var(--size-3);
padding: var(--size-4); padding: var(--size-4);
background-color: var(--stone-2); background-color: var(--gray-2);
border-top: 1px solid var(--stone-4); border-top: 1px solid var(--gray-4);
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
} }
@@ -107,7 +107,7 @@ function onVolumeChange(e) {
display: block; display: block;
font-weight: 600; font-weight: 600;
font-size: var(--font-size-1); font-size: var(--font-size-1);
color: var(--stone-9); color: var(--gray-9);
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -116,7 +116,7 @@ function onVolumeChange(e) {
.track-artist { .track-artist {
font-size: var(--font-size-0); font-size: var(--font-size-0);
color: var(--stone-7); color: var(--gray-7);
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -136,30 +136,31 @@ function onVolumeChange(e) {
border: none; border: none;
background: none; background: none;
cursor: pointer; cursor: pointer;
color: var(--stone-9); color: var(--gray-9);
transition: color 0.2s; transition: color 0.2s;
} }
.control-btn:hover { .control-btn:hover {
color: var(--stone-11); color: var(--gray-11);
} }
.play-btn { .play-btn {
width: var(--size-8); width: var(--size-8);
height: var(--size-8); height: var(--size-8);
border: none; border: none;
background: var(--stone-9); background: var(--violet-6);
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: var(--stone-1); color: var(--white);
transition: transform 0.2s; transition: transform 0.2s, background-color 0.2s;
} }
.play-btn:hover { .play-btn:hover {
transform: scale(1.1); transform: scale(1.1);
background: var(--violet-7);
} }
.player-progress { .player-progress {
@@ -172,7 +173,7 @@ function onVolumeChange(e) {
.time { .time {
font-size: var(--font-size-0); font-size: var(--font-size-0);
color: var(--stone-7); color: var(--gray-7);
min-width: 35px; min-width: 35px;
} }
@@ -181,7 +182,7 @@ function onVolumeChange(e) {
height: 4px; height: 4px;
-webkit-appearance: none; -webkit-appearance: none;
appearance: none; appearance: none;
background: var(--stone-4); background: var(--gray-4);
border-radius: 2px; border-radius: 2px;
cursor: pointer; cursor: pointer;
} }
@@ -191,11 +192,15 @@ function onVolumeChange(e) {
appearance: none; appearance: none;
width: 12px; width: 12px;
height: 12px; height: 12px;
background: var(--stone-9); background: var(--violet-6);
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
} }
.progress-bar::-webkit-slider-thumb:hover {
background: var(--violet-7);
}
.player-volume { .player-volume {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -208,7 +213,7 @@ function onVolumeChange(e) {
border: none; border: none;
background: none; background: none;
cursor: pointer; cursor: pointer;
color: var(--stone-9); color: var(--gray-9);
} }
.volume-slider { .volume-slider {
@@ -216,7 +221,7 @@ function onVolumeChange(e) {
height: 4px; height: 4px;
-webkit-appearance: none; -webkit-appearance: none;
appearance: none; appearance: none;
background: var(--stone-4); background: var(--gray-4);
border-radius: 2px; border-radius: 2px;
cursor: pointer; cursor: pointer;
} }
@@ -226,11 +231,15 @@ function onVolumeChange(e) {
appearance: none; appearance: none;
width: 10px; width: 10px;
height: 10px; height: 10px;
background: var(--stone-9); background: var(--violet-6);
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
} }
.volume-slider::-webkit-slider-thumb:hover {
background: var(--violet-7);
}
/* 移动端响应式 */ /* 移动端响应式 */
@media (max-width: 768px) { @media (max-width: 768px) {
.player { .player {

View File

@@ -58,7 +58,7 @@ onBeforeUnmount(() => {
top: calc(100% + 4px); top: calc(100% + 4px);
right: 0; right: 0;
z-index: 1000; z-index: 1000;
background-color: var(--stone-0); background-color: var(--gray-0);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: var(--radius-2); border-radius: var(--radius-2);
box-shadow: var(--shadow-3); box-shadow: var(--shadow-3);

View File

@@ -44,7 +44,7 @@ const viewSongs = () => {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: var(--size-2); gap: var(--size-2);
background: linear-gradient(135deg, var(--stone-1) 0%, var(--stone-2) 100%); background: linear-gradient(135deg, var(--gray-1) 0%, var(--gray-2) 100%);
border: 1px solid var(--border); border: 1px solid var(--border);
aspect-ratio: var(--ratio-square); aspect-ratio: var(--ratio-square);
border-radius: var(--radius-3); border-radius: var(--radius-3);
@@ -56,7 +56,7 @@ const viewSongs = () => {
.library-card:hover { .library-card:hover {
transform: translateY(-4px); transform: translateY(-4px);
box-shadow: var(--shadow-3); box-shadow: var(--shadow-3);
border-color: var(--stone-4); border-color: var(--gray-4);
} }
.card-icon { .card-icon {
@@ -104,7 +104,7 @@ const viewSongs = () => {
} }
.card-menu-btn:hover { .card-menu-btn:hover {
background-color: var(--stone-3); background-color: var(--gray-3);
color: var(--text-primary); color: var(--text-primary);
} }
</style> </style>

View File

@@ -130,7 +130,7 @@ onMounted(() => {
} }
.empty-icon { .empty-icon {
color: var(--stone-4); color: var(--gray-4);
margin-bottom: var(--size-4); margin-bottom: var(--size-4);
} }

View File

@@ -115,7 +115,7 @@ onMounted(() => {
} }
.empty-icon { .empty-icon {
color: var(--stone-4); color: var(--gray-4);
margin-bottom: var(--size-4); margin-bottom: var(--size-4);
} }