From 3d5d40c476970ec42dd43454bc4237d645b796cc Mon Sep 17 00:00:00 2001 From: pan93412 Date: Fri, 25 Feb 2022 07:36:56 +0800 Subject: [PATCH] =?UTF-8?q?feat(components/Navbar):=20=E8=87=AA=E8=A8=82?= =?UTF-8?q?=E5=92=8C=E5=BE=AE=E8=AA=BF=E5=90=84=E7=B3=BB=E7=B5=B1=E7=9A=84?= =?UTF-8?q?=20titlebar=20(#1343)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: linux custom titlebar * add settings init * Update zh-TW.js * fix: color Co-authored-by: memorydream <34763046+memorydream@users.noreply.github.com> --- public/img/logos/yesplaymusic-white24x24.png | Bin 0 -> 750 bytes src/background.js | 5 +- src/components/LinuxTitlebar.vue | 132 +++++++++++++++++++ src/components/Navbar.vue | 125 ++++-------------- src/components/Win32Titlebar.vue | 123 +++++++++++++++++ src/locale/lang/en.js | 1 + src/locale/lang/tr.js | 4 +- src/locale/lang/zh-CN.js | 1 + src/locale/lang/zh-TW.js | 1 + src/store/initLocalStorage.js | 1 + src/store/mutations.js | 3 + src/store/state.js | 1 + src/utils/Player.js | 1 + src/views/settings.vue | 31 +++++ 14 files changed, 324 insertions(+), 105 deletions(-) create mode 100644 public/img/logos/yesplaymusic-white24x24.png create mode 100644 src/components/LinuxTitlebar.vue create mode 100644 src/components/Win32Titlebar.vue diff --git a/public/img/logos/yesplaymusic-white24x24.png b/public/img/logos/yesplaymusic-white24x24.png new file mode 100644 index 0000000000000000000000000000000000000000..d8e4715d8dd1e1cc59b5be762f447f45186dedbf GIT binary patch literal 750 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x}o+VA|^G;uuoFc=w=hc1)^7!^7XU z&wYeGc_uFj6}Xac_sXx00huL=td33cFVy~V{%?)`-}W-dD{S4a8NJ*WQ$;r(nJT?- zvX52qvpwhE^6X)64_LB5davHU&qCf;q%4^D8gdsrJDHNe!lV3X$GX=(6E&0;vF&5z z`^kP~^2wA>ACDb#OIx=np#O@qC@Pq`^YFoh0++y#)0t5vfV`{c&q6viGYkJ@VLvWp9_0D-ftEb(}C!^qsb>`J==> zxpO~Wy|d)6o4*JQKt_a2TPff)d*Q1MTuMe0)BpS_I5pkgx8na+Uc1`&n$uQ(k>V1a znyNLi`CF3PI~K)HJ$YuSHuH)M&;6-N^}7Bx;JT^p)Hr8B!4*2eCoPK$&D27Lm72<| z9zP09%QpS-ChYXv?dt^vmrQx#%Cfi3$u)JR*SVRS+tZ)$yw$mQ#q|B18J`ZWHJw-c z%yQedZ62BnF9p9e6%jm`s%3fjh0cUo()uZOmFC5NkFI|6=FNs}+uUNW>#X>q)D-8u zuxRF~&)0?WWBm903pzb}eN19``Sh<}OJ^-pT-tIfRSRg@*)uDbObLkG@#~9Pe9gSb z$jHRv;>iaS9K1SNMW;>?($Z8FyW(>(V1@Ej)~WYiz0#_#t_}%x1bn8DN4&t;ucLK6TQ!&J-w literal 0 HcmV?d00001 diff --git a/src/background.js b/src/background.js index 8af41eb..276d790 100644 --- a/src/background.js +++ b/src/background.js @@ -180,7 +180,10 @@ class Background { minWidth: 1080, minHeight: 720, titleBarStyle: 'hiddenInset', - frame: !isWindows, + frame: !( + isWindows || + (isLinux && this.store.get('settings.linuxEnableCustomTitlebar')) + ), title: 'YesPlayMusic', show: false, webPreferences: { diff --git a/src/components/LinuxTitlebar.vue b/src/components/LinuxTitlebar.vue new file mode 100644 index 0000000..8575c6c --- /dev/null +++ b/src/components/LinuxTitlebar.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 6b01a48..b6af865 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -1,27 +1,8 @@