mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
feat: more operations for close | 为关闭app操作提供更多选项 (#918)
* feat: more operations for close * remove minimizeToTray form initLocalStorage Co-authored-by: qier222 <qier222@outlook.com> Co-authored-by: qier222 <qier2222@gmail.com>
This commit is contained in:
parent
8b089e6cf4
commit
17ef0e927c
8 changed files with 91 additions and 43 deletions
|
|
@ -285,18 +285,23 @@
|
|||
<h3>其他</h3>
|
||||
<div v-if="isElectron && !isMac" class="item">
|
||||
<div class="left">
|
||||
<div class="title">{{ $t('settings.minimizeToTray') }}</div>
|
||||
<div class="title"> {{ $t('settings.closeAppOption.text') }} </div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="toggle">
|
||||
<input
|
||||
id="minimize-to-tray"
|
||||
v-model="minimizeToTray"
|
||||
type="checkbox"
|
||||
name="minimize-to-tray"
|
||||
/>
|
||||
<label for="minimize-to-tray"></label>
|
||||
</div>
|
||||
<select v-model="closeAppOption">
|
||||
<option value="ask">
|
||||
{{ $t('settings.closeAppOption.ask') }}
|
||||
</option>
|
||||
<option value="exit">
|
||||
{{ $t('settings.closeAppOption.exit') }}
|
||||
</option>
|
||||
<option value="minimize">
|
||||
{{ $t('settings.closeAppOption.minimize') }}
|
||||
</option>
|
||||
<option value="minimizeToTray">
|
||||
{{ $t('settings.closeAppOption.minimizeToTray') }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -723,13 +728,13 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
minimizeToTray: {
|
||||
closeAppOption: {
|
||||
get() {
|
||||
return this.settings.minimizeToTray;
|
||||
return this.settings.closeAppOption;
|
||||
},
|
||||
set(value) {
|
||||
this.$store.commit('updateSettings', {
|
||||
key: 'minimizeToTray',
|
||||
key: 'closeAppOption',
|
||||
value,
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue