diff --git a/package.json b/package.json index dc4e7f1..9487854 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@tailwindcss/postcss7-compat": "^2.2.4", "@types/howler": "^2.2.12", "@types/node": "^20.14.8", + "@types/tinycolor2": "^1.4.6", "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^7.0.0", "@vitejs/plugin-vue": "^5.0.5", @@ -70,6 +71,7 @@ "remixicon": "^4.2.0", "sass": "^1.82.0", "tailwindcss": "^3.4.15", + "tinycolor2": "^1.6.0", "typescript": "^5.5.2", "unplugin-auto-import": "^0.18.2", "unplugin-vue-components": "^0.27.4", diff --git a/src/main/modules/config.ts b/src/main/modules/config.ts index 9a6bee2..bb8348f 100644 --- a/src/main/modules/config.ts +++ b/src/main/modules/config.ts @@ -4,26 +4,28 @@ import Store from 'electron-store'; import set from '../set.json'; import { defaultShortcuts } from './shortcuts'; -interface StoreType { - set: { - isProxy: boolean; - noAnimate: boolean; - animationSpeed: number; - author: string; - authorUrl: string; - musicApiPort: number; - closeAction: 'ask' | 'minimize' | 'close'; - musicQuality: string; - fontFamily: string; - proxyConfig: { - enable: boolean; - protocol: string; - host: string; - port: number; - }; - enableRealIP: boolean; - realIP: string; +type SetConfig = { + isProxy: boolean; + proxyConfig: { + enable: boolean; + protocol: string; + host: string; + port: number; }; + enableRealIP: boolean; + realIP: string; + noAnimate: boolean; + animationSpeed: number; + author: string; + authorUrl: string; + musicApiPort: number; + closeAction: 'ask' | 'minimize' | 'close'; + musicQuality: string; + fontFamily: string; + fontScope: 'global' | 'lyric'; +}; +interface StoreType { + set: SetConfig; shortcuts: typeof defaultShortcuts; } @@ -36,7 +38,7 @@ export function initializeConfig() { store = new Store({ name: 'config', defaults: { - set, + set: set as SetConfig, shortcuts: defaultShortcuts } }); diff --git a/src/renderer/assets/css/base.css b/src/renderer/assets/css/base.css index d7c3c73..3b1a2fe 100644 --- a/src/renderer/assets/css/base.css +++ b/src/renderer/assets/css/base.css @@ -9,3 +9,7 @@ body { border-radius: 0.5rem !important; overflow: hidden !important; } +.n-popover:has(.transparent-popover ) { + background-color: transparent !important; + padding: 0 !important; +} diff --git a/src/renderer/components/lyric/LyricSettings.vue b/src/renderer/components/lyric/LyricSettings.vue new file mode 100644 index 0000000..bdd3cf9 --- /dev/null +++ b/src/renderer/components/lyric/LyricSettings.vue @@ -0,0 +1,192 @@ + + + + + diff --git a/src/renderer/layout/AppLayout.vue b/src/renderer/layout/AppLayout.vue index d7ab0a9..7cb3c62 100644 --- a/src/renderer/layout/AppLayout.vue +++ b/src/renderer/layout/AppLayout.vue @@ -25,7 +25,7 @@ - + diff --git a/src/renderer/layout/components/MusicFull.vue b/src/renderer/layout/components/MusicFull.vue index c87a97d..2f5b5f0 100644 --- a/src/renderer/layout/components/MusicFull.vue +++ b/src/renderer/layout/components/MusicFull.vue @@ -7,9 +7,29 @@ :to="`#layout-main`" :z-index="9998" > -
-
+
+ +
+ + + + + + +
@@ -44,16 +64,39 @@
-
+
-
+ + +
+
+
{{ playMusic.name }}
+
+ + {{ item.name }} + {{ index < artistList.length - 1 ? ' / ' : '' }} + +
+
{{ item.text }} -
{{ item.trText }}
+
+ {{ item.trText }} +
@@ -84,9 +129,10 @@ @@ -318,7 +508,7 @@ defineExpose({ } #drawer-target { - @apply top-0 left-0 absolute overflow-hidden rounded px-24 flex items-center justify-center w-full h-full pb-8; + @apply top-0 left-0 absolute overflow-hidden rounded px-24 flex items-center justify-center w-full h-full py-8; animation-duration: 300ms; .music-img { @@ -326,12 +516,23 @@ defineExpose({ max-width: 360px; max-height: 360px; .img { - @apply rounded-xl w-full h-full shadow-2xl; + @apply rounded-xl w-full h-full shadow-2xl; } } .music-content { @apply flex flex-col justify-center items-center relative; + width: 500px; + + &.center { + @apply w-full; + .music-lrc { + @apply w-full max-w-3xl mx-auto; + } + .music-lrc-text { + @apply text-center; + } + } &-name { @apply font-bold text-2xl pb-1 pt-4; @@ -346,15 +547,46 @@ defineExpose({ display: none; @apply flex justify-center items-center; } + + .music-lrc-container { + padding-top: 30vh; + } + .music-lrc { background-color: inherit; width: 500px; height: 550px; + position: relative; mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%); + -webkit-mask-image: linear-gradient( + to bottom, + transparent 0%, + black 10%, + black 90%, + transparent 100% + ); + + .music-info-header { + @apply mb-8; + + .music-info-name { + @apply text-4xl font-bold mb-2; + color: var(--text-color-active); + } + + .music-info-singer { + @apply text-base; + color: var(--text-color-primary); + } + } + &-text { @apply text-2xl cursor-pointer font-bold px-2 py-4; transition: all 0.3s ease; background-color: transparent; + font-size: var(--lyric-font-size, 22px) !important; + letter-spacing: var(--lyric-letter-spacing, 0) !important; + line-height: var(--lyric-line-height, 2) !important; span { background-clip: text !important; @@ -415,11 +647,49 @@ defineExpose({ } #drawer-target { - @apply top-0 left-0 absolute overflow-hidden rounded px-24 flex items-center justify-center w-full h-full pb-8; + @apply top-0 left-0 absolute overflow-hidden rounded px-24 flex items-center justify-center w-full h-full py-8; animation-duration: 300ms; .music-lrc-text { font-family: var(--current-font-family); } } + +.close-btn { + opacity: 0.3; + transition: opacity 0.3s ease; + + &:hover { + opacity: 1; + } +} + +.control-btn { + @apply w-9 h-9 flex items-center justify-center rounded cursor-pointer transition-all duration-300; + background: rgba(142, 142, 142, 0.192); + backdrop-filter: blur(12px); + + i { + @apply text-xl; + color: var(--text-color-active); + } + + &.pure-mode { + background: transparent; + backdrop-filter: none; + + &:not(:hover) { + i { + opacity: 0; + } + } + } + + &:hover { + background: rgba(126, 121, 121, 0.2); + i { + opacity: 1; + } + } +} diff --git a/src/renderer/layout/components/PlayBar.vue b/src/renderer/layout/components/PlayBar.vue index bb4a894..7b49a60 100644 --- a/src/renderer/layout/components/PlayBar.vue +++ b/src/renderer/layout/components/PlayBar.vue @@ -1,9 +1,13 @@