mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-18 03:17:29 +08:00
🔧 chore: 更新依赖版本,优化 Electron 窗口设置,调整歌词窗口背景色样式
This commit is contained in:
+10
-10
@@ -21,20 +21,20 @@
|
|||||||
"build:linux": "npm run build && electron-builder --linux"
|
"build:linux": "npm run build && electron-builder --linux"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron-toolkit/preload": "^3.0.0",
|
"@electron-toolkit/preload": "^3.0.1",
|
||||||
"@electron-toolkit/utils": "^3.0.0",
|
"@electron-toolkit/utils": "^4.0.0",
|
||||||
"@unblockneteasemusic/server": "^0.27.8-patch.1",
|
"@unblockneteasemusic/server": "^0.27.8-patch.1",
|
||||||
"electron-store": "^8.1.0",
|
"electron-store": "^8.1.0",
|
||||||
"electron-updater": "^6.1.7",
|
"electron-updater": "^6.6.2",
|
||||||
"font-list": "^1.5.1",
|
"font-list": "^1.5.1",
|
||||||
"netease-cloud-music-api-alger": "^4.26.1",
|
"netease-cloud-music-api-alger": "^4.26.1",
|
||||||
"node-id3": "^0.2.9",
|
"node-id3": "^0.2.9",
|
||||||
"node-machine-id": "^1.1.12",
|
"node-machine-id": "^1.1.12",
|
||||||
"vue-i18n": "9"
|
"vue-i18n": "^11.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron-toolkit/eslint-config": "^1.0.2",
|
"@electron-toolkit/eslint-config": "^2.1.0",
|
||||||
"@electron-toolkit/eslint-config-ts": "^2.0.0",
|
"@electron-toolkit/eslint-config-ts": "^3.1.0",
|
||||||
"@electron-toolkit/tsconfig": "^1.0.1",
|
"@electron-toolkit/tsconfig": "^1.0.1",
|
||||||
"@rushstack/eslint-patch": "^1.10.3",
|
"@rushstack/eslint-patch": "^1.10.3",
|
||||||
"@tailwindcss/postcss7-compat": "^2.2.4",
|
"@tailwindcss/postcss7-compat": "^2.2.4",
|
||||||
@@ -48,15 +48,15 @@
|
|||||||
"@vue/eslint-config-prettier": "^9.0.0",
|
"@vue/eslint-config-prettier": "^9.0.0",
|
||||||
"@vue/eslint-config-typescript": "^13.0.0",
|
"@vue/eslint-config-typescript": "^13.0.0",
|
||||||
"@vue/runtime-core": "^3.5.0",
|
"@vue/runtime-core": "^3.5.0",
|
||||||
"@vueuse/core": "^11.0.3",
|
"@vueuse/core": "^11.3.0",
|
||||||
"@vueuse/electron": "^11.0.3",
|
"@vueuse/electron": "^11.3.0",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"axios": "^1.7.7",
|
"axios": "^1.7.7",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"electron": "^35.0.2",
|
"electron": "^35.1.5",
|
||||||
"electron-builder": "^25.1.8",
|
"electron-builder": "^25.1.8",
|
||||||
"electron-vite": "^3.0.0",
|
"electron-vite": "^3.1.0",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-airbnb-base": "^15.0.0",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
|
|||||||
+4
-1
@@ -84,15 +84,18 @@ const createWin = () => {
|
|||||||
frame: false,
|
frame: false,
|
||||||
show: false,
|
show: false,
|
||||||
transparent: true,
|
transparent: true,
|
||||||
|
opacity: 1,
|
||||||
hasShadow: false,
|
hasShadow: false,
|
||||||
alwaysOnTop: true,
|
alwaysOnTop: true,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
|
roundedCorners: false,
|
||||||
// 添加跨屏幕支持选项
|
// 添加跨屏幕支持选项
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: join(__dirname, '../preload/index.js'),
|
preload: join(__dirname, '../preload/index.js'),
|
||||||
sandbox: false,
|
sandbox: false,
|
||||||
contextIsolation: true
|
contextIsolation: true
|
||||||
}
|
},
|
||||||
|
backgroundColor: '#00000000'
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听窗口关闭事件
|
// 监听窗口关闭事件
|
||||||
|
|||||||
@@ -172,6 +172,16 @@ const handleMouseLeave = () => {
|
|||||||
if (!lyricSetting.value.isLock) return;
|
if (!lyricSetting.value.isLock) return;
|
||||||
isHovering.value = false;
|
isHovering.value = false;
|
||||||
windowData.electron.ipcRenderer.send('set-ignore-mouse', false);
|
windowData.electron.ipcRenderer.send('set-ignore-mouse', false);
|
||||||
|
|
||||||
|
// 强制重置背景色
|
||||||
|
const lyricWindow = document.querySelector('.lyric-window') as HTMLElement;
|
||||||
|
if (lyricWindow) {
|
||||||
|
lyricWindow.style.background = 'transparent';
|
||||||
|
// 使用 requestAnimationFrame 确保在下一帧重置
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
lyricWindow.style.background = 'transparent';
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 监听锁定状态变化
|
// 监听锁定状态变化
|
||||||
@@ -633,8 +643,12 @@ const handleNext = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
body {
|
html,
|
||||||
|
body,
|
||||||
|
#app {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
border: none !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -644,14 +658,13 @@ body {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: transparent;
|
background: transparent !important;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
transition: background-color 0.2s ease;
|
transition: background-color 0.3s ease;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(44, 44, 44, 0.466);
|
|
||||||
.control-bar {
|
.control-bar {
|
||||||
&-show {
|
&-show {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@@ -670,7 +683,7 @@ body {
|
|||||||
--highlight-color: #1db954;
|
--highlight-color: #1db954;
|
||||||
--control-bg: rgba(124, 124, 124, 0.3);
|
--control-bg: rgba(124, 124, 124, 0.3);
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(44, 44, 44, 0.466);
|
background: rgba(44, 44, 44, 0.466) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,7 +693,7 @@ body {
|
|||||||
--highlight-color: #1db954;
|
--highlight-color: #1db954;
|
||||||
--control-bg: rgba(255, 255, 255, 0.3);
|
--control-bg: rgba(255, 255, 255, 0.3);
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(0, 0, 0, 0.434);
|
background: rgba(0, 0, 0, 0.434) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user