mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 13:17:46 +00:00
feat(components/Navbar): 自訂和微調各系統的 titlebar (#1343)
* feat: linux custom titlebar * add settings init * Update zh-TW.js * fix: color Co-authored-by: memorydream <34763046+memorydream@users.noreply.github.com>
This commit is contained in:
parent
3e1dc62fa0
commit
3d5d40c476
14 changed files with 324 additions and 105 deletions
|
|
@ -331,6 +331,23 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="isElectron && isLinux" class="item">
|
||||
<div class="left">
|
||||
<div class="title"> {{ $t('settings.enableCustomTitlebar') }} </div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="toggle">
|
||||
<input
|
||||
id="enable-custom-titlebar"
|
||||
v-model="enableCustomTitlebar"
|
||||
type="checkbox"
|
||||
name="enable-custom-titlebar"
|
||||
/>
|
||||
<label for="enable-custom-titlebar"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="isElectron" class="item">
|
||||
<div class="left">
|
||||
<div class="title"> {{ $t('settings.showLibraryDefault') }}</div>
|
||||
|
|
@ -592,6 +609,9 @@ export default {
|
|||
isMac() {
|
||||
return /macintosh|mac os x/i.test(navigator.userAgent);
|
||||
},
|
||||
isLinux() {
|
||||
return process.platform === 'linux';
|
||||
},
|
||||
version() {
|
||||
return pkg.version;
|
||||
},
|
||||
|
|
@ -928,6 +948,17 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
enableCustomTitlebar: {
|
||||
get() {
|
||||
return this.settings.linuxEnableCustomTitlebar;
|
||||
},
|
||||
set(value) {
|
||||
this.$store.commit('updateSettings', {
|
||||
key: 'linuxEnableCustomTitlebar',
|
||||
value,
|
||||
});
|
||||
},
|
||||
},
|
||||
isLastfmConnected() {
|
||||
return this.lastfm.key !== undefined;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue