修正单词拼写错误

pull/495/head
lyswhut 2021-03-12 09:02:40 +08:00
parent af59a4472a
commit 68d8369a8b
10 changed files with 23 additions and 18 deletions

View File

@ -11,7 +11,7 @@ const defaultSetting = {
isMute: false,
mediaDeviceId: 'default',
isMediaDeviceRemovedStopPlay: false,
isShowLyricTransition: false,
isShowLyricTranslation: false,
isPlayLxlrc: true,
isSavePlayTime: false,
},

View File

@ -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 }
}

View File

@ -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) {

View File

@ -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,
}
})

View File

@ -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
},

View File

@ -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 || ''),
)
},
},

View File

@ -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 || ''),

View File

@ -80,7 +80,7 @@ export default {
watch: {
'setting.isAgreePact'(n) {
if (n) return
this.time = 10
this.time = 5
this.startTimeout()
},
},

View File

@ -139,6 +139,7 @@ module.exports = class Lyric {
return {
text: line.text.replace(fontTimeExp, ''),
time: line.time,
translation: line.translation,
dom_line: fontPlayer.lineContent,
}
})

View File

@ -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")