import pkg from '../../../package.json' import { remote } from 'electron' -const { Menu, dialog } = remote +import os from 'os' +const { Menu, dialog, BrowserWindow } = remote export default { name: 'setting-page', data () { @@ -72,10 +77,12 @@ export default { version: pkg.version, defaultActive: 'upload', menu: null, - visible: false + visible: false, + os: '' } }, created () { + this.os = os.platform() this.buildMenu() }, methods: { @@ -84,6 +91,14 @@ export default { name: index }) }, + minimizeWindow () { + const window = BrowserWindow.getFocusedWindow() + window.minimize() + }, + closeWindow () { + const window = BrowserWindow.getFocusedWindow() + window.close() + }, buildMenu () { const _this = this const template = [ @@ -128,6 +143,23 @@ export default { font-size 12px line-height h position fixed + z-index 100 + .handle-bar + position absolute + top 2px + right 4px + width 40px + z-index 10000 + -webkit-app-region no-drag + i + cursor pointer + font-size 16px + .el-icon-minus + &:hover + color #409EFF + .el-icon-close + &:hover + color #F15140 .picgo-sidebar height calc(100vh - 22px) .el-menu @@ -160,6 +192,12 @@ export default { right 0 top 18px background active-color + .main-content + padding-top 22px + position relative + z-index 10 + .el-dialog__body + padding 20px .support text-align center &-title diff --git a/static/menubar-nodarwin.png b/static/menubar-nodarwin.png new file mode 100644 index 0000000000000000000000000000000000000000..466bb702af555144caabb9cf96c45344bb779ad8 GIT binary patch literal 744 zcmVP)Px%qDe$SR5%fJRNZb8K@|RGb{7^(i&a{qu{CL8nl$l3AH#U%LztL&uf4C&q0wjX z#;6z7ShAKHgZ;5U0l^leR;Xlm*<1lR2?j?aIU6Miabf?P9=ZP%Cw@STMj{OrciXB~TG| zey}7x#qlWMc)fdHhJNw-_$=Ncmmatvtk^79p-s;#bz-A$w6@VgsF~pU2uzzrXQv6< z&VVsa83T!sd%h3NNRyJGTHJx-Okn9UVCs>KBpztc7A&YGICRxPK3pA?{P3j@#uKRW zTS!G%zC9%Y*DKAjQCyG?zdVK&>qz2g|4ykuQp((+poc)Ner&;*$V)?Kw~gU|L*M$k zkDoS|FHy#-)dJJS^BMTk;#D%5lvk5CD{B>SBZD`OuE{fZTw(UX1OIut&0ZIu*}X5&kDFYa2oK${7ljub^U#fl*srV6NOO zJc;W%E{3Co4R!Iflzb}1r8My1)-2}I5rU-o5r!eGQWfd^jO1JSo|XcIalRLoLvyc< zMlY0gP-Rv&AwAoHKl0Bs4Fv3N=LqedgP7RmdJd_{6R?NP1N6HzTAT(;mWeRLVG_i) zU09#LBQ;eZ$TVHK-06fkZ0ytJ0E}wPjY(vveFN%XKVsB#NsqB?)`Y3ixC+g=b+Fw) zzens-Q)H>(-#(th>*WP3Ob266!3n?jyb?O0MhJDdLmENqgLE!~z@h#igz|rcChT8J aOx+*mZV%X_3c}g|0000