diff --git a/src/main/createWindow.js b/src/main/createWindow.js index d64a74be..d861e0a4 100644 --- a/src/main/createWindow.js +++ b/src/main/createWindow.js @@ -17,6 +17,9 @@ const createWindow = (pathname, options = {}) => { const { x, y, width, height } = mainWindowState const winOpt = Object.assign({ x, y, width, height }, { + icon: path.join(__static, 'logo-96px.png'), + minWidth: 450, + minHeight: 220, webPreferences: { webSecurity: false }, diff --git a/src/renderer/components/titleBar.vue b/src/renderer/components/titleBar.vue index 75126679..60c3e843 100644 --- a/src/renderer/components/titleBar.vue +++ b/src/renderer/components/titleBar.vue @@ -13,14 +13,22 @@
-
+
{{ `${HASH[show]} ${wordCount[show]}` }}
-
+
×
@@ -67,20 +75,26 @@ if (index >= len) index = 0 this.show = ITEMS[index] }, + handleCloseClick () { remote.getCurrentWindow().close() }, + handleMaximizeClick () { const win = remote.getCurrentWindow() - if (win.isMaximized()) { + if (win.isFullScreen()) { + win.setFullScreen(false) + } else if (win.isMaximized()) { win.unmaximize() } else { win.maximize() } }, + handleMinimizeClick () { remote.getCurrentWindow().minimize() }, + handleMenuClick () { const win = remote.getCurrentWindow() remote @@ -137,7 +151,7 @@ visibility: hidden; } .active .save-dot.show { - visibility: visible; + visibility: visible; } .title:hover { color: #303133; diff --git a/static/logo-96px.png b/static/logo-96px.png new file mode 100644 index 00000000..6af0fbfd Binary files /dev/null and b/static/logo-96px.png differ