From 0a0d6969ec49813cd400860b87aca522e01d3f42 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 14 Nov 2020 11:48:51 +0800 Subject: [PATCH 01/49] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/assets/styles/variables.less | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/src/renderer/assets/styles/variables.less b/src/renderer/assets/styles/variables.less index 1957fa7456..8536aa7d8e 100644 --- a/src/renderer/assets/styles/variables.less +++ b/src/renderer/assets/styles/variables.less @@ -652,6 +652,62 @@ @color-blue2-badge-info: #b080db; @color-blue2-badge-info-font: #fff; +@color-blue2-theme: #070707; +@color-blue2-theme-bgimg: none; +@color-blue2-theme-bgposition: center; +@color-blue2-theme-bgsize: auto auto; +@color-blue2-theme-hover: fadeout(lighten(@color-blue2-theme, 13%), 30%); +@color-blue2-theme-active: fadeout(lighten(@color-blue2-theme, 8%), 30%); +@color-blue2-theme-font: lighten(@color-blue2-theme, 55%); +@color-blue2-theme-font-label: lighten(@color-blue2-theme, 35%); +@color-blue2-theme_2: #000000; +@color-blue2-theme_2-background_1: #000000; +@color-blue2-theme_2-background_2: fadeout(@color-blue2-theme_2-background_1, 2%); +@color-blue2-theme_2-hover: fadeout(lighten(@color-blue2-theme, 10%), 80%); +@color-blue2-theme_2-active: fadeout(lighten(@color-blue2-theme, 10%), 70%); +@color-blue2-theme_2-font: lighten(@color-blue2-theme_2, 65%); +@color-blue2-theme_2-font-label: darken(@color-blue2-theme_2-font, 30%); +// @color-blue2-theme_2-line: transparent; +@color-blue2-theme_2-line: lighten(@color-blue2-theme_2, 3%); +@color-blue2-reply-floor: fadeout(lighten(@color-blue2-theme, 60%), 95%); +@color-blue2-theme-sidebar: @color-blue2-theme; +@color-blue2-btn: lighten(@color-blue2-theme, 40%); +@color-blue2-btn-background: fadeout(lighten(@color-blue2-theme, 30%), 70%); +@color-blue2-btn-hover: fadeout(lighten(@color-blue2-theme, 40%), 70%); +@color-blue2-btn-active: fadeout(lighten(@color-blue2-theme, 20%), 70%); +@color-blue2-btn-select: fadeout(lighten(@color-blue2-theme, 25%), 70%); +@color-blue2-pagination-background: fadeout(lighten(@color-blue2-theme, 25%), 20%); +@color-blue2-pagination-hover: fadeout(lighten(@color-blue2-theme, 10%), 70%); +@color-blue2-pagination-active: fadeout(darken(@color-blue2-theme, 10%), 70%); +@color-blue2-pagination-select: fadeout(lighten(@color-blue2-theme, 10%), 50%); +@color-blue2-search-form-background: fadeout(lighten(@color-blue2-theme, 35%), 10%); +@color-blue2-search-list-hover: fadeout(darken(@color-blue2-theme, 10%), 70%); +@color-blue2-scrollbar-track: fadeout(lighten(@color-blue2-theme, 10%), 75%); +@color-blue2-scrollbar-thumb: fadeout(lighten(@color-blue2-theme, 10%), 50%); +@color-blue2-scrollbar-thumb-hover: fadeout(lighten(@color-blue2-theme, 10%), 35%); +@color-blue2-player-pic-c1: fadeout(@color-blue2-theme_2, 50%); +@color-blue2-player-pic-c2: darken(@color-blue2-theme_2, 30%); +@color-blue2-player-progress: darken(@color-blue2-theme_2, 6%); +@color-blue2-player-progress-bar1: darken(@color-blue2-theme_2, 12%); +@color-blue2-player-progress-bar2: lighten(@color-blue2-theme, 12%); +@color-blue2-player-status-text: darken(@color-blue2-theme_2-font, 20%); +@color-blue2-player-detail-play-btn: lighten(@color-blue2-theme, 7%); +@color-blue2-tab-btn-background: fadeout(lighten(@color-blue2-theme, 10%), 80%); +@color-blue2-tab-btn-background-hover: @color-blue2-theme_2-hover; +@color-blue2-tab-border-top: fadeout(lighten(@color-blue2-theme, 5%), 50%); +@color-blue2-tab-border-bottom: lighten(@color-blue2-theme, 5%); +@color-blue2-hideBtn: #3bc2b2; +@color-blue2-minBtn: #85c43b; +@color-blue2-maxBtn: #e7aa36; +@color-blue2-closeBtn: #ea6e4d; +@color-blue2-hideBtn-hover: fadeout(@color-hideBtn, 10%); +@color-blue2-minBtn-hover: fadeout(@color-blue2-minBtn, 10%); +@color-blue2-maxBtn-hover: fadeout(@color-blue2-maxBtn, 10%); +@color-blue2-closeBtn-hover: fadeout(@color-blue2-closeBtn, 10%); +@color-blue2-badge-success: lighten(@color-blue2-theme, 15%); +@color-blue2-badge-success-font: #fff; +@color-blue2-badge-info: #b080db; +@color-blue2-badge-info-font: #fff; @color-mid_autumn-theme: rgba(74, 55, 82, 1); @color-mid_autumn-theme-bgimg: url(../images/jqbg.jpg); From 4b1bf29ea00286555875c2d50f474b97bceafcb3 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 7 Mar 2021 17:54:02 +0800 Subject: [PATCH 02/49] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0`-dhmkh`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FAQ.md | 6 ++++++ README.md | 2 ++ publish/changeLog.md | 4 ++++ src/main/index.js | 2 ++ 4 files changed, 14 insertions(+) diff --git a/FAQ.md b/FAQ.md index 61882e1731..2a3b6d0f15 100644 --- a/FAQ.md +++ b/FAQ.md @@ -123,6 +123,12 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的 尝试更换网络,如切换到移动网络。 +### 启用软件时导致耳机意外关机 + +据反馈,漫步者部分型号的耳机与本软件一起使用时将会导致耳机意外关机, +详情看:, +若出现该问题可尝试添加`-dhmkh`启动参数解决,启动参数添加方法请自行百度“windows给应用程序加启动参数的方法”。 + ### 其他错误 按照前面的 "歌曲无法试听与下载" 方案解决。 diff --git a/README.md b/README.md index 4fe4d8f7ca..bd11c2e4c7 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ npm run pack:linux - `-search` 启动软件时自动在搜索框搜索指定的内容,例如:`-search="突然的自我 - 伍佰"` - `-dha` 禁用硬件加速启动(Disable Hardware Acceleration),窗口显示有问题时可以尝试添加此参数启动(v1.6.0起新增) - `-dt` 以非透明模式启动(Disable Transparent),对于未开启AERO效果的win7系统可加此参数启动以确保界面正常显示(注:该参数对桌面歌词无效),原来的`-nt`参数已重命名为`-dt`(v1.6.0起重命名) +- `-dhmkh` 禁用硬件媒体密钥处理(Disable Hardware Media Key Handling),此选项将禁用Chromium的Hardware Media Key Handling特性(v1.8.1起新增) - `-play` 启动时播放指定列表的音乐,参数说明: - `type`:播放类型,目前固定为`songList` - `source`:播放源,可用值为`kw/kg/tx/wy/mg/myList`,其中`kw/kg/tx/wy/mg`对应各源的在线列表,`myList`为本地列表 @@ -90,6 +91,7 @@ npm run pack:linux - `name`:要播放的本地列表歌单名字,source为`myList`时必传,举例:`./lx-music-desktop -play="type=songList&source=myList&name=默认列表" - `index`:从列表的哪个位置开始播放,选传,若不传默认播放第一首歌曲,举例:`./lx-music-desktop -play="type=songList&source=myList&name=默认列表&index=2" + ### 常见问题 常见问题已移至: diff --git a/publish/changeLog.md b/publish/changeLog.md index 68c9c7076a..b48a9b2124 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,3 +1,7 @@ +### 新增 + +- 新增启动参数`-dhmkh`,此参数将禁用软件对系统媒体按键的处理,用于解决漫步者部分型号耳机与本程序冲突导致耳机意外关机的问题 + ### 修复 - 修复歌词翻译的主题颜色适配问题 diff --git a/src/main/index.js b/src/main/index.js index e4544b34bb..81b6b1f1c2 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -29,6 +29,8 @@ require('./env') // Is disable hardware acceleration if (global.envParams.cmdParams.dha) app.disableHardwareAcceleration() if (global.envParams.cmdParams.dt == null && global.envParams.cmdParams.nt != null) global.envParams.cmdParams.dt = global.envParams.cmdParams.nt +if (global.envParams.cmdParams.dhmkh) app.commandLine.appendSwitch('disable-features', 'HardwareMediaKeyHandling') + // https://github.com/electron/electron/issues/22691 app.commandLine.appendSwitch('wm-window-animations-disabled') From af59a4472ad32ff8382d1c33f866ba74fda45534 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Thu, 11 Mar 2021 17:34:29 +0800 Subject: [PATCH 03/49] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/core/PlayerDetail.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/core/PlayerDetail.vue b/src/renderer/components/core/PlayerDetail.vue index 5e0e3c5fb3..6ee75c70c1 100644 --- a/src/renderer/components/core/PlayerDetail.vue +++ b/src/renderer/components/core/PlayerDetail.vue @@ -592,7 +592,7 @@ export default { .translation { transition: @transition-theme !important; transition-property: font-size, color; - font-size: 1em; + font-size: .9em; margin-top: 5px; } .line { @@ -606,7 +606,7 @@ export default { color: @color-theme; } .translation { - font-size: 1.2em; + font-size: 1.1em; color: @color-theme; } span { From 68d8369a8b6cd7441e2b69a686d96fc613367c93 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 12 Mar 2021 09:02:40 +0800 Subject: [PATCH 04/49] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=8D=95=E8=AF=8D?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/defaultSetting.js | 2 +- src/common/utils.js | 8 ++++++-- src/main/modules/winLyric/event.js | 2 +- src/main/modules/winLyric/rendererEvent.js | 2 +- src/renderer-lyric/App.vue | 8 ++++---- src/renderer-lyric/components/core/Lyric.vue | 8 ++++---- src/renderer/components/core/Player.vue | 6 +++--- src/renderer/components/material/PactModal.vue | 2 +- src/renderer/utils/lyric-font-player/index.js | 1 + src/renderer/views/Setting.vue | 2 +- 10 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/common/defaultSetting.js b/src/common/defaultSetting.js index f2a463ca67..b2830f2d65 100644 --- a/src/common/defaultSetting.js +++ b/src/common/defaultSetting.js @@ -11,7 +11,7 @@ const defaultSetting = { isMute: false, mediaDeviceId: 'default', isMediaDeviceRemovedStopPlay: false, - isShowLyricTransition: false, + isShowLyricTranslation: false, isPlayLxlrc: true, isSavePlayTime: false, }, diff --git a/src/common/utils.js b/src/common/utils.js index 439a6191b9..78e7c5b844 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -182,6 +182,11 @@ exports.initSetting = () => { electronStore_config.set('setting.list.isSaveScrollLocation', scroll.enable) delete setting.list.scroll } + + if (setting.player.isShowLyricTransition != null) { // 修正拼写问题 v1.8.2 及以前 + setting.player.isShowLyricTranslation = setting.player.isShowLyricTransition + delete setting.player.isShowLyricTransition + } } // 从我的列表分离下载列表 v1.7.0 后 @@ -197,8 +202,7 @@ exports.initSetting = () => { if (!newSetting.leaderboard.tabId.includes('__')) newSetting.leaderboard.tabId = 'kw__16' // newSetting.controlBtnPosition = 'right' - electronStore_config.set('version', settingVersion) - electronStore_config.set('setting', newSetting) + electronStore_config.set({ version: settingVersion, setting: newSetting }) return { version: settingVersion, setting: newSetting } } diff --git a/src/main/modules/winLyric/event.js b/src/main/modules/winLyric/event.js index 4997dfffb5..658725dda3 100644 --- a/src/main/modules/winLyric/event.js +++ b/src/main/modules/winLyric/event.js @@ -13,7 +13,7 @@ const setLrcConfig = () => { mainSend(global.modules.lyricWindow, ipcWinLyricNames.set_lyric_config, { config: desktopLyric, languageId: global.appSetting.langId, - isShowLyricTransition: global.appSetting.player.isShowLyricTransition, + isShowLyricTranslation: global.appSetting.player.isShowLyricTranslation, isPlayLxlrc: global.appSetting.player.isPlayLxlrc, }) if (isLock != desktopLyric.isLock) { diff --git a/src/main/modules/winLyric/rendererEvent.js b/src/main/modules/winLyric/rendererEvent.js index 091e81f856..39e60d0de2 100644 --- a/src/main/modules/winLyric/rendererEvent.js +++ b/src/main/modules/winLyric/rendererEvent.js @@ -27,7 +27,7 @@ mainHandle(ipcWinLyricNames.get_lyric_config, async() => { return { config: global.appSetting.desktopLyric, languageId: global.appSetting.langId, - isShowLyricTransition: global.appSetting.player.isShowLyricTransition, + isShowLyricTranslation: global.appSetting.player.isShowLyricTranslation, isPlayLxlrc: global.appSetting.player.isPlayLxlrc, } }) diff --git a/src/renderer-lyric/App.vue b/src/renderer-lyric/App.vue index 0bbc1532b9..fc5a61d0ff 100644 --- a/src/renderer-lyric/App.vue +++ b/src/renderer-lyric/App.vue @@ -4,7 +4,7 @@ transition(enter-active-class="animated-fast fadeIn" leave-active-class="animated-fast fadeOut") .control-bar(v-show="!lrcConfig.isLock") core-control-bar(:lrcConfig="lrcConfig" :themes="themeList") - core-lyric(:lrcConfig="lrcConfig" :isPlayLxlrc="isPlayLxlrc" :isShowLyricTransition="isShowLyricTransition") + core-lyric(:lrcConfig="lrcConfig" :isPlayLxlrc="isPlayLxlrc" :isShowLyricTranslation="isShowLyricTranslation") div.resize-left(@mousedown.self="handleMouseDown('left', $event)") div.resize-top(@mousedown.self="handleMouseDown('top', $event)") div.resize-right(@mousedown.self="handleMouseDown('right', $event)") @@ -44,7 +44,7 @@ export default { isZoomActiveLrc: true, }, }, - isShowLyricTransition: true, + isShowLyricTranslation: true, isPlayLxlrc: true, themeList: [ { @@ -119,9 +119,9 @@ export default { document.removeEventListener('mouseup', this.handleMouseUp) }, methods: { - handleUpdateConfig({ config, languageId, isShowLyricTransition, isPlayLxlrc }) { + handleUpdateConfig({ config, languageId, isShowLyricTranslation, isPlayLxlrc }) { this.lrcConfig = config - this.isShowLyricTransition = isShowLyricTransition + this.isShowLyricTranslation = isShowLyricTranslation this.isPlayLxlrc = isPlayLxlrc if (this.$i18n.locale !== languageId && languageId != null) this.$i18n.locale = languageId }, diff --git a/src/renderer-lyric/components/core/Lyric.vue b/src/renderer-lyric/components/core/Lyric.vue index fd1927a04b..88d505d493 100644 --- a/src/renderer-lyric/components/core/Lyric.vue +++ b/src/renderer-lyric/components/core/Lyric.vue @@ -32,7 +32,7 @@ export default { type: Boolean, default: true, }, - isShowLyricTransition: { + isShowLyricTranslation: { type: Boolean, default: true, }, @@ -126,7 +126,7 @@ export default { }, immediate: true, }, - isShowLyricTransition() { + isShowLyricTranslation() { this.setLyric() rendererSend(NAMES.winLyric.get_lyric_info, 'status') }, @@ -306,8 +306,8 @@ export default { setLyric() { window.lrc.setLyric( this.isPlayLxlrc && this.lyrics.lxlyric ? this.lyrics.lxlyric : this.lyrics.lyric, - this.isShowLyricTransition && this.lyrics.tlyric ? this.lyrics.tlyric : '', - // (this.isShowLyricTransition && this.lyrics.tlyric ? (this.lyrics.tlyric + '\n') : '') + (this.lyrics.lyric || ''), + this.isShowLyricTranslation && this.lyrics.tlyric ? this.lyrics.tlyric : '', + // (this.isShowLyricTranslation && this.lyrics.tlyric ? (this.lyrics.tlyric + '\n') : '') + (this.lyrics.lyric || ''), ) }, }, diff --git a/src/renderer/components/core/Player.vue b/src/renderer/components/core/Player.vue index 842e476c81..89b71e125f 100644 --- a/src/renderer/components/core/Player.vue +++ b/src/renderer/components/core/Player.vue @@ -272,7 +272,7 @@ export default { 'setting.player.mediaDeviceId'(n) { this.setMediaDevice() }, - 'setting.player.isShowLyricTransition'() { + 'setting.player.isShowLyricTranslation'() { this.setLyric() }, 'setting.player.isPlayLxlrc'() { @@ -860,9 +860,9 @@ export default { setLyric() { window.lrc.setLyric( this.setting.player.isPlayLxlrc && this.musicInfo.lxlrc ? this.musicInfo.lxlrc : this.musicInfo.lrc, - this.setting.player.isShowLyricTransition && this.musicInfo.tlrc ? this.musicInfo.tlrc : '', + this.setting.player.isShowLyricTranslation && this.musicInfo.tlrc ? this.musicInfo.tlrc : '', // ( - // this.setting.player.isShowLyricTransition && this.musicInfo.tlrc + // this.setting.player.isShowLyricTranslation && this.musicInfo.tlrc // ? (this.musicInfo.tlrc + '\n') // : '' // ) + (this.musicInfo.lrc || ''), diff --git a/src/renderer/components/material/PactModal.vue b/src/renderer/components/material/PactModal.vue index 9b42af5491..ff6cee0624 100644 --- a/src/renderer/components/material/PactModal.vue +++ b/src/renderer/components/material/PactModal.vue @@ -80,7 +80,7 @@ export default { watch: { 'setting.isAgreePact'(n) { if (n) return - this.time = 10 + this.time = 5 this.startTimeout() }, }, diff --git a/src/renderer/utils/lyric-font-player/index.js b/src/renderer/utils/lyric-font-player/index.js index b855e66702..d542b640b9 100644 --- a/src/renderer/utils/lyric-font-player/index.js +++ b/src/renderer/utils/lyric-font-player/index.js @@ -139,6 +139,7 @@ module.exports = class Lyric { return { text: line.text.replace(fontTimeExp, ''), time: line.time, + translation: line.translation, dom_line: fontPlayer.lineContent, } }) diff --git a/src/renderer/views/Setting.vue b/src/renderer/views/Setting.vue index 6a45292dbd..555929d1c8 100644 --- a/src/renderer/views/Setting.vue +++ b/src/renderer/views/Setting.vue @@ -68,7 +68,7 @@ div(:class="$style.main") div(:class="$style.gapTop") material-checkbox(id="setting_player_save_play_time" v-model="current_setting.player.isSavePlayTime" :label="$t('view.setting.play_save_play_time')") div(:class="$style.gapTop") - material-checkbox(id="setting_player_lyric_transition" v-model="current_setting.player.isShowLyricTransition" :label="$t('view.setting.play_lyric_transition')") + material-checkbox(id="setting_player_lyric_transition" v-model="current_setting.player.isShowLyricTranslation" :label="$t('view.setting.play_lyric_transition')") div(:class="$style.gapTop") material-checkbox(id="setting_player_lyric_play_lxlrc" v-model="current_setting.player.isPlayLxlrc" :label="$t('view.setting.play_lyric_lxlrc')") div(:class="$style.gapTop") From 08d0758616335a6df2f4d197d06133d3a2ee7666 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 12 Mar 2021 16:22:22 +0800 Subject: [PATCH 05/49] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=E4=B8=8E=E6=81=A2=E5=A4=8D=E5=8A=9F=E8=83=BD=E5=9C=A8=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E6=95=B0=E6=8D=AE=E6=97=B6=E6=9F=90=E4=BA=9B=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E7=AB=8B=E5=8D=B3=E7=94=9F=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 4 ++-- src/main/event.js | 2 +- src/main/events/Common.js | 8 +++---- src/main/events/_name.js | 2 +- src/main/index.js | 15 ++++++++---- src/main/modules/tray.js | 14 +++++------ src/main/modules/winLyric/event.js | 5 ++-- src/main/modules/winLyric/index.js | 2 +- src/main/modules/winLyric/rendererEvent.js | 2 +- src/main/rendererEvents/appSetting.js | 8 ++++--- src/main/utils/index.js | 18 ++++++++++----- src/renderer/App.vue | 8 +++---- .../components/material/PactModal.vue | 2 +- src/renderer/utils/index.js | 2 +- src/renderer/views/Setting.vue | 23 +++++++++++++++---- 15 files changed, 71 insertions(+), 44 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 6cc4b96187..aa287498b3 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,4 +1,4 @@ ### 修复 -- 修复歌曲ID存储变更导致酷狗图片获取失败的问题 -- 修复收藏的在线列表id迁移保存出错的问题 +- 修复备份与恢复功能在恢复数据时某些设置不立即生效的问题 + diff --git a/src/main/event.js b/src/main/event.js index b51b516388..155e3f35a3 100644 --- a/src/main/event.js +++ b/src/main/event.js @@ -2,7 +2,7 @@ const { common: COMMON_EVENT_NAME, mainWindow: MAIN_WINDOW_EVENT_NAME } = requir const { mainSend, NAMES: { mainWindow: ipcMainWindowNames } } = require('./../common/ipc') const { getAppHotKeyConfig } = require('./utils') -global.lx_event.common.on(COMMON_EVENT_NAME.config, name => { +global.lx_event.common.on(COMMON_EVENT_NAME.configStatus, name => { if (MAIN_WINDOW_EVENT_NAME.name === name) return if (global.modules.mainWindow) mainSend(global.modules.mainWindow, ipcMainWindowNames.set_config, global.appSetting) }) diff --git a/src/main/events/Common.js b/src/main/events/Common.js index bf1e428cd1..bb9dea0d4f 100644 --- a/src/main/events/Common.js +++ b/src/main/events/Common.js @@ -1,16 +1,14 @@ const { EventEmitter } = require('events') const { common: COMMON_EVENT_NAME } = require('./_name') -const { updateSetting } = require('../utils') class Common extends EventEmitter { initSetting() { this.emit(COMMON_EVENT_NAME.initConfig) - this.emit(COMMON_EVENT_NAME.config, null) + this.configStatus(null) } - setAppConfig(config, name) { - if (config) updateSetting(config) - this.emit(COMMON_EVENT_NAME.config, name) + configStatus(name) { + this.emit(COMMON_EVENT_NAME.configStatus, name) } } diff --git a/src/main/events/_name.js b/src/main/events/_name.js index 251ba7bb7a..d15a2c09cd 100644 --- a/src/main/events/_name.js +++ b/src/main/events/_name.js @@ -1,6 +1,6 @@ exports.common = { initConfig: 'initConfig', - config: 'config', + configStatus: 'config', } exports.mainWindow = { diff --git a/src/main/index.js b/src/main/index.js index e4544b34bb..2eb1bfae5d 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -34,8 +34,8 @@ app.commandLine.appendSwitch('wm-window-animations-disabled') const { navigationUrlWhiteList } = require('../common/config') -const { getWindowSizeInfo } = require('./utils') -const { isMac, isLinux, initSetting, initHotKey } = require('../common/utils') +const { getWindowSizeInfo, initSetting, updateSetting } = require('./utils') +const { isMac, isLinux, initHotKey } = require('../common/utils') // https://github.com/electron/electron/issues/18397 @@ -130,11 +130,16 @@ global.appHotKey = { state: null, } +global.lx_core = { + setAppConfig(setting, name) { + updateSetting(setting) + global.lx_event.common.configStatus(name) + }, +} + function init() { console.log('init') - const info = initSetting() - global.appSetting = info.setting - global.appSettingVersion = info.version + initSetting() global.appHotKey.config = initHotKey() global.lx_event.common.initSetting() global.lx_event.hotKey.init() diff --git a/src/main/modules/tray.js b/src/main/modules/tray.js index 5857999022..b2b990ad04 100644 --- a/src/main/modules/tray.js +++ b/src/main/modules/tray.js @@ -16,7 +16,7 @@ const themeList = [ isNative: false, }, ] -global.lx_event.common.on(COMMON_EVENT_NAME.config, sourceName => { +global.lx_event.common.on(COMMON_EVENT_NAME.configStatus, sourceName => { if (sourceName === TRAY_EVENT_NAME.name) return if (themeId !== global.appSetting.tray.themeId) { themeId = global.appSetting.tray.themeId @@ -89,34 +89,34 @@ const createMenu = tray => { menu.push(global.appSetting.desktopLyric.enable ? { label: '关闭桌面歌词', click() { - global.lx_event.common.setAppConfig({ desktopLyric: { enable: false } }, TRAY_EVENT_NAME.name) + global.lx_core.setAppConfig({ desktopLyric: { enable: false } }, TRAY_EVENT_NAME.name) }, } : { label: '开启桌面歌词', click() { - global.lx_event.common.setAppConfig({ desktopLyric: { enable: true } }, TRAY_EVENT_NAME.name) + global.lx_core.setAppConfig({ desktopLyric: { enable: true } }, TRAY_EVENT_NAME.name) }, }) menu.push(global.appSetting.desktopLyric.isLock ? { label: '解锁桌面歌词', click() { - global.lx_event.common.setAppConfig({ desktopLyric: { isLock: false } }, TRAY_EVENT_NAME.name) + global.lx_core.setAppConfig({ desktopLyric: { isLock: false } }, TRAY_EVENT_NAME.name) }, } : { label: '锁定桌面歌词', click() { - global.lx_event.common.setAppConfig({ desktopLyric: { isLock: true } }, TRAY_EVENT_NAME.name) + global.lx_core.setAppConfig({ desktopLyric: { isLock: true } }, TRAY_EVENT_NAME.name) }, }) menu.push(global.appSetting.desktopLyric.isAlwaysOnTop ? { label: '取消置顶', click() { - global.lx_event.common.setAppConfig({ desktopLyric: { isAlwaysOnTop: false } }, TRAY_EVENT_NAME.name) + global.lx_core.setAppConfig({ desktopLyric: { isAlwaysOnTop: false } }, TRAY_EVENT_NAME.name) }, } : { label: '置顶歌词', click() { - global.lx_event.common.setAppConfig({ desktopLyric: { isAlwaysOnTop: true } }, TRAY_EVENT_NAME.name) + global.lx_core.setAppConfig({ desktopLyric: { isAlwaysOnTop: true } }, TRAY_EVENT_NAME.name) }, }) menu.push({ diff --git a/src/main/modules/winLyric/event.js b/src/main/modules/winLyric/event.js index 658725dda3..99fabf5ba2 100644 --- a/src/main/modules/winLyric/event.js +++ b/src/main/modules/winLyric/event.js @@ -2,6 +2,7 @@ const { common: COMMON_EVENT_NAME, winLyric: WIN_LYRIC_EVENT_NAME, hotKey: HOT_K const { mainSend, NAMES: { winLyric: ipcWinLyricNames } } = require('../../../common/ipc') const { desktop_lyric } = require('../../../common/hotKey') const { getLyricWindowBounds } = require('./utils') +const { updateSetting } = require('../../utils') let isLock = null let isEnable = null @@ -49,7 +50,7 @@ const setLrcConfig = () => { } } } -global.lx_event.common.on(COMMON_EVENT_NAME.config, name => { +global.lx_event.common.on(COMMON_EVENT_NAME.configStatus, name => { if (WIN_LYRIC_EVENT_NAME.name === name) return setLrcConfig() }) @@ -77,5 +78,5 @@ global.lx_event.hotKey.on(HOT_KEY_EVENT_NAME.keyDown, ({ type, key }) => { } desktopLyricSetting[settingKey] = !desktopLyricSetting[settingKey] - global.lx_event.common.setAppConfig({ desktopLyric: desktopLyricSetting }, null) + updateSetting({ desktopLyric: desktopLyricSetting }, null) }) diff --git a/src/main/modules/winLyric/index.js b/src/main/modules/winLyric/index.js index 498c24c803..c7a194bf37 100644 --- a/src/main/modules/winLyric/index.js +++ b/src/main/modules/winLyric/index.js @@ -21,7 +21,7 @@ const setLyricsConfig = debounce(config => { // if (y != null) bounds.y = y // if (width != null) bounds.width = width // if (height != null) bounds.height = height - global.lx_event.common.setAppConfig({ desktopLyric: config }, WIN_LYRIC_EVENT_NAME.name) + global.lx_core.setAppConfig({ desktopLyric: config }, WIN_LYRIC_EVENT_NAME.name) }, 500) const winEvent = lyricWindow => { diff --git a/src/main/modules/winLyric/rendererEvent.js b/src/main/modules/winLyric/rendererEvent.js index 39e60d0de2..d1c3745a4c 100644 --- a/src/main/modules/winLyric/rendererEvent.js +++ b/src/main/modules/winLyric/rendererEvent.js @@ -20,7 +20,7 @@ mainOn(ipcWinLyricNames.get_lyric_info, (event, action) => { }) mainOn(ipcWinLyricNames.set_lyric_config, (event, config) => { - global.lx_event.common.setAppConfig({ desktopLyric: config }, WIN_LYRIC_EVENT_NAME.name) + global.lx_core.setAppConfig({ desktopLyric: config }, WIN_LYRIC_EVENT_NAME.name) }) mainHandle(ipcWinLyricNames.get_lyric_config, async() => { diff --git a/src/main/rendererEvents/appSetting.js b/src/main/rendererEvents/appSetting.js index 415da09854..2198a0c776 100644 --- a/src/main/rendererEvents/appSetting.js +++ b/src/main/rendererEvents/appSetting.js @@ -1,9 +1,11 @@ const { mainWindow: MAIN_WINDOW_EVENT_NAME } = require('../events/_name') -const { mainOn, NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc') +const { NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc') -mainOn(ipcMainWindowNames.set_app_setting, (event, config) => { + +mainHandle(ipcMainWindowNames.set_app_setting, (event, config) => { if (!config) return - global.lx_event.common.setAppConfig(config, MAIN_WINDOW_EVENT_NAME.name) + global.lx_core.setAppConfig(config, MAIN_WINDOW_EVENT_NAME.name) + return global.appSetting }) mainHandle(ipcMainWindowNames.get_setting, async() => ({ setting: global.appSetting, version: global.appSettingVersion })) diff --git a/src/main/utils/index.js b/src/main/utils/index.js index eec8533c25..f80a671d8b 100644 --- a/src/main/utils/index.js +++ b/src/main/utils/index.js @@ -1,6 +1,6 @@ const Store = require('electron-store') const { windowSizeList } = require('../../common/config') -const { objectDeepMerge, throttle } = require('../../common/utils') +const { objectDeepMerge, throttle, initSetting } = require('../../common/utils') exports.getWindowSizeInfo = ({ windowSizeId = 1 } = {}) => { return windowSizeList.find(i => i.id === windowSizeId) || windowSizeList[0] @@ -32,10 +32,16 @@ exports.saveAppHotKeyConfig = config => { saveHotKeyConfig(config) } -const saveSetting = throttle(n => { - electronStore_config.set('setting', n) -}) -exports.updateSetting = settings => { +// const saveSetting = throttle(n => { +// electronStore_config.set('setting', n) +// }) +exports.updateSetting = (settings) => { objectDeepMerge(global.appSetting, settings) - saveSetting(global.appSetting) + electronStore_config.set('setting', global.appSetting) + exports.initSetting() +} +exports.initSetting = () => { + const info = initSetting() + global.appSetting = info.setting + global.appSettingVersion = info.version } diff --git a/src/renderer/App.vue b/src/renderer/App.vue index e860dd78cb..635d8bd38d 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -25,7 +25,7 @@ import { mapMutations, mapGetters, mapActions } from 'vuex' import { rendererOn, rendererSend, rendererInvoke, NAMES } from '../common/ipc' import { isLinux } from '../common/utils' import music from './utils/music' -import { throttle, openUrl, compareVer, getPlayList, parseUrlParams } from './utils' +import { throttle, openUrl, compareVer, getPlayList, parseUrlParams, saveSetting } from './utils' import { base as eventBaseName } from './event/names' import apiSourceInfo from './utils/music/api-source-info' @@ -113,7 +113,7 @@ export default { watch: { setting: { handler(n, o) { - rendererSend(NAMES.mainWindow.set_app_setting, n) + saveSetting(n) }, deep: true, }, @@ -246,7 +246,7 @@ export default { }) rendererOn(NAMES.mainWindow.set_config, (event, config) => { - // console.log(config) + console.log(config) // this.setDesktopLyricConfig(config) // console.log('set_config', JSON.stringify(this.setting) === JSON.stringify(config)) this.setSetting(Object.assign({}, this.setting, config)) @@ -355,7 +355,7 @@ export default { if (info.listId) { const list = window.allList[info.listId] // console.log(list) - if (!list) return + if (!list || !list.list[info.index]) return info.list = list.list } diff --git a/src/renderer/components/material/PactModal.vue b/src/renderer/components/material/PactModal.vue index ff6cee0624..53f246118b 100644 --- a/src/renderer/components/material/PactModal.vue +++ b/src/renderer/components/material/PactModal.vue @@ -62,7 +62,7 @@ import { openUrl } from '../../utils' export default { data() { return { - time: 20, + time: 5, globalObj: { isShowPact: false, }, diff --git a/src/renderer/utils/index.js b/src/renderer/utils/index.js index 772849d3ad..2c9f27594d 100644 --- a/src/renderer/utils/index.js +++ b/src/renderer/utils/index.js @@ -379,7 +379,7 @@ export const getProxyInfo = () => window.globalObj.proxy.enable export const assertApiSupport = source => window.globalObj.qualityList[source] != undefined export const getSetting = () => rendererInvoke(NAMES.mainWindow.get_setting) -export const saveSetting = () => rendererInvoke(NAMES.mainWindow.set_app_setting) +export const saveSetting = setting => rendererInvoke(NAMES.mainWindow.set_app_setting, setting) export const getPlayList = () => rendererInvoke(NAMES.mainWindow.get_playlist).catch(error => { rendererInvoke(NAMES.mainWindow.get_data_path).then(dataPath => { diff --git a/src/renderer/views/Setting.vue b/src/renderer/views/Setting.vue index 555929d1c8..371146afbc 100644 --- a/src/renderer/views/Setting.vue +++ b/src/renderer/views/Setting.vue @@ -279,6 +279,8 @@ import { clearCache, sizeFormate, setWindowSize, + getSetting, + saveSetting, } from '../utils' import { rendererSend, rendererInvoke, NAMES } from '@common/ipc' import { mergeSetting, isMac } from '../../common/utils' @@ -289,6 +291,7 @@ import { base as eventBaseName } from '../event/names' import * as hotKeys from '../../common/hotKey' import { mainWindow as eventsNameMainWindow, winLyric as eventsNameWinLyric } from '../../main/events/_name' import { gzip, gunzip } from 'zlib' +import music from '../utils/music' let hotKeyTargetInput let newHotKey @@ -748,6 +751,8 @@ export default { if (list.location == null) list.location = 0 this.setList(list) } + + await this.refreshSetting(this.setting, this.settingVersion) }, exportPlayList(path) { const data = JSON.parse(JSON.stringify({ @@ -773,9 +778,6 @@ export default { return } if (allData.type !== 'allData') return - const { version: settingVersion, setting } = mergeSetting(allData.setting) - setting.isAgreePact = false - this.refreshSetting(setting, settingVersion) // 兼容0.6.2及以前版本的列表数据 if (allData.defaultList) return this.setList({ id: 'default', list: allData.defaultList.list, name: '试听列表', location: 0 }) @@ -784,6 +786,11 @@ export default { if (list.location == null) list.location = 0 this.setList(list) } + + const { version: settingVersion, setting } = mergeSetting(allData.setting) + setting.isAgreePact = false + + await this.refreshSetting(setting, settingVersion) }, async exportAllData(path) { let allData = JSON.parse(JSON.stringify({ @@ -906,10 +913,18 @@ export default { let info = index == null ? this.windowSizeList[2] : this.windowSizeList[index] setWindowSize(info.width, info.height) }, - refreshSetting(setting, version) { + async refreshSetting(newSetting, newVersion) { + await saveSetting(newSetting) + const { setting, version } = await getSetting() this.setSetting(setting) this.setSettingVersion(version) if (setting.windowSizeId != null) this.handleWindowSizeChange(null, setting.windowSizeId) + window.globalObj.apiSource = setting.apiSource + if (/^user_api/.test(setting.apiSource)) { + rendererInvoke(NAMES.mainWindow.set_user_api, setting.apiSource) + } else { + window.globalObj.qualityList = music.supportQuality[setting.apiSource] + } for (let key of Object.keys(setting.network.proxy)) { window.globalObj.proxy[key] = setting.network.proxy[key] } From 92c10eb5347967e12654972faabdd274feca9609 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 12 Mar 2021 16:30:27 +0800 Subject: [PATCH 06/49] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E9=98=85=E8=AF=BB=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/material/PactModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/material/PactModal.vue b/src/renderer/components/material/PactModal.vue index 53f246118b..ff6cee0624 100644 --- a/src/renderer/components/material/PactModal.vue +++ b/src/renderer/components/material/PactModal.vue @@ -62,7 +62,7 @@ import { openUrl } from '../../utils' export default { data() { return { - time: 5, + time: 20, globalObj: { isShowPact: false, }, From a4d46fd5018d65d69f53d21b5ecfb0ea2f6b7f9d Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 12 Mar 2021 22:49:27 +0800 Subject: [PATCH 07/49] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 57bfc2d6ef..be623cc10a 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,6 +1,6 @@ ### 新增 -- 新增启动参数`-dhmkh`,此参数将禁用软件对系统媒体按键的处理,用于解决漫步者部分型号耳机与本程序冲突导致耳机意外关机的问题 +- 新增启动参数`-dhmkh`,此参数将禁用Chromium的Hardware Media Key Handling特性,用于解决漫步者部分型号耳机与本程序冲突导致耳机意外关机的问题 ### 修复 From c663cdbe0daa7c68ba83ad46ae2a99f4da9af04e Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 13 Mar 2021 14:10:36 +0800 Subject: [PATCH 08/49] =?UTF-8?q?=E5=88=86=E7=A6=BBstore=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/store.js | 35 +++++++++++++++++++++++ src/common/utils.js | 38 ++++--------------------- src/main/modules/userApi/utils/index.js | 10 +++---- src/main/rendererEvents/data.js | 10 ++----- src/main/rendererEvents/hotKey.js | 17 +++++------ src/main/rendererEvents/playList.js | 24 ++++------------ src/main/utils/index.js | 16 ++++------- 7 files changed, 68 insertions(+), 82 deletions(-) create mode 100644 src/common/store.js diff --git a/src/common/store.js b/src/common/store.js new file mode 100644 index 0000000000..e9bd17ac35 --- /dev/null +++ b/src/common/store.js @@ -0,0 +1,35 @@ +const Store = require('electron-store') +const { dialog, app, shell } = require('electron') +const path = require('path') +const fs = require('fs') +const log = require('electron-log') + +const stores = {} + +/** + * 获取 Store 对象 + * @param {*} name store 名 + * @param {*} isIgnoredError 是否忽略错误 + * @returns Store + */ +module.exports = (name, isIgnoredError = true) => { + if (stores[name]) return stores[name] + let store + try { + store = stores[name] = new Store({ name, clearInvalidConfig: false }) + } catch (error) { + log.error(error) + if (!isIgnoredError) throw error + + const backPath = path.join(app.getPath('userData'), name + '.json.bak') + fs.copyFileSync(path.join(app.getPath('userData'), name + '.json'), backPath) + dialog.showMessageBoxSync({ + type: 'error', + message: name + ' data load error', + detail: `We have helped you back up the old ${name} file to: ${backPath}\nYou can try to repair and restore it manually\n\nError detail: ${error.message}`, + }) + store = new Store({ name, clearInvalidConfig: true }) + shell.showItemInFolder(backPath) + } + return store +} diff --git a/src/common/utils.js b/src/common/utils.js index 78e7c5b844..92fc68dc9c 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -1,11 +1,8 @@ const log = require('electron-log') -const Store = require('electron-store') const { defaultSetting, overwriteSetting } = require('./defaultSetting') // const apiSource = require('../renderer/utils/music/api-source-info') +const getStore = require('./store') const defaultHotKey = require('./defaultHotKey') -const { dialog, app } = require('electron') -const path = require('path') -const fs = require('fs') exports.isLinux = process.platform == 'linux' exports.isWin = process.platform == 'win32' @@ -128,31 +125,10 @@ exports.mergeSetting = (setting, version) => { * @param {*} setting */ exports.initSetting = () => { - let electronStore_list - try { - electronStore_list = new Store({ - name: 'playList', - clearInvalidConfig: false, - }) - } catch (error) { - log.error(error) - const backPath = path.join(app.getPath('userData'), 'playList.json.bak') - fs.copyFileSync(path.join(app.getPath('userData'), 'playList.json'), backPath) - dialog.showMessageBoxSync({ - type: 'error', - message: 'Playlist data loading error', - detail: `We have helped you back up the old list file to ${backPath}\nYou can try to repair and restore it manually\n\nError detail: ${error.message}`, - }) - electronStore_list = new Store({ - name: 'playList', - }) - } - const electronStore_config = new Store({ - name: 'config', - }) - const electronStore_downloadList = new Store({ - name: 'downloadList', - }) + const electronStore_list = getStore('playList') + const electronStore_config = getStore('config') + const electronStore_downloadList = getStore('downloadList') + let setting = electronStore_config.get('setting') if (setting) { let version = electronStore_config.get('version') @@ -210,9 +186,7 @@ exports.initSetting = () => { * 初始化快捷键设置 */ exports.initHotKey = () => { - const electronStore_hotKey = new Store({ - name: 'hotKey', - }) + const electronStore_hotKey = getStore('hotKey') let localConfig = electronStore_hotKey.get('local') if (!localConfig) { diff --git a/src/main/modules/userApi/utils/index.js b/src/main/modules/userApi/utils/index.js index 18060a7af1..3e0f92564a 100644 --- a/src/main/modules/userApi/utils/index.js +++ b/src/main/modules/userApi/utils/index.js @@ -1,12 +1,10 @@ const { userApis: defaultUserApis } = require('../config') -const Store = require('electron-store') +const getStore = require('@common/store') let userApis -const electronStore_userApi = new Store({ - name: 'userApi', -}) exports.getUserApis = () => { + const electronStore_userApi = getStore('userApi') if (userApis) return userApis userApis = electronStore_userApi.get('userApis') if (!userApis) { @@ -31,7 +29,7 @@ exports.importApi = script => { script, } userApis.push(apiInfo) - electronStore_userApi.set('userApis', userApis) + getStore('userApi').set('userApis', userApis) return apiInfo } @@ -42,5 +40,5 @@ exports.removeApi = ids => { ids.splice(index, 1) } } - electronStore_userApi.set('userApis', userApis) + getStore('userApi').set('userApis', userApis) } diff --git a/src/main/rendererEvents/data.js b/src/main/rendererEvents/data.js index f8e23c4255..ef25b57360 100644 --- a/src/main/rendererEvents/data.js +++ b/src/main/rendererEvents/data.js @@ -1,12 +1,8 @@ -const Store = require('electron-store') const { mainOn, NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc') +const getStore = require('@common/store') -const electronStore_data = new Store({ - name: 'data', -}) +mainHandle(ipcMainWindowNames.get_data, async(event, path) => getStore('data').get(path)) -mainHandle(ipcMainWindowNames.get_data, async(event, path) => electronStore_data.get(path)) - -mainOn(ipcMainWindowNames.save_data, (event, { path, data }) => electronStore_data.set(path, data)) +mainOn(ipcMainWindowNames.save_data, (event, { path, data }) => getStore('data').set(path, data)) diff --git a/src/main/rendererEvents/hotKey.js b/src/main/rendererEvents/hotKey.js index 487234c96c..49e0bd12c4 100644 --- a/src/main/rendererEvents/hotKey.js +++ b/src/main/rendererEvents/hotKey.js @@ -1,10 +1,8 @@ -const Store = require('electron-store') const { mainSend, NAMES: { mainWindow: ipcMainWindowNames }, mainOn, mainHandle } = require('../../common/ipc') const { mainWindow: MAIN_WINDOW_EVENT_NAME, hotKey: HOT_KEY_EVENT_NAME } = require('../events/_name') +const getStore = require('@common/store') + -const electronStore_hotKey = new Store({ - name: 'hotKey', -}) // const { registerHotkey, unRegisterHotkey } = require('../modules/hotKey/utils') // mainHandle(ipcMainWindowNames.set_hot_key_config, async(event, { action, data }) => { @@ -19,10 +17,13 @@ const electronStore_hotKey = new Store({ // } // }) -mainHandle(ipcMainWindowNames.get_hot_key, async() => ({ - local: electronStore_hotKey.get('local'), - global: electronStore_hotKey.get('global'), -})) +mainHandle(ipcMainWindowNames.get_hot_key, async() => { + const electronStore_hotKey = getStore('hotKey') + return { + local: electronStore_hotKey.get('local'), + global: electronStore_hotKey.get('global'), + } +}) mainOn(ipcMainWindowNames.quit, () => global.lx_event.mainWindow.quit()) mainOn(ipcMainWindowNames.min_toggle, () => global.lx_event.mainWindow.toggleMinimize()) diff --git a/src/main/rendererEvents/playList.js b/src/main/rendererEvents/playList.js index 86a90d8935..655c360f23 100644 --- a/src/main/rendererEvents/playList.js +++ b/src/main/rendererEvents/playList.js @@ -1,38 +1,24 @@ -const Store = require('electron-store') const { mainOn, NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc') +const getStore = require('@common/store') -let electronStore_list -let electronStore_downloadList - mainHandle(ipcMainWindowNames.get_playlist, async(event, isIgnoredError = false) => { - if (!electronStore_list) { - electronStore_list = new Store({ - name: 'playList', - clearInvalidConfig: !isIgnoredError, - }) - } - if (!electronStore_downloadList) { - electronStore_downloadList = new Store({ - name: 'downloadList', - }) - } + const electronStore_list = getStore('playList', isIgnoredError) return { defaultList: electronStore_list.get('defaultList'), loveList: electronStore_list.get('loveList'), userList: electronStore_list.get('userList'), - downloadList: electronStore_downloadList.get('list'), + downloadList: getStore('downloadList').get('list'), } }) const handleSaveList = ({ defaultList, loveList, userList }) => { - if (!electronStore_list) return let data = {} if (defaultList != null) data.defaultList = defaultList if (loveList != null) data.loveList = loveList if (userList != null) data.userList = userList - electronStore_list.set(data) + getStore('playList').set(data) } mainOn(ipcMainWindowNames.save_playlist, (event, { type, data }) => { switch (type) { @@ -40,7 +26,7 @@ mainOn(ipcMainWindowNames.save_playlist, (event, { type, data }) => { handleSaveList(data) break case 'downloadList': - electronStore_downloadList && electronStore_downloadList.set('list', data) + getStore('downloadList').set('list', data) break } }) diff --git a/src/main/utils/index.js b/src/main/utils/index.js index f80a671d8b..5bbc0978e8 100644 --- a/src/main/utils/index.js +++ b/src/main/utils/index.js @@ -1,22 +1,18 @@ -const Store = require('electron-store') const { windowSizeList } = require('../../common/config') const { objectDeepMerge, throttle, initSetting } = require('../../common/utils') +const getStore = require('@common/store') exports.getWindowSizeInfo = ({ windowSizeId = 1 } = {}) => { return windowSizeList.find(i => i.id === windowSizeId) || windowSizeList[0] } -const electronStore_config = new Store({ - name: 'config', -}) exports.getAppSetting = () => { - return electronStore_config.get('setting') + return getStore('config').get('setting') } -const electronStore_hotKey = new Store({ - name: 'hotKey', -}) exports.getAppHotKeyConfig = () => { + const electronStore_hotKey = getStore('hotKey') + return { global: electronStore_hotKey.get('global'), local: electronStore_hotKey.get('local'), @@ -25,7 +21,7 @@ exports.getAppHotKeyConfig = () => { const saveHotKeyConfig = throttle(config => { for (const key of Object.keys(config)) { global.appHotKey.config[key] = config[key] - electronStore_hotKey.set(key, config[key]) + getStore('hotKey').set(key, config[key]) } }) exports.saveAppHotKeyConfig = config => { @@ -37,7 +33,7 @@ exports.saveAppHotKeyConfig = config => { // }) exports.updateSetting = (settings) => { objectDeepMerge(global.appSetting, settings) - electronStore_config.set('setting', global.appSetting) + getStore('config').set('setting', global.appSetting) exports.initSetting() } exports.initSetting = () => { From 5ed81132fb1ad7e490fcc3662fecab15a7c900bc Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 13 Mar 2021 14:35:20 +0800 Subject: [PATCH 09/49] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/store.js | 20 +++++++++++++------- src/main/rendererEvents/playList.js | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/common/store.js b/src/common/store.js index e9bd17ac35..3b3f50606c 100644 --- a/src/common/store.js +++ b/src/common/store.js @@ -12,24 +12,30 @@ const stores = {} * @param {*} isIgnoredError 是否忽略错误 * @returns Store */ -module.exports = (name, isIgnoredError = true) => { +module.exports = (name, isIgnoredError = true, isShowErrorAlert = true) => { if (stores[name]) return stores[name] let store try { store = stores[name] = new Store({ name, clearInvalidConfig: false }) } catch (error) { log.error(error) + if (!isIgnoredError) throw error + const backPath = path.join(app.getPath('userData'), name + '.json.bak') fs.copyFileSync(path.join(app.getPath('userData'), name + '.json'), backPath) - dialog.showMessageBoxSync({ - type: 'error', - message: name + ' data load error', - detail: `We have helped you back up the old ${name} file to: ${backPath}\nYou can try to repair and restore it manually\n\nError detail: ${error.message}`, - }) - store = new Store({ name, clearInvalidConfig: true }) shell.showItemInFolder(backPath) + if (isShowErrorAlert) { + dialog.showMessageBoxSync({ + type: 'error', + message: name + ' data load error', + detail: `We have helped you back up the old ${name} file to: ${backPath}\nYou can try to repair and restore it manually\n\nError detail: ${error.message}`, + }) + } + + + store = new Store({ name, clearInvalidConfig: true }) } return store } diff --git a/src/main/rendererEvents/playList.js b/src/main/rendererEvents/playList.js index 655c360f23..3eb0aed319 100644 --- a/src/main/rendererEvents/playList.js +++ b/src/main/rendererEvents/playList.js @@ -3,7 +3,7 @@ const getStore = require('@common/store') mainHandle(ipcMainWindowNames.get_playlist, async(event, isIgnoredError = false) => { - const electronStore_list = getStore('playList', isIgnoredError) + const electronStore_list = getStore('playList', isIgnoredError, false) return { defaultList: electronStore_list.get('defaultList'), From 969b03b3642a0916cf2b7ed54cd05f72d0751ca1 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 13 Mar 2021 15:25:35 +0800 Subject: [PATCH 10/49] =?UTF-8?q?=E7=95=A5=E5=BE=AE=E5=87=8F=E5=B0=8F?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/core/PlayerDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/core/PlayerDetail.vue b/src/renderer/components/core/PlayerDetail.vue index 6ee75c70c1..d7123d619d 100644 --- a/src/renderer/components/core/PlayerDetail.vue +++ b/src/renderer/components/core/PlayerDetail.vue @@ -606,7 +606,7 @@ export default { color: @color-theme; } .translation { - font-size: 1.1em; + font-size: 1em; color: @color-theme; } span { From b1ccdeb0d3fe4f3d77d8a432d24902173470fa31 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 13 Mar 2021 16:49:05 +0800 Subject: [PATCH 11/49] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FAQ.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FAQ.md b/FAQ.md index 37cb84b6a5..f73d12de0f 100644 --- a/FAQ.md +++ b/FAQ.md @@ -123,7 +123,7 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的 尝试更换网络,如切换到移动网络。 -### 启用软件时导致耳机意外关机 +## 使用软件时导致耳机意外关机 据反馈,漫步者部分型号的耳机与本软件一起使用时将会导致耳机意外关机, 详情看:, @@ -170,7 +170,7 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的 ## 杀毒软件提示有病毒或恶意行为 -本人只能保证我写的代码不包含任何**恶意代码**、**收集用户信息**的行为,并且软件代码已开源,请自行查阅,软件安装包也是由CI拉取源代码构建,构建日志:[GitHub Actions](https://github.com/lyswhut/lx-music-desktop/actions)。v1.8.2之前的版本构建日志:[windows包](https://ci.appveyor.com/project/lyswhut/lx-music-desktop)、[Mac/Linux包](https://travis-ci.com/github/lyswhut/lx-music-desktop)
+本人只能保证我写的代码不包含任何**恶意代码**、**收集用户信息**的行为,并且软件代码已开源,请自行查阅,软件安装包也是由CI拉取源代码构建,构建日志:[GitHub Actions](https://github.com/lyswhut/lx-music-desktop/actions)
尽管如此,但这不意味着软件是100%安全的,由于软件使用了第三方依赖,当这些依赖存在恶意行为时([供应链攻击](https://docs.microsoft.com/zh-cn/windows/security/threat-protection/intelligence/supply-chain-malware)),软件也将会受到牵连,所以我只能尽量选择使用较多人用、信任度较高的依赖。
当然,以上说明建立的前提是在你所用的安装包是从**本项目主页上写的链接**下载的,或者有相关能力者还可以下载源代码自己构建安装包。 From 8171fcd3460a88267a8c21fb75a5b07df29d8ba1 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 14 Mar 2021 02:06:35 +0800 Subject: [PATCH 12/49] =?UTF-8?q?=E5=BA=8F=E5=90=AF=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E5=AF=B9=E6=95=B0=E6=8D=AE=E6=96=87=E4=BB=B6=E5=81=9A=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E6=A0=A1=E9=AA=8C=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E6=8D=9F=E5=9D=8F=E6=97=B6=E8=87=AA=E5=8A=A8=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=E6=8D=9F=E5=9D=8F=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 5 ++++- src/common/store.js | 3 ++- src/common/utils.js | 5 +++-- src/main/utils/index.js | 6 +++--- src/renderer/lang/zh-cn/store/state.json | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index be623cc10a..dfbb942b5b 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -2,7 +2,10 @@ - 新增启动参数`-dhmkh`,此参数将禁用Chromium的Hardware Media Key Handling特性,用于解决漫步者部分型号耳机与本程序冲突导致耳机意外关机的问题 +### 优化 + +- 程序启动时对数据文件做读取校验,数据出现损坏时自动备份损坏的数据,若出现数据读取错误的弹窗并出现我的列表丢失时可到GitHub或加群反馈 + ### 修复 - 修复备份与恢复功能在恢复数据时某些设置不立即生效的问题 - diff --git a/src/common/store.js b/src/common/store.js index 3b3f50606c..86047fdbc1 100644 --- a/src/common/store.js +++ b/src/common/store.js @@ -10,6 +10,7 @@ const stores = {} * 获取 Store 对象 * @param {*} name store 名 * @param {*} isIgnoredError 是否忽略错误 + * @param {*} isShowErrorAlert 是否显示错误弹窗 * @returns Store */ module.exports = (name, isIgnoredError = true, isShowErrorAlert = true) => { @@ -25,13 +26,13 @@ module.exports = (name, isIgnoredError = true, isShowErrorAlert = true) => { const backPath = path.join(app.getPath('userData'), name + '.json.bak') fs.copyFileSync(path.join(app.getPath('userData'), name + '.json'), backPath) - shell.showItemInFolder(backPath) if (isShowErrorAlert) { dialog.showMessageBoxSync({ type: 'error', message: name + ' data load error', detail: `We have helped you back up the old ${name} file to: ${backPath}\nYou can try to repair and restore it manually\n\nError detail: ${error.message}`, }) + shell.showItemInFolder(backPath) } diff --git a/src/common/utils.js b/src/common/utils.js index 92fc68dc9c..be18ffed0a 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -123,9 +123,10 @@ exports.mergeSetting = (setting, version) => { /** * 初始化设置 * @param {*} setting + * @param {*} isShowErrorAlert */ -exports.initSetting = () => { - const electronStore_list = getStore('playList') +exports.initSetting = isShowErrorAlert => { + const electronStore_list = getStore('playList', true, isShowErrorAlert) const electronStore_config = getStore('config') const electronStore_downloadList = getStore('downloadList') diff --git a/src/main/utils/index.js b/src/main/utils/index.js index 5bbc0978e8..53c974bc53 100644 --- a/src/main/utils/index.js +++ b/src/main/utils/index.js @@ -34,10 +34,10 @@ exports.saveAppHotKeyConfig = config => { exports.updateSetting = (settings) => { objectDeepMerge(global.appSetting, settings) getStore('config').set('setting', global.appSetting) - exports.initSetting() + exports.initSetting(false) } -exports.initSetting = () => { - const info = initSetting() +exports.initSetting = (isShowErrorAlert = true) => { + const info = initSetting(isShowErrorAlert) global.appSetting = info.setting global.appSettingVersion = info.version } diff --git a/src/renderer/lang/zh-cn/store/state.json b/src/renderer/lang/zh-cn/store/state.json index 3bba8d17b8..c57527e4d0 100644 --- a/src/renderer/lang/zh-cn/store/state.json +++ b/src/renderer/lang/zh-cn/store/state.json @@ -33,6 +33,6 @@ "source_alias_all": "聚合大会", - "load_list_file_error_title": "播放列表数据加载错误", + "load_list_file_error_title": "播放列表数据加载错误(建议到GitHub或加群反馈)", "load_list_file_error_detail": "我们已经帮你把旧的列表文件备份到{path}\n它以 JSON 格式存储,你可以尝试手动修复并恢复它\n\n错误详情:{detail}" } From 1d8702e95f541ebc79a80d15bd595a60598cac87 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Tue, 16 Mar 2021 11:01:57 +0800 Subject: [PATCH 13/49] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 9 +++++++++ jsconfig.json | 20 +++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..4ff61fa174 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "path-intellisense.mappings": { + "@main/*": "${workspaceFolder}/src/main/*", + "@renderer/*": "${workspaceFolder}/src/renderer/*", + "@lyric/*": "${workspaceFolder}/src/renderer-lyric/*", + "@static/*": "${workspaceFolder}/src/static/*", + "@common/*": "${workspaceFolder}/src/common/*", + } +} diff --git a/jsconfig.json b/jsconfig.json index aa3964b192..ca2d0131d2 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,19 +1,13 @@ { "compilerOptions": { - "module": "commonjs", - "target": "es6", - // This is the line you want to add - "allowSyntheticDefaultImports": true, - - "baseUrl": ".", + "baseUrl": "./", "paths": { - "@main": ["src/main"], - "@renderer": ["src/renderer"], - "@lyric": ["src/renderer-lyric"], - "@static": ["src/static"], - "@common": ["src/common"], + "@main/*": ["src/main/*"], + "@renderer/*": ["src/renderer/*"], + "@lyric/*": ["src/renderer-lyric/*"], + "@static/*": ["src/static/*"], + "@common/*": ["src/common/*"], } }, - "include": ["src/**/*"], - "exclude": ["node_modules/**/*"] + "exclude": ["node_modules", "build", "dist"] } From b4c7a6e4486d0fe9ba1cc4d8764aaa39de9ee8b0 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Thu, 18 Mar 2021 17:30:44 +0800 Subject: [PATCH 14/49] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E7=A9=BA=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/renderer/App.vue | 14 ++++++++++++++ src/renderer/store/modules/player.js | 2 +- src/renderer/utils/index.js | 2 +- src/renderer/views/Setting.vue | 10 ++++++---- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index dfbb942b5b..fa8794a2a0 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -5,6 +5,7 @@ ### 优化 - 程序启动时对数据文件做读取校验,数据出现损坏时自动备份损坏的数据,若出现数据读取错误的弹窗并出现我的列表丢失时可到GitHub或加群反馈 +- 当设置-代理启用,但主机地址为空的时,将不再使用代理配置进行网络连接,并且在离开设置界面时自动禁用代理 ### 修复 diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 635d8bd38d..99d0d59ad5 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -164,6 +164,20 @@ export default { })) } }, + 'globalObj.proxy.enable'(n, o) { + if (n != this.setting.network.proxy.enable) { + this.setSetting({ + ...this.setting, + network: { + ...this.setting.network, + proxy: { + ...this.setting.network.proxy, + enable: n, + }, + }, + }) + } + }, 'windowSizeActive.fontSize'(n) { document.documentElement.style.fontSize = n }, diff --git a/src/renderer/store/modules/player.js b/src/renderer/store/modules/player.js index ca3b24eb35..d6e7a6624b 100644 --- a/src/renderer/store/modules/player.js +++ b/src/renderer/store/modules/player.js @@ -391,7 +391,7 @@ const mutations = { playIndex = -1 } else { let listId = playMusicInfo.listId - if (listId != '__temp__' && listId === state.listInfo.id) playIndex = state.listInfo.list.indexOf(state.playMusicInfo.musicInfo) + if (listId != '__temp__' && listId === state.listInfo.id) playIndex = state.listInfo.list.indexOf(playMusicInfo.musicInfo) } state.playMusicInfo = playMusicInfo diff --git a/src/renderer/utils/index.js b/src/renderer/utils/index.js index 2c9f27594d..673b6440b3 100644 --- a/src/renderer/utils/index.js +++ b/src/renderer/utils/index.js @@ -371,7 +371,7 @@ export const clearCache = () => rendererInvoke(NAMES.mainWindow.clear_cache) export const setWindowSize = (width, height) => rendererSend(NAMES.mainWindow.set_window_size, { width, height }) -export const getProxyInfo = () => window.globalObj.proxy.enable +export const getProxyInfo = () => window.globalObj.proxy.enable && window.globalObj.proxy.host ? `http://${window.globalObj.proxy.username}:${window.globalObj.proxy.password}@${window.globalObj.proxy.host}:${window.globalObj.proxy.port};` : undefined diff --git a/src/renderer/views/Setting.vue b/src/renderer/views/Setting.vue index 371146afbc..fc12e9dcde 100644 --- a/src/renderer/views/Setting.vue +++ b/src/renderer/views/Setting.vue @@ -169,11 +169,11 @@ div(:class="$style.main") p material-checkbox(id="setting_network_proxy_enable" v-model="current_setting.network.proxy.enable" @change="handleProxyChange('enable')" :label="$t('view.setting.is_enable')") p - material-input(:class="$style.gapLeft" v-model="current_setting.network.proxy.host" @change="handleProxyChange('host')" :placeholder="$t('view.setting.network_proxy_host')") - material-input(:class="$style.gapLeft" v-model="current_setting.network.proxy.port" @change="handleProxyChange('port')" :placeholder="$t('view.setting.network_proxy_port')") + material-input(:class="$style.gapLeft" v-model.trim="current_setting.network.proxy.host" @change="handleProxyChange('host')" :placeholder="$t('view.setting.network_proxy_host')") + material-input(:class="$style.gapLeft" v-model.trim="current_setting.network.proxy.port" @change="handleProxyChange('port')" :placeholder="$t('view.setting.network_proxy_port')") p - material-input(:class="$style.gapLeft" v-model="current_setting.network.proxy.username" @change="handleProxyChange('username')" :placeholder="$t('view.setting.network_proxy_username')") - material-input(:class="$style.gapLeft" v-model="current_setting.network.proxy.password" @change="handleProxyChange('password')" type="password" :placeholder="$t('view.setting.network_proxy_password')") + material-input(:class="$style.gapLeft" v-model.trim="current_setting.network.proxy.username" @change="handleProxyChange('username')" :placeholder="$t('view.setting.network_proxy_username')") + material-input(:class="$style.gapLeft" v-model.trim="current_setting.network.proxy.password" @change="handleProxyChange('password')" type="password" :placeholder="$t('view.setting.network_proxy_password')") dt#odc {{$t('view.setting.odc')}} dd div(:class="$style.gapTop") @@ -652,6 +652,8 @@ export default { window.eventHub.$off(eventBaseName.set_config, this.handleUpdateSetting) window.eventHub.$off(eventBaseName.key_down, this.handleKeyDown) window.eventHub.$off(eventBaseName.set_hot_key_config, this.handleUpdateHotKeyConfig) + + if (this.current_setting.network.proxy.enable && !this.current_setting.network.proxy.host) window.globalObj.proxy.enable = false }, methods: { ...mapMutations(['setSetting', 'setSettingVersion', 'setVersionModalVisible']), From 57fe510138d289f3a51492277974ae998ec9eca2 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 20 Mar 2021 00:10:36 +0800 Subject: [PATCH 15/49] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BD=91=E7=9B=98?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- src/renderer/components/material/VersionModal.vue | 8 ++++---- src/renderer/views/Setting.vue | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b25e7741a8..f3ec779587 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ 软件变化请查看:[更新日志](https://github.com/lyswhut/lx-music-desktop/blob/master/CHANGELOG.md)
软件下载请转到:[发布页面](https://github.com/lyswhut/lx-music-desktop/releases)
-或者到网盘下载(网盘内有MAC、windows版):`https://www.lanzoux.com/b0bf2cfa/` 密码:`glqw`(若链接无法打开请百度:蓝奏云链接打不开)
+或者到网盘下载(网盘内有MAC、windows版):`https://www.lanzous.com/b0bf2cfa/` 密码:`glqw`(若链接无法打开请百度:蓝奏云链接打不开)
使用常见问题请转至:[常见问题](https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md) ### 源码使用方法 diff --git a/src/renderer/components/material/VersionModal.vue b/src/renderer/components/material/VersionModal.vue index 2d39811014..e3095e3840 100644 --- a/src/renderer/components/material/VersionModal.vue +++ b/src/renderer/components/material/VersionModal.vue @@ -46,7 +46,7 @@ material-modal(:show="version.showModal" @close="handleClose" v-if="version.newV | 你可以去  strong.hover.underline(@click="handleOpenUrl('https://github.com/lyswhut/lx-music-desktop/releases')" tips="点击打开") 软件发布页 |  或  - strong.hover.underline(@click="handleOpenUrl('https://www.lanzoux.com/b0bf2cfa/')" tips="点击打开") 网盘 + strong.hover.underline(@click="handleOpenUrl('https://www.lanzous.com/b0bf2cfa/')" tips="点击打开") 网盘 | (密码: strong.hover(@click="handleCopy('glqw')" tips="点击复制") glqw | ) 下载新版本, @@ -63,7 +63,7 @@ material-modal(:show="version.showModal" @close="handleClose" v-if="version.newV | 你可以去 material-btn(min @click="handleOpenUrl('https://github.com/lyswhut/lx-music-desktop/releases')" tips="点击打开") 软件发布页 | 或 - material-btn(min @click="handleOpenUrl('https://www.lanzoux.com/b0bf2cfa/')" tips="点击打开") 网盘 + material-btn(min @click="handleOpenUrl('https://www.lanzous.com/b0bf2cfa/')" tips="点击打开") 网盘 | (密码: strong.hover(@click="handleCopy('glqw')" tips="点击复制") glqw | )下载新版本, @@ -84,7 +84,7 @@ material-modal(:show="version.showModal" @close="handleClose" v-if="version.newV | 检查方法:打开 material-btn(min @click="handleOpenUrl('https://github.com/lyswhut/lx-music-desktop/releases')" tips="点击打开") 软件发布页 | 或 - material-btn(min @click="handleOpenUrl('https://www.lanzoux.com/b0bf2cfa/')" tips="点击打开") 网盘 + material-btn(min @click="handleOpenUrl('https://www.lanzous.com/b0bf2cfa/')" tips="点击打开") 网盘 | (密码: strong.hover(@click="handleCopy('glqw')" tips="点击复制") glqw | )查看它们的 @@ -117,7 +117,7 @@ material-modal(:show="version.showModal" @close="handleClose" v-if="version.newV | 手动更新可以去  strong.hover.underline(@click="handleOpenUrl('https://github.com/lyswhut/lx-music-desktop/releases')" tips="点击打开") 软件发布页 |  或  - strong.hover.underline(@click="handleOpenUrl('https://www.lanzoux.com/b0bf2cfa/')" tips="点击打开") 网盘 + strong.hover.underline(@click="handleOpenUrl('https://www.lanzous.com/b0bf2cfa/')" tips="点击打开") 网盘 | (密码: strong.hover(@click="handleCopy('glqw')" tips="点击复制") glqw | ) 下载, diff --git a/src/renderer/views/Setting.vue b/src/renderer/views/Setting.vue index fc12e9dcde..6848ccd4fe 100644 --- a/src/renderer/views/Setting.vue +++ b/src/renderer/views/Setting.vue @@ -232,7 +232,7 @@ div(:class="$style.main") span.hover.underline(:tips="$t('view.setting.click_open')" @click="handleOpenUrl('https://github.com/lyswhut/lx-music-desktop#readme')") https://github.com/lyswhut/lx-music-desktop p.small | 最新版网盘下载地址(网盘内有Windows、MAC版): - span.hover.underline(:tips="$t('view.setting.click_open')" @click="handleOpenUrl('https://www.lanzoux.com/b0bf2cfa/')") 网盘地址 + span.hover.underline(:tips="$t('view.setting.click_open')" @click="handleOpenUrl('https://www.lanzous.com/b0bf2cfa/')") 网盘地址 |   密码: span.hover(:tips="$t('view.setting.click_copy')" @click="clipboardWriteText('glqw')") glqw p.small From dcf6ab0792d91fe691ae90e4046063064f3b00b6 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 20 Mar 2021 19:52:02 +0800 Subject: [PATCH 16/49] =?UTF-8?q?=E6=B8=85=E7=90=86=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E5=B0=86=E5=90=8C=E6=97=B6=E6=B8=85=E7=90=86?= =?UTF-8?q?=E6=AD=8C=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/store/modules/list.js | 4 +++- src/renderer/utils/music/wy/lyric.js | 34 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/renderer/store/modules/list.js b/src/renderer/store/modules/list.js index 3d5bea7fe1..392c367bee 100644 --- a/src/renderer/store/modules/list.js +++ b/src/renderer/store/modules/list.js @@ -207,7 +207,9 @@ const mutations = { if (item.typeUrl['320k']) delete item.typeUrl['320k'] if (item.typeUrl.flac) delete item.typeUrl.flac if (item.typeUrl.wav) delete item.typeUrl.wav - // if (item.lxlrc == '') item.lxlrc = null + if (item.lxlrc) item.lxlrc = null + if (item.lrc) item.lrc = null + if (item.tlrc) item.tlrc = null } } }, diff --git a/src/renderer/utils/music/wy/lyric.js b/src/renderer/utils/music/wy/lyric.js index 6ae95d34ef..301a2bb40c 100644 --- a/src/renderer/utils/music/wy/lyric.js +++ b/src/renderer/utils/music/wy/lyric.js @@ -1,5 +1,38 @@ import { httpFetch } from '../../request' import { linuxapi } from './utils/crypto' +// import { decodeName } from '../..' + +// const parseLyric = (str, lrc) => { +// if (!str) return '' + +// str = str.replace(/\r/g, '') + +// let lxlyric = str.replace(/\[((\d+),\d+)\].*/g, str => { +// let result = str.match(/\[((\d+),\d+)\].*/) +// let time = parseInt(result[2]) +// let ms = time % 1000 +// time /= 1000 +// let m = parseInt(time / 60).toString().padStart(2, '0') +// time %= 60 +// let s = parseInt(time).toString().padStart(2, '0') +// time = `${m}:${s}.${ms}` +// str = str.replace(result[1], time) + +// let startTime = 0 +// str = str.replace(/\(0,1\) /g, ' ').replace(/\(\d+,\d+\)/g, time => { +// const [start, end] = time.replace(/^\((\d+,\d+)\)$/, '$1').split(',') + +// time = `<${parseInt(startTime + parseInt(start))},${end}>` +// startTime = parseInt(startTime + parseInt(end)) +// return time +// }) + +// return str +// }) + +// lxlyric = decodeName(lxlyric) +// return lxlyric.trim() +// } export default songmid => { const requestObj = httpFetch('https://music.163.com/api/linux/forward', { @@ -21,6 +54,7 @@ export default songmid => { return { lyric: body.lrc.lyric, tlyric: body.tlyric.lyric, + // lxlyric: parseLyric(body.klyric.lyric), } }) return requestObj From 7922920f515f029c1f450215c6f2e044c605f6ba Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 20 Mar 2021 20:19:04 +0800 Subject: [PATCH 17/49] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=AF=8F=E9=A1=B5=E6=9D=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/utils/music/mg/comment.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/utils/music/mg/comment.js b/src/renderer/utils/music/mg/comment.js index a6c8a1345f..c3fab1a40b 100644 --- a/src/renderer/utils/music/mg/comment.js +++ b/src/renderer/utils/music/mg/comment.js @@ -16,7 +16,7 @@ export default { if (!info) info = list.find(s => s.songId == songmid) return info ? info.songId : null }, - async getComment(musicInfo, page = 1, limit = 20) { + async getComment(musicInfo, page = 1, limit = 10) { if (this._requestObj) this._requestObj.cancelHttp() if (!musicInfo.songId) { let id = await this.getSongId(musicInfo) @@ -35,7 +35,7 @@ export default { if (statusCode != 200 || body.returnCode !== '000000') throw new Error('获取评论失败') return { source: 'mg', comments: this.filterComment(body.data.items), total: body.data.itemTotal, page, limit, maxPage: Math.ceil(body.data.itemTotal / limit) || 1 } }, - async getHotComment(musicInfo, page = 1, limit = 100) { + async getHotComment(musicInfo, page = 1, limit = 5) { if (this._requestObj2) this._requestObj2.cancelHttp() if (!musicInfo.songId) { @@ -55,7 +55,7 @@ export default { if (statusCode != 200 || body.returnCode !== '000000') throw new Error('获取热门评论失败') return { source: 'mg', comments: this.filterComment(body.data.items) } }, - async getReplyComment(musicInfo, replyId, page = 1, limit = 100) { + async getReplyComment(musicInfo, replyId, page = 1, limit = 10) { if (this._requestObj2) this._requestObj2.cancelHttp() const _requestObj2 = httpFetch(`https://music.migu.cn/v3/api/comment/listCommentsById?commentId=${replyId}&pageSize=${limit}&pageNo=${page}`, { @@ -75,7 +75,7 @@ export default { time: item.createTime, timeStr: dateFormat2(new Date(item.createTime).getTime()), userName: item.author.name, - avatar: item.author.avatar, + avatar: item.author.avatar && item.author.avatar.startsWith('//') ? `http:${item.author.avatar}` : item.author.avatar, userId: item.author.id, likedCount: item.praiseCount, replyNum: item.replyTotal, From ea5de9a289694cb003402d785e4b5e6499802f01 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 20 Mar 2021 20:55:44 +0800 Subject: [PATCH 18/49] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=AD=8C=E6=9B=B2?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8D=A2=E6=BA=90=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/renderer/utils/music/index.js | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index fa8794a2a0..79a31f7e55 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -6,6 +6,7 @@ - 程序启动时对数据文件做读取校验,数据出现损坏时自动备份损坏的数据,若出现数据读取错误的弹窗并出现我的列表丢失时可到GitHub或加群反馈 - 当设置-代理启用,但主机地址为空的时,将不再使用代理配置进行网络连接,并且在离开设置界面时自动禁用代理 +- 优化歌曲自动换源匹配 ### 修复 diff --git a/src/renderer/utils/music/index.js b/src/renderer/utils/music/index.js index c9466f6713..fb97975f27 100644 --- a/src/renderer/utils/music/index.js +++ b/src/renderer/utils/music/index.js @@ -92,8 +92,7 @@ export default { // console.log(lowerCaseName, item.lowerCaseName) if ( ( - item.sortedSinger === sortedSinger && - (item.lowerCaseName === lowerCaseName || item.interval === musicInfo.interval) + item.sortedSinger === sortedSinger && item.lowerCaseName === lowerCaseName ) || ( item.interval === musicInfo.interval && item.lowerCaseName === lowerCaseName && @@ -107,6 +106,18 @@ export default { return item } } + for (const item of res.list) { + item.sortedSinger = String(sortSingle(item.singer)).toLowerCase() + item.name = trimStr(item.name) + item.lowerCaseName = String(item.name).toLowerCase() + item.lowerCaseAlbumName = String(item.albumName).toLowerCase() + // console.log(lowerCaseName, item.lowerCaseName) + if ( + item.sortedSinger === sortedSinger && item.interval === musicInfo.interval + ) { + return item + } + } return null }).catch(_ => null)) } @@ -114,9 +125,9 @@ export default { const newResult = [] if (result.length) { newResult.push(...sortMusic(result, item => item.sortedSinger === sortedSinger && item.lowerCaseName === lowerCaseName && item.interval === musicInfo.interval)) - newResult.push(...sortMusic(result, item => item.sortedSinger === sortedSinger && item.interval === musicInfo.interval)) newResult.push(...sortMusic(result, item => item.lowerCaseName === lowerCaseName && item.sortedSinger === sortedSinger && item.lowerCaseAlbumName === lowerCaseAlbumName)) newResult.push(...sortMusic(result, item => item.sortedSinger === sortedSinger && item.lowerCaseName === lowerCaseName)) + newResult.push(...sortMusic(result, item => item.sortedSinger === sortedSinger && item.interval === musicInfo.interval)) for (const item of result) { delete item.sortedSinger delete item.lowerCaseName From 8845884b2406d3923fff60d4412c9b0c0b9ed534 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 21 Mar 2021 13:23:13 +0800 Subject: [PATCH 19/49] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/beta-pack.yml | 58 ++++++++++++++++++++------------- package.json | 6 ---- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/workflows/beta-pack.yml b/.github/workflows/beta-pack.yml index 8f46b89933..64fefd418a 100644 --- a/.github/workflows/beta-pack.yml +++ b/.github/workflows/beta-pack.yml @@ -36,14 +36,18 @@ jobs: - name: Build src code run: npm run build:src - - name: Release package + - name: Build Package run: | - npm run publish:win:setup - npm run publish:win:7z:x64 - npm run publish:win:7z:x86 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BT_TOKEN: ${{ secrets.BT_TOKEN }} + npm run pack:win:setup:x86_64 + npm run pack:win:7z:x64 + npm run pack:win:7z:x86 + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + path: | + build/*.exe + build/*.7z Mac: name: Mac @@ -75,13 +79,17 @@ jobs: - name: Build src code run: npm run build:src - - name: Release package - run: npm run publish:mac:dmg + - name: Build Package + run: npm run pack:mac:dmg env: ELECTRON_CACHE: $HOME/.cache/electron ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BT_TOKEN: ${{ secrets.BT_TOKEN }} + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + path: | + build/*.dmg Linux: name: Linux @@ -116,15 +124,21 @@ jobs: - name: Build src code run: npm run build:src - - name: Release package + - name: Build Package run: | - npm run publish:linux:deb:x64 - npm run publish:linux:deb:x86 - npm run publish:linux:deb:arm64 - npm run publish:linux:deb:armv7l - npm run publish:linux:appImage - npm run publish:linux:rpm - npm run publish:linux:pacman - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BT_TOKEN: ${{ secrets.BT_TOKEN }} + npm run pack:linux:deb:x64 + npm run pack:linux:deb:x86 + npm run pack:linux:deb:arm64 + npm run pack:linux:deb:armv7l + npm run pack:linux:appImage + npm run pack:linux:rpm + npm run pack:linux:pacman + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + path: | + build/*.deb + build/*.appImage + build/*.rpm + build/*.pacman diff --git a/package.json b/package.json index 06aed2c875..69b46ad255 100644 --- a/package.json +++ b/package.json @@ -131,12 +131,6 @@ "provider": "github", "owner": "lyswhut", "repo": "lx-music-desktop" - }, - { - "package": "lx-music-desktop", - "repo": "lx-music-desktop", - "user": "lyswhut", - "provider": "bintray" } ] }, From 8bed6547569dd8b27bb850f880c41ef401e2a787 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Wed, 24 Mar 2021 11:06:18 +0800 Subject: [PATCH 20/49] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=80=BB=E9=A1=B5=E8=AE=A1=E7=AE=97=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/store/modules/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/store/modules/search.js b/src/renderer/store/modules/search.js index 1daa10a888..9e4d26ef15 100644 --- a/src/renderer/store/modules/search.js +++ b/src/renderer/store/modules/search.js @@ -167,7 +167,7 @@ const mutations = { list.push(...source.list) pages.push(source.allPage) total += source.total - limit += source.limit + // limit = Math.max(source.limit, limit) } state.allPage = Math.max(...pages) state.total = total From a28d01704af84bc26789ca6a9b284176668dde3c Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 27 Mar 2021 19:34:45 +0800 Subject: [PATCH 21/49] =?UTF-8?q?=E6=9B=B4=E6=96=B0faq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index f73d12de0f..bbe04a79b8 100644 --- a/FAQ.md +++ b/FAQ.md @@ -284,7 +284,7 @@ send(EVENT_NAMES.inited, { | 事件名 | 描述 | --- | --- -| `inited` | 脚本初始化完成后发送给应用的事件名,发送该事件时需要传入以下信息:`{status, sources, openDevTools}`
`status`:初始化结果(`true`成功,`false`失败)
`openDevTools`:是否打开DevTools,此选项可用于开发脚本时的调试
`sources`:支持的源信息对象,
`sources[kw/kg/tx/wy/mg].name`:源的名字(目前非必须)
`sources[kw/kg/tx/wy/mg].type`:源类型,目前固定值需为`music`
`sources[kw/kg/tx/wy/mg].actions`:支持的actions,由于目前只支持`musicUrl`,所以固定传`['musicUrl']`即可
`sources[kw/kg/tx/wy/mg].qualitys`:该源支持的音质列表,支持的值`['128k', '320k', 'flac']`,该字段用于控制应用可用的音质类型 +| `inited` | 脚本初始化完成后发送给应用的事件名,发送该事件时需要传入以下信息:`{status, sources, openDevTools}`
`status`:初始化结果(`true`成功,`false`失败)
`openDevTools`:是否打开DevTools,此选项可用于开发脚本时的调试
`sources`:支持的源信息对象,
`sources[kw/kg/tx/wy/mg].name`:源的名字(目前非必须)
`sources[kw/kg/tx/wy/mg].type`:源类型,目前固定值需为`music`
`sources[kw/kg/tx/wy/mg].actions`:支持的actions,由于目前只支持`musicUrl`,所以固定传`['musicUrl']`即可
`sources[kw/kg/tx/wy/mg].qualitys`:该源支持的音质列表,有效的值为`['128k', '320k', 'flac']`,该字段用于控制应用可用的音质类型 | `request` | 应用API请求事件名,回调入参:`handler({ source, action, info})`,回调必须返回`Promise`对象
`source`:音乐源,可能的值取决于初始化时传入的`sources`对象的源key值
`info`:请求附加信息,内容根据`action`变化
`action`:请求操作类型,目前只有`musicUrl`,即获取音乐URL链接,需要在 Promise 返回歌曲 url,`info`的结构:`{type, musicInfo}`,`info.type`:音乐质量,可能的值有`128k` / `320k` / `flac`(取决于初始化时对应源传入的`qualitys`值中的一个),`info.musicInfo`:音乐信息对象,里面有音乐ID、名字等信息 From 3a6c2be48aa9e776caec14072fddd0888a5d044b Mon Sep 17 00:00:00 2001 From: lyswhut Date: Mon, 29 Mar 2021 08:54:55 +0800 Subject: [PATCH 22/49] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 422 ++++++++++++++++++++++++++++++---------------- package.json | 10 +- 2 files changed, 282 insertions(+), 150 deletions(-) diff --git a/package-lock.json b/package-lock.json index 87efbf51bb..13d17838c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,20 +26,20 @@ "dev": true }, "@babel/core": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.10.tgz", - "integrity": "sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.13.tgz", + "integrity": "sha512-1xEs9jZAyKIouOoCmpsgk/I26PoKyvzQ2ixdRpRzfbcp1fL+ozw7TUgdDgwonbTovqRaTfRh50IXuw4QrWO0GA==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.10", - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-compilation-targets": "^7.13.13", + "@babel/helper-module-transforms": "^7.13.12", "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.10", + "@babel/parser": "^7.13.13", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.13", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -58,6 +58,12 @@ "@babel/highlight": "^7.12.13" } }, + "@babel/compat-data": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", + "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "dev": true + }, "@babel/generator": { "version": "7.13.9", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", @@ -69,6 +75,18 @@ "source-map": "^0.5.0" } }, + "@babel/helper-compilation-targets": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", + "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.12", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + } + }, "@babel/helper-function-name": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", @@ -89,6 +107,61 @@ "@babel/types": "^7.12.13" } }, + "@babel/helper-member-expression-to-functions": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "dev": true, + "requires": { + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-module-imports": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "dev": true, + "requires": { + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-module-transforms": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.12.tgz", + "integrity": "sha512-7zVQqMO3V+K4JOOj40kxiCrMf6xlQAkewBB0eu2b03OO/Q21ZutOzjpfD79A5gtE/2OWi1nv625MrDlGlkbknQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-replace-supers": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.13.12", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-simple-access": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "dev": true, + "requires": { + "@babel/types": "^7.13.12" + } + }, "@babel/helper-split-export-declaration": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", @@ -116,9 +189,9 @@ } }, "@babel/parser": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", - "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", "dev": true }, "@babel/template": { @@ -133,26 +206,25 @@ } }, "@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", + "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", + "@babel/generator": "^7.13.9", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.13.13", + "@babel/types": "^7.13.13", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -160,6 +232,25 @@ "to-fast-properties": "^2.0.0" } }, + "browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + } + }, + "caniuse-lite": { + "version": "1.0.30001204", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz", + "integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==", + "dev": true + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -170,6 +261,24 @@ "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } + }, + "electron-to-chromium": { + "version": "1.3.701", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.701.tgz", + "integrity": "sha512-Zd9ofdIMYHYhG1gvnejQDvC/kqSeXQvtXF0yRURGxgwGqDZm9F9Fm3dYFnm5gyuA7xpXfBlzVLN1sz0FjxpKfw==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true } } }, @@ -201,9 +310,9 @@ "dev": true }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -230,9 +339,9 @@ "dev": true }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -574,9 +683,9 @@ "dev": true }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -683,9 +792,9 @@ } }, "@babel/parser": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", - "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", "dev": true }, "@babel/template": { @@ -700,26 +809,25 @@ } }, "@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", + "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", + "@babel/generator": "^7.13.9", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.13.13", + "@babel/types": "^7.13.13", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -989,9 +1097,9 @@ "dev": true }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -1181,9 +1289,9 @@ "dev": true }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -1293,9 +1401,9 @@ } }, "@babel/parser": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", - "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", "dev": true }, "@babel/template": { @@ -1310,26 +1418,25 @@ } }, "@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", + "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", + "@babel/generator": "^7.13.9", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.13.13", + "@babel/types": "^7.13.13", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -1428,9 +1535,9 @@ } }, "@babel/parser": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", - "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", "dev": true }, "@babel/template": { @@ -1445,26 +1552,25 @@ } }, "@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", + "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", + "@babel/generator": "^7.13.9", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.13.13", + "@babel/types": "^7.13.13", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -1515,6 +1621,25 @@ "integrity": "sha512-KNlOe9+/nk4i29g0VXgl8PEXIRms5xKLJeuZ6UptN0fHv+jDiriG+y94X6qAgWTR0h3KaoM1wK5G5h7MHFRSig==", "dev": true }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.13.12.tgz", + "integrity": "sha512-d0u3zWKcoZf379fOeJdr1a5WPDny4aOFZ6hlfKivgK0LY7ZxNfoaHL2fWwdGtHyVvra38FC+HVYkO+byfSA8AQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.13.12" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", + "dev": true + } + } + }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.13.8", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", @@ -1700,9 +1825,9 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.8.tgz", - "integrity": "sha512-hpbBwbTgd7Cz1QryvwJZRo1U0k1q8uyBmeXOSQUjdg/A2TASkhR/rz7AyqZ/kS8kbpsNA80rOYbxySBJAqmhhQ==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.12.tgz", + "integrity": "sha512-fcEdKOkIB7Tf4IxrgEVeFC4zeJSTr78no9wTdBuZZbqF64kzllU0ybo2zrzm7gUQfxGhBgq4E39oRs8Zx/RMYQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", @@ -2041,9 +2166,9 @@ } }, "@babel/parser": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", - "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", "dev": true }, "@babel/template": { @@ -2058,9 +2183,9 @@ } }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -2248,9 +2373,9 @@ } }, "@babel/parser": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", - "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", "dev": true }, "@babel/template": { @@ -2265,9 +2390,9 @@ } }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -2672,15 +2797,16 @@ } }, "@babel/preset-env": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.10.tgz", - "integrity": "sha512-nOsTScuoRghRtUsRr/c69d042ysfPHcu+KOB4A9aAO9eJYqrkat+LF8G1yp1HD18QiwixT2CisZTr/0b3YZPXQ==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.12.tgz", + "integrity": "sha512-JzElc6jk3Ko6zuZgBtjOd01pf9yYDEIH8BcqVuYIuOkzOwDesoa/Nz4gIo4lBG6K861KTV9TvIgmFuT6ytOaAA==", "dev": true, "requires": { - "@babel/compat-data": "^7.13.8", + "@babel/compat-data": "^7.13.12", "@babel/helper-compilation-targets": "^7.13.10", "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-validator-option": "^7.12.17", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.13.12", "@babel/plugin-proposal-async-generator-functions": "^7.13.8", "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-dynamic-import": "^7.13.8", @@ -2691,7 +2817,7 @@ "@babel/plugin-proposal-numeric-separator": "^7.12.13", "@babel/plugin-proposal-object-rest-spread": "^7.13.8", "@babel/plugin-proposal-optional-catch-binding": "^7.13.8", - "@babel/plugin-proposal-optional-chaining": "^7.13.8", + "@babel/plugin-proposal-optional-chaining": "^7.13.12", "@babel/plugin-proposal-private-methods": "^7.13.0", "@babel/plugin-proposal-unicode-property-regex": "^7.12.13", "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -2739,7 +2865,7 @@ "@babel/plugin-transform-unicode-escapes": "^7.12.13", "@babel/plugin-transform-unicode-regex": "^7.12.13", "@babel/preset-modules": "^0.1.4", - "@babel/types": "^7.13.0", + "@babel/types": "^7.13.12", "babel-plugin-polyfill-corejs2": "^0.1.4", "babel-plugin-polyfill-corejs3": "^0.1.3", "babel-plugin-polyfill-regenerator": "^0.1.2", @@ -2747,6 +2873,12 @@ "semver": "^6.3.0" }, "dependencies": { + "@babel/compat-data": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", + "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "dev": true + }, "@babel/helper-plugin-utils": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", @@ -2760,9 +2892,9 @@ "dev": true }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", + "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -5165,7 +5297,7 @@ }, "buffer-crc32": { "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "resolved": "https://registry.npm.taobao.org/buffer-crc32/download/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", "dev": true }, @@ -7865,9 +7997,9 @@ "dev": true }, "eslint": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", - "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", + "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -7887,7 +8019,7 @@ "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -7895,7 +8027,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.20", + "lodash": "^4.17.21", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -7925,9 +8057,9 @@ "dev": true }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -7961,12 +8093,12 @@ "dev": true }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", + "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "ignore": { @@ -7982,9 +8114,9 @@ "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -8006,9 +8138,9 @@ "dev": true }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true } } @@ -8912,7 +9044,7 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&sync_timestamp=1607433842694&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } @@ -8984,7 +9116,7 @@ }, "fd-slicer": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "resolved": "https://registry.npm.taobao.org/fd-slicer/download/fd-slicer-1.1.0.tgz", "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "dev": true, "requires": { @@ -10258,11 +10390,11 @@ "dev": true }, "image-size": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.9.4.tgz", - "integrity": "sha512-4xNfbjG++A42OJdTPYlj2PquCxyWmanpBQflalWGlXEOfc3LOZA3aEZ+2iIZU5KorDUCcZ7iv2dhvHBbMN0G0w==", + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.9.7.tgz", + "integrity": "sha512-KRVgLNZkr00YGN0qn9MlIrmlxbRhsCcEb1Byq3WKGnIV4M48iD185cprRtaoK4t5iC+ym2Q5qlArxZ/V1yzDgA==", "requires": { - "queue": "6.0.1" + "queue": "6.0.2" } }, "immediate": { @@ -12492,7 +12624,7 @@ }, "pend": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "resolved": "https://registry.npm.taobao.org/pend/download/pend-1.2.0.tgz", "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", "dev": true }, @@ -12509,7 +12641,7 @@ }, "pify": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true, "optional": true @@ -13398,7 +13530,7 @@ }, "proto-list": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "resolved": "https://registry.npm.taobao.org/proto-list/download/proto-list-1.2.4.tgz", "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true, "optional": true @@ -13707,9 +13839,9 @@ "dev": true }, "queue": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.1.tgz", - "integrity": "sha512-AJBQabRCCNr9ANq8v77RJEv73DPbn55cdTb+Giq4X0AVnNVZvMHlYp7XlQiN+1npCZj1DuSmaA2hYVUUDgxFDg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", + "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", "requires": { "inherits": "~2.0.3" } @@ -14056,9 +14188,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.7.tgz", - "integrity": "sha512-ib77G0uxsA2ovgiYbCVGx4Pv3PSttAx2vIwidqQzbL2U5S4Q+j00HdSAneSBuyVcMvEnTXMjiGgB+DlXozVhpQ==", + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -14417,7 +14549,7 @@ }, "semver-compare": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "resolved": "https://registry.npm.taobao.org/semver-compare/download/semver-compare-1.0.0.tgz", "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true, "optional": true @@ -15612,9 +15744,9 @@ }, "dependencies": { "ajv": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.1.tgz", - "integrity": "sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==", + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.4.tgz", + "integrity": "sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -16597,9 +16729,9 @@ "dev": true }, "vue-i18n": { - "version": "8.24.0", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.24.0.tgz", - "integrity": "sha512-tRVmPN36Dv+fLeZW5AzoNsZwjV2y2+UdHROaTewUgSG2YLjOj4dFmai4T5PPZtIdRnDnUdwbAwdufCG6fPSegA==" + "version": "8.24.2", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.24.2.tgz", + "integrity": "sha512-+TkAPBQw4Cp2bQrSPtPNkhET7XcWYjjDt1UjWYQs+xbT41q5OAl1I3IZyhg0drjn1nlC1K0f8sLVB/nshUcF1Q==" }, "vue-loader": { "version": "15.9.6", @@ -18152,7 +18284,7 @@ }, "yauzl": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "resolved": "https://registry.npm.taobao.org/yauzl/download/yauzl-2.10.0.tgz", "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "dev": true, "requires": { diff --git a/package.json b/package.json index 69b46ad255..d78ee164e0 100644 --- a/package.json +++ b/package.json @@ -153,13 +153,13 @@ }, "homepage": "https://github.com/lyswhut/lx-music-desktop#readme", "devDependencies": { - "@babel/core": "^7.13.10", + "@babel/core": "^7.13.13", "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-modules-umd": "^7.13.0", "@babel/plugin-transform-runtime": "^7.13.10", "@babel/polyfill": "^7.12.1", - "@babel/preset-env": "^7.13.10", + "@babel/preset-env": "^7.13.12", "babel-eslint": "^10.1.0", "babel-loader": "^8.2.2", "babel-minify-webpack-plugin": "^0.3.1", @@ -176,7 +176,7 @@ "electron-builder": "^22.10.5", "electron-debug": "^3.2.0", "electron-devtools-installer": "^3.1.1", - "eslint": "^7.21.0", + "eslint": "^7.23.0", "eslint-config-standard": "^14.1.1", "eslint-formatter-friendly": "^7.0.0", "eslint-loader": "^4.0.2", @@ -220,14 +220,14 @@ "electron-store": "^6.0.1", "electron-updater": "^4.3.8", "iconv-lite": "^0.6.2", - "image-size": "^0.9.4", + "image-size": "^0.9.7", "js-htmlencode": "^0.3.0", "lrc-file-parser": "^1.0.7", "needle": "^2.6.0", "node-id3": "^0.2.2", "request": "^2.88.2", "vue": "^2.6.12", - "vue-i18n": "^8.24.0", + "vue-i18n": "^8.24.2", "vue-router": "^3.5.1", "vuex": "^3.6.2", "vuex-router-sync": "^5.0.0" From c808500083da9b4148ad8b63c42ca984f51400b6 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Wed, 31 Mar 2021 08:54:47 +0800 Subject: [PATCH 23/49] =?UTF-8?q?=E6=96=B0=E5=A2=9EWindows=20arm64?= =?UTF-8?q?=E4=BD=8D=E5=85=8D=E5=AE=89=E8=A3=85=E7=89=88=E7=9A=84=E6=9E=84?= =?UTF-8?q?=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/beta-pack.yml | 1 + .github/workflows/release.yml | 1 + package.json | 2 ++ publish/changeLog.md | 1 + 4 files changed, 5 insertions(+) diff --git a/.github/workflows/beta-pack.yml b/.github/workflows/beta-pack.yml index 64fefd418a..0f6631c75f 100644 --- a/.github/workflows/beta-pack.yml +++ b/.github/workflows/beta-pack.yml @@ -41,6 +41,7 @@ jobs: npm run pack:win:setup:x86_64 npm run pack:win:7z:x64 npm run pack:win:7z:x86 + npm run pack:win:7z:arm64 - name: Upload Artifact uses: actions/upload-artifact@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71c29b923a..b97efa66cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,6 +41,7 @@ jobs: npm run publish:win:setup:always npm run publish:win:7z:x64 npm run publish:win:7z:x86 + npm run publish:win:7z:arm64 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BT_TOKEN: ${{ secrets.BT_TOKEN }} diff --git a/package.json b/package.json index d78ee164e0..c3798492fb 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "pack:win:7z": "npm run pack:win:7z:x64 && npm run pack:win:7z:x86", "pack:win:7z:x64": "cross-env TARGET=win_绿色版 ARCH=x64 electron-builder -w=7z --x64", "pack:win:7z:x86": "cross-env TARGET=win_绿色版 ARCH=x86 electron-builder -w=7z --ia32", + "pack:win:7z:arm64": "cross-env TARGET=win_绿色版 ARCH=arm64 electron-builder -w=7z --arm64", "pack:linux": "node build-config/pack.js && npm run pack:linux:deb && npm run pack:linux:appImage && npm run pack:linux:rpm && npm run pack:linux:pacman", "pack:linux:appImage": "cross-env ARCH=x64 electron-builder -l=AppImage", "pack:linux:deb": "npm run pack:linux:deb:x64 && npm run pack:linux:deb:x86 && npm run pack:linux:deb:arm64 && npm run pack:linux:deb:armv7l", @@ -37,6 +38,7 @@ "publish:win:portable:x86": "cross-env TARGET=portable ARCH=x86 electron-builder -w=portable --ia32 -p onTagOrDraft", "publish:win:7z:x64": "cross-env TARGET=green ARCH=win_x64 electron-builder -w=7z --x64 -p onTagOrDraft", "publish:win:7z:x86": "cross-env TARGET=green ARCH=win_x86 electron-builder -w=7z --ia32 -p onTagOrDraft", + "publish:win:7z:arm64": "cross-env TARGET=green ARCH=win_arm64 electron-builder -w=7z --arm64 -p onTagOrDraft", "publish:mac:dmg:always": "electron-builder -m=dmg -p always", "publish:mac:dmg": "electron-builder -m=dmg -p onTagOrDraft", "publish:linux:deb:x64:always": "cross-env ARCH=x64 electron-builder -l=deb --x64 -p always", diff --git a/publish/changeLog.md b/publish/changeLog.md index 79a31f7e55..96a651ad36 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,6 +1,7 @@ ### 新增 - 新增启动参数`-dhmkh`,此参数将禁用Chromium的Hardware Media Key Handling特性,用于解决漫步者部分型号耳机与本程序冲突导致耳机意外关机的问题 +- 新增Windows arm64位免安装版的构建 ### 优化 From d6f87894aac6016a95503053426885903184a5fd Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 3 Apr 2021 13:12:11 +0800 Subject: [PATCH 24/49] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 51 +++++++++++++++++++++++------------------------ package.json | 4 ++-- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 13d17838c7..5168810395 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,25 +26,24 @@ "dev": true }, "@babel/core": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.13.tgz", - "integrity": "sha512-1xEs9jZAyKIouOoCmpsgk/I26PoKyvzQ2ixdRpRzfbcp1fL+ozw7TUgdDgwonbTovqRaTfRh50IXuw4QrWO0GA==", + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", + "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", "@babel/generator": "^7.13.9", "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.12", + "@babel/helper-module-transforms": "^7.13.14", "@babel/helpers": "^7.13.10", "@babel/parser": "^7.13.13", "@babel/template": "^7.12.13", "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.13", + "@babel/types": "^7.13.14", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.1.2", - "lodash": "^4.17.19", "semver": "^6.3.0", "source-map": "^0.5.0" }, @@ -126,9 +125,9 @@ } }, "@babel/helper-module-transforms": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.12.tgz", - "integrity": "sha512-7zVQqMO3V+K4JOOj40kxiCrMf6xlQAkewBB0eu2b03OO/Q21ZutOzjpfD79A5gtE/2OWi1nv625MrDlGlkbknQ==", + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", + "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.13.12", @@ -137,8 +136,8 @@ "@babel/helper-split-export-declaration": "^7.12.13", "@babel/helper-validator-identifier": "^7.12.11", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14" } }, "@babel/helper-replace-supers": { @@ -222,9 +221,9 @@ } }, "@babel/types": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", - "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", + "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -246,9 +245,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001204", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz", - "integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==", + "version": "1.0.30001205", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", + "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==", "dev": true }, "chalk": { @@ -263,9 +262,9 @@ } }, "electron-to-chromium": { - "version": "1.3.701", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.701.tgz", - "integrity": "sha512-Zd9ofdIMYHYhG1gvnejQDvC/kqSeXQvtXF0yRURGxgwGqDZm9F9Fm3dYFnm5gyuA7xpXfBlzVLN1sz0FjxpKfw==", + "version": "1.3.707", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.707.tgz", + "integrity": "sha512-BqddgxNPrcWnbDdJw7SzXVzPmp+oiyjVrc7tkQVaznPGSS9SKZatw6qxoP857M+HbOyyqJQwYQtsuFIMSTNSZA==", "dev": true }, "escalade": { @@ -1568,9 +1567,9 @@ } }, "@babel/types": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.13.tgz", - "integrity": "sha512-kt+EpC6qDfIaqlP+DIbIJOclYy/A1YXs9dAf/ljbi+39Bcbc073H6jKVpXEr/EoIh5anGn5xq/yRVzKl+uIc9w==", + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", + "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -6462,9 +6461,9 @@ } }, "core-js": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.9.1.tgz", - "integrity": "sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.10.0.tgz", + "integrity": "sha512-MQx/7TLgmmDVamSyfE+O+5BHvG1aUGj/gHhLn1wVtm2B5u1eVIPvh7vkfjwWKNCjrTJB8+He99IntSQ1qP+vYQ==", "dev": true }, "core-js-compat": { diff --git a/package.json b/package.json index c3798492fb..ed59823522 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ }, "homepage": "https://github.com/lyswhut/lx-music-desktop#readme", "devDependencies": { - "@babel/core": "^7.13.13", + "@babel/core": "^7.13.14", "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-modules-umd": "^7.13.0", @@ -170,7 +170,7 @@ "chalk": "^4.1.0", "changelog-parser": "^2.8.0", "copy-webpack-plugin": "^6.4.1", - "core-js": "^3.9.1", + "core-js": "^3.10.0", "cross-env": "^7.0.3", "css-loader": "^4.3.0", "del": "^6.0.0", From b8250b67c963f97134487c82a5849666747290c8 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 3 Apr 2021 13:58:10 +0800 Subject: [PATCH 25/49] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B0=20webpack=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../renderer-lyric/webpack.config.prod.js | 1 - build-config/renderer/webpack.config.prod.js | 1 - build-config/utils.js | 16 +- package-lock.json | 5253 ++++++++--------- package.json | 31 +- src/main/index.js | 2 +- 6 files changed, 2375 insertions(+), 2929 deletions(-) diff --git a/build-config/renderer-lyric/webpack.config.prod.js b/build-config/renderer-lyric/webpack.config.prod.js index 8cc3d8ddc1..e9e9f7be8d 100644 --- a/build-config/renderer-lyric/webpack.config.prod.js +++ b/build-config/renderer-lyric/webpack.config.prod.js @@ -34,7 +34,6 @@ module.exports = merge(baseConfig, { }), ], optimization: { - chunkIds: 'named', minimizer: [ new TerserPlugin(), new OptimizeCSSAssetsPlugin({}), diff --git a/build-config/renderer/webpack.config.prod.js b/build-config/renderer/webpack.config.prod.js index 8cc3d8ddc1..e9e9f7be8d 100644 --- a/build-config/renderer/webpack.config.prod.js +++ b/build-config/renderer/webpack.config.prod.js @@ -34,7 +34,6 @@ module.exports = merge(baseConfig, { }), ], optimization: { - chunkIds: 'named', minimizer: [ new TerserPlugin(), new OptimizeCSSAssetsPlugin({}), diff --git a/build-config/utils.js b/build-config/utils.js index e3a9b5e019..136b2e50ba 100644 --- a/build-config/utils.js +++ b/build-config/utils.js @@ -2,8 +2,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin') const cssLoaderConfig = require('./css-loader.config') const chalk = require('chalk') -const isDev = process.env.NODE_ENV === 'development' - // merge css-loader exports.mergeCSSLoader = beforeLoader => { const loader = [ @@ -11,12 +9,7 @@ exports.mergeCSSLoader = beforeLoader => { { resourceQuery: /module/, use: [ - { - loader: MiniCssExtractPlugin.loader, - options: { - hmr: isDev, - }, - }, + MiniCssExtractPlugin.loader, { loader: 'css-loader', options: cssLoaderConfig, @@ -27,12 +20,7 @@ exports.mergeCSSLoader = beforeLoader => { // 这里匹配普通的 `