diff --git a/data/version b/data/version index 063fa1a2d..69dcd5f07 100644 --- a/data/version +++ b/data/version @@ -1 +1 @@ -{"version":"2.1","updatedTime":"2016-07-02T07:21:51.505Z"} \ No newline at end of file +{"version":"2.2","updatedTime":"2016-12-29T07:21:51.505Z"} \ No newline at end of file diff --git a/main.js b/main.js index e3e34d69e..124cdd1fb 100644 --- a/main.js +++ b/main.js @@ -154,9 +154,13 @@ function openIt() { function close (e, force) { console.log('close:', force); - mainWindow.hide(); - e && e.preventDefault(); - mainWindow.webContents.send('closeWindow'); + if (mainWindow) { + mainWindow.hide(); + e && e.preventDefault(); + mainWindow.webContents.send('closeWindow'); + } else { + app.quit(); + } } // 以前的关闭是真关闭, 现是是假关闭了 @@ -177,17 +181,25 @@ function openIt() { // 前端发来可以关闭了 ipc.on('quit-app', function(event, arg) { console.log('get quit-app request'); - mainWindow.destroy(); - mainWindow = null; + if (mainWindow) { + mainWindow.destroy(); + mainWindow = null; + } else { + app.quit(); + } }); pdfMain.init(); function show () { - mainWindow.show(); - mainWindow.restore(); - mainWindow.focus(); - mainWindow.webContents.send('focusWindow'); + if (mainWindow) { + mainWindow.show(); + mainWindow.restore(); + mainWindow.focus(); + mainWindow.webContents.send('focusWindow'); + } else { + app.quit(); + } } var trayShowed = false; diff --git a/public/config-default.js b/public/config-default.js index 9e5153273..751252e2c 100644 --- a/public/config-default.js +++ b/public/config-default.js @@ -1,7 +1,6 @@ var Config = { "plugins": [ "theme", - "md_theme", "import_leanote", "import_evernote", "import_html", diff --git a/public/config.js b/public/config.js index 260f36360..c1f9b20aa 100644 --- a/public/config.js +++ b/public/config.js @@ -1,7 +1,6 @@ var Config = { "plugins": [ "theme", - "md_theme", "import_leanote", "import_evernote", "import_html", @@ -34,8 +33,8 @@ var Config = { "name": "日本語" } ], - "lang": "en-us", - "theme": "", - "view": "snippet", + "lang": "zh-cn", + "theme": "night", + "view": "list", "mdTheme": "github2" }; \ No newline at end of file diff --git a/public/js/app/note.js b/public/js/app/note.js index a5a1313ff..2e8f21f8c 100644 --- a/public/js/app/note.js +++ b/public/js/app/note.js @@ -3226,7 +3226,7 @@ $(function() { var themeSubmenus = new gui.Menu(); themeSubmenus.append(new gui.MenuItem({ checked: Config.view === "snippet", - label: Api.getMsg("snippetView"), + label: Api.getMsg("Snippet view"), type: "checkbox", click: function() { Note.switchView('snippet'); @@ -3234,7 +3234,7 @@ $(function() { })); themeSubmenus.append(new gui.MenuItem({ checked: Config.view === "list", - label: Api.getMsg("listView"), + label: Api.getMsg("List view"), type: "checkbox", click: function() { Note.switchView('list'); diff --git a/public/js/app/page.js b/public/js/app/page.js index e03b30a93..7f1e33c36 100644 --- a/public/js/app/page.js +++ b/public/js/app/page.js @@ -1982,15 +1982,15 @@ function setMacTopMenu() { type: 'separator' }, { - label: Api.getMsg('snippetView'), - type: "checkbox", + label: Api.getMsg('Snippet view'), + // type: "checkbox", click: function() { Note.switchView('snippet'); }, }, { - label: Api.getMsg('listView'), - type: "checkbox", + label: Api.getMsg('List view'), + // type: "checkbox", click: function() { Note.switchView('list'); }, @@ -2181,9 +2181,9 @@ function userMenu(allUsers) { this.menu.append(mdThemeMenu); } - var height = 260; + var height = 235; if (UserInfo.IsLocal) { - height = 230; + height = 215; } if(!isMac()) { this.menu.append(new gui.MenuItem({ type: 'separator' })); diff --git a/public/js/app/tag.js b/public/js/app/tag.js index bced70ca9..b7aef70e4 100644 --- a/public/js/app/tag.js +++ b/public/js/app/tag.js @@ -97,9 +97,11 @@ TagNav.prototype = { var text = tag; text = trimTitle(text); - var classes = 'label label-default'; - // 笔记数量先隐藏, 不准确 - $('#tagNav').append(tt('