Skip to content

Commit a676136

Browse files
committed
🔧 chore: 更新依赖版本,优化 Electron 窗口设置,调整歌词窗口背景色样式
1 parent 76e55d4 commit a676136

File tree

3 files changed

+33
-17
lines changed

3 files changed

+33
-17
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@
2121
"build:linux": "npm run build && electron-builder --linux"
2222
},
2323
"dependencies": {
24-
"@electron-toolkit/preload": "^3.0.0",
25-
"@electron-toolkit/utils": "^3.0.0",
24+
"@electron-toolkit/preload": "^3.0.1",
25+
"@electron-toolkit/utils": "^4.0.0",
2626
"@unblockneteasemusic/server": "^0.27.8-patch.1",
2727
"electron-store": "^8.1.0",
28-
"electron-updater": "^6.1.7",
28+
"electron-updater": "^6.6.2",
2929
"font-list": "^1.5.1",
3030
"netease-cloud-music-api-alger": "^4.26.1",
3131
"node-id3": "^0.2.9",
3232
"node-machine-id": "^1.1.12",
33-
"vue-i18n": "9"
33+
"vue-i18n": "^11.1.3"
3434
},
3535
"devDependencies": {
36-
"@electron-toolkit/eslint-config": "^1.0.2",
37-
"@electron-toolkit/eslint-config-ts": "^2.0.0",
36+
"@electron-toolkit/eslint-config": "^2.1.0",
37+
"@electron-toolkit/eslint-config-ts": "^3.1.0",
3838
"@electron-toolkit/tsconfig": "^1.0.1",
3939
"@rushstack/eslint-patch": "^1.10.3",
4040
"@tailwindcss/postcss7-compat": "^2.2.4",
@@ -48,15 +48,15 @@
4848
"@vue/eslint-config-prettier": "^9.0.0",
4949
"@vue/eslint-config-typescript": "^13.0.0",
5050
"@vue/runtime-core": "^3.5.0",
51-
"@vueuse/core": "^11.0.3",
52-
"@vueuse/electron": "^11.0.3",
51+
"@vueuse/core": "^11.3.0",
52+
"@vueuse/electron": "^11.3.0",
5353
"animate.css": "^4.1.1",
5454
"autoprefixer": "^10.4.20",
5555
"axios": "^1.7.7",
5656
"cross-env": "^7.0.3",
57-
"electron": "^35.0.2",
57+
"electron": "^35.1.5",
5858
"electron-builder": "^25.1.8",
59-
"electron-vite": "^3.0.0",
59+
"electron-vite": "^3.1.0",
6060
"eslint": "^8.57.0",
6161
"eslint-config-airbnb-base": "^15.0.0",
6262
"eslint-config-prettier": "^9.0.0",

src/main/lyric.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,18 @@ const createWin = () => {
8484
frame: false,
8585
show: false,
8686
transparent: true,
87+
opacity: 1,
8788
hasShadow: false,
8889
alwaysOnTop: true,
8990
resizable: true,
91+
roundedCorners: false,
9092
// 添加跨屏幕支持选项
9193
webPreferences: {
9294
preload: join(__dirname, '../preload/index.js'),
9395
sandbox: false,
9496
contextIsolation: true
95-
}
97+
},
98+
backgroundColor: '#00000000'
9699
});
97100

98101
// 监听窗口关闭事件

src/renderer/views/lyric/index.vue

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ const handleMouseLeave = () => {
172172
if (!lyricSetting.value.isLock) return;
173173
isHovering.value = false;
174174
windowData.electron.ipcRenderer.send('set-ignore-mouse', false);
175+
176+
// 强制重置背景色
177+
const lyricWindow = document.querySelector('.lyric-window') as HTMLElement;
178+
if (lyricWindow) {
179+
lyricWindow.style.background = 'transparent';
180+
// 使用 requestAnimationFrame 确保在下一帧重置
181+
requestAnimationFrame(() => {
182+
lyricWindow.style.background = 'transparent';
183+
});
184+
}
175185
};
176186
177187
// 监听锁定状态变化
@@ -633,8 +643,12 @@ const handleNext = () => {
633643
</script>
634644

635645
<style scoped>
636-
body {
646+
html,
647+
body,
648+
#app {
637649
background-color: transparent !important;
650+
box-shadow: none !important;
651+
border: none !important;
638652
}
639653
</style>
640654

@@ -644,14 +658,13 @@ body {
644658
height: 100vh;
645659
position: relative;
646660
overflow: hidden;
647-
background: transparent;
661+
background: transparent !important;
648662
user-select: none;
649-
transition: background-color 0.2s ease;
663+
transition: background-color 0.3s ease;
650664
cursor: default;
651665
border-radius: 14px;
652666
653667
&:hover {
654-
background: rgba(44, 44, 44, 0.466);
655668
.control-bar {
656669
&-show {
657670
opacity: 1;
@@ -670,7 +683,7 @@ body {
670683
--highlight-color: #1db954;
671684
--control-bg: rgba(124, 124, 124, 0.3);
672685
&:hover {
673-
background: rgba(44, 44, 44, 0.466);
686+
background: rgba(44, 44, 44, 0.466) !important;
674687
}
675688
}
676689
@@ -680,7 +693,7 @@ body {
680693
--highlight-color: #1db954;
681694
--control-bg: rgba(255, 255, 255, 0.3);
682695
&:hover {
683-
background: rgba(0, 0, 0, 0.434);
696+
background: rgba(0, 0, 0, 0.434) !important;
684697
}
685698
}
686699
}

0 commit comments

Comments
 (0)