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('
  • ? (?) X
  • ', tag, classes, text, noteTag.Count)); + if (text) { + var classes = 'label label-default'; + // 笔记数量先隐藏, 不准确 + $('#tagNav').append(tt('
  • ? (?) X
  • ', tag, classes, text, noteTag.Count)); + } } if(this.tags.length == 0) { diff --git a/public/langs/en-us.js b/public/langs/en-us.js index 1b53040f9..4e81348c4 100644 --- a/public/langs/en-us.js +++ b/public/langs/en-us.js @@ -87,7 +87,7 @@ "leanoteBlog": "Blog", "leftHidden": "Hidden slide bar", "leftShow": "Show slide bar", - "listView": "List view", + "List view": "List view", "login": "Sign in", "loginSuccess": "login success", "logining": "Sign in", @@ -146,7 +146,7 @@ "shareInfo": "Share your knowledge to your friends in leanote.", "shareToFriends": "Share to friends", "simple": "Simple", - "snippetView": "Snippet view", + "Snippet view": "Snippet view", "submit": "submit", "suggestions": "Suggestions", "suggestionsInfo": "help us to improve our service.", diff --git a/public/langs/zh-cn.js b/public/langs/zh-cn.js index 6ab243fed..57c034aa6 100644 --- a/public/langs/zh-cn.js +++ b/public/langs/zh-cn.js @@ -84,7 +84,6 @@ "leanoteBlog": "官方博客", "leftHidden": "隐藏左侧", "leftShow": "展开左侧", - "listView": "列表视图", "login": "登录", "loginSuccess": "登录成功, 正在跳转", "logining": "正在登录", @@ -141,7 +140,7 @@ "shareInfo": "你也可以将知识分享给你的好友.", "shareToFriends": "分享给好友", "simple": "简约", - "snippetView": "摘要视图", + "submit": "提交", "suggestions": "建议", "suggestionsInfo": "帮助我们完善leanote", @@ -315,5 +314,8 @@ "ctrl/cmd+e Toggle Modify with Readonly": "ctrl/cmd+e 切换编辑与只读", "Open": "打开", - "Close": "关闭" + "Close": "关闭", + + "Snippet view": "摘要视图", + "List view": "列表视图" } diff --git a/public/langs/zh-hk.js b/public/langs/zh-hk.js index 4bc8a54e8..de990f602 100644 --- a/public/langs/zh-hk.js +++ b/public/langs/zh-hk.js @@ -309,5 +309,11 @@ "Don't Show Anymore": "不再提示", "Load Database Error": "載入資料庫出錯, 請嘗試在帳戶管理中優化資料庫", - "ctrl/cmd+e Toggle Modify with Readonly": "ctrl/cmd+e 切換編輯與唯讀" + "ctrl/cmd+e Toggle Modify with Readonly": "ctrl/cmd+e 切換編輯與唯讀", + + "Open": "打開", + "Close": "關閉", + + "Snippet view": "摘要視圖", + "List view": "列表視圖" } diff --git a/public/themes/basic.less b/public/themes/basic.less index 09ea9c7e3..1328931e0 100644 --- a/public/themes/basic.less +++ b/public/themes/basic.less @@ -1224,13 +1224,13 @@ h3 { #noteItemList .item-active, #noteItemList .item-active:hover { - background-color: #65bd77 !important; // #eee;/*@bgColor*/; + background-color: #65bd77; // #eee;/*@bgColor*/; color: #fff; .fa { color: #eee; } .item-info .fa { - color: #eee !important; + color: #eee; } .item-title { color: #fff; diff --git a/public/themes/default.less b/public/themes/default.less index 1a7033ce8..bdab8ca25 100644 --- a/public/themes/default.less +++ b/public/themes/default.less @@ -916,10 +916,10 @@ body, #viewModeDropdown { width: 30px; height:35px; - line-height: 30px; + line-height: 34px; text-align: center; position: relative; - z-index: 10000; + z-index: 2000; cursor: pointer; } diff --git a/public/themes/windows.less b/public/themes/windows.less index 6d8cdd184..dba84a37d 100644 --- a/public/themes/windows.less +++ b/public/themes/windows.less @@ -78,7 +78,7 @@ html, body, #page, #pageInner, #noteList, #notebook, #leftNotebook { #winTool { display: none; } -#topDrag { +#topDrag, #topDrag2 { display: none; } #notebook { @@ -99,4 +99,4 @@ html, body, #page, #pageInner, #noteList, #notebook, #leftNotebook { // for win10 #noteAndEditor { border-top: 1px solid #eee; -} \ No newline at end of file +}