Merge branch 'master' into dev
This commit is contained in:
@@ -119,7 +119,9 @@ export default {
|
||||
rendererSend('max')
|
||||
},
|
||||
close() {
|
||||
rendererSend('close')
|
||||
rendererSend('close', {
|
||||
isToTray: this.setting.tray.isToTray,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"basic_window_size_medium": "中",
|
||||
"basic_window_size_big": "大",
|
||||
"basic_window_size_larger": "较大",
|
||||
"basic_to_tray_title": "关闭时不退出软件将其最小化到系统托盘",
|
||||
"basic_to_tray": "关闭时最小化到系统托盘",
|
||||
"basic_lang_title": "软件显示的语言",
|
||||
"basic_lang": "语言",
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"basic_window_size_medium": "中",
|
||||
"basic_window_size_big": "大",
|
||||
"basic_window_size_larger": "較大",
|
||||
"basic_to_tray_title": "關閉時不退出軟件將其最小化到系統托盤",
|
||||
"basic_to_tray": "關閉時最小化到系統托盤",
|
||||
"basic_lang_title": "軟件顯示的語言",
|
||||
"basic_lang": "語言",
|
||||
"play": "播放設置",
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"basic_window_size_medium": "Medium",
|
||||
"basic_window_size_big": "Large",
|
||||
"basic_window_size_larger": "Larger",
|
||||
"basic_to_tray_title": "Minimize it to the system tray without closing the software when closing",
|
||||
"basic_to_tray": "Minimize to system tray when closing",
|
||||
"basic_lang_title": "The language displayed in the software",
|
||||
"basic_lang": "Language",
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ export const objectDeepMerge = (target, source) => {
|
||||
* @param {*} setting
|
||||
*/
|
||||
export const updateSetting = (setting, version) => {
|
||||
const defaultVersion = '1.0.20'
|
||||
const defaultVersion = '1.0.22'
|
||||
if (!version) {
|
||||
if (setting) {
|
||||
version = setting.version
|
||||
@@ -237,6 +237,10 @@ export const updateSetting = (setting, version) => {
|
||||
password: '',
|
||||
},
|
||||
},
|
||||
tray: {
|
||||
isShow: false,
|
||||
isToTray: false,
|
||||
},
|
||||
windowSizeId: 2,
|
||||
themeId: 0,
|
||||
langId: 'cns',
|
||||
@@ -263,6 +267,7 @@ export const updateSetting = (setting, version) => {
|
||||
setting = defaultSetting
|
||||
}
|
||||
if (setting.apiSource != 'temp') setting.apiSource = 'test' // 强制设置回 test 接口源
|
||||
|
||||
return { setting, version: defaultVersion }
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@ div.scroll(:class="$style.setting")
|
||||
material-checkbox(v-for="(item, index) in windowSizeList" :id="`setting_window_size_${item.id}`" name="setting_window_size" @change="handleWindowSizeChange" :class="$style.gapLeft"
|
||||
need v-model="current_setting.windowSizeId" :value="item.id" :label="$t('view.setting.basic_window_size_' + item.name)" :key="item.id")
|
||||
|
||||
dd(:title="$t('view.setting.basic_to_tray_title')")
|
||||
h3 {{$t('view.setting.basic_to_tray')}}
|
||||
div
|
||||
material-checkbox(id="setting_to_tray" v-model="current_setting.tray.isToTray" @change="handleToTrayChange" :label="$t('view.setting.is_enable')")
|
||||
|
||||
dd(:title="$t('view.setting.basic_lang_title')")
|
||||
h3 {{$t('view.setting.basic_lang')}}
|
||||
div
|
||||
@@ -366,7 +371,11 @@ export default {
|
||||
themeId: 0,
|
||||
sourceId: 0,
|
||||
randomAnimate: true,
|
||||
apiSource: 'messoer',
|
||||
tray: {
|
||||
isShow: false,
|
||||
isToTray: false,
|
||||
},
|
||||
apiSource: 'temp',
|
||||
},
|
||||
languageList,
|
||||
cacheSize: '0 B',
|
||||
@@ -617,6 +626,10 @@ export default {
|
||||
handleMediaDeviceChange(audioDevice) {
|
||||
this.setMediaDeviceId(audioDevice.deviceId)
|
||||
},
|
||||
handleToTrayChange(isToTray) {
|
||||
this.current_setting.tray.isShow = isToTray
|
||||
rendererSend('changeTray', { action: isToTray ? 'create' : 'destroy' })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user