This commit is contained in:
life
2016-12-29 11:56:24 +08:00
parent 606fdb562e
commit ccc8983cd4
13 changed files with 58 additions and 38 deletions

View File

@@ -1 +1 @@
{"version":"2.1","updatedTime":"2016-07-02T07:21:51.505Z"} {"version":"2.2","updatedTime":"2016-12-29T07:21:51.505Z"}

12
main.js
View File

@@ -154,9 +154,13 @@ function openIt() {
function close (e, force) { function close (e, force) {
console.log('close:', force); console.log('close:', force);
if (mainWindow) {
mainWindow.hide(); mainWindow.hide();
e && e.preventDefault(); e && e.preventDefault();
mainWindow.webContents.send('closeWindow'); mainWindow.webContents.send('closeWindow');
} else {
app.quit();
}
} }
// 以前的关闭是真关闭, 现是是假关闭了 // 以前的关闭是真关闭, 现是是假关闭了
@@ -177,17 +181,25 @@ function openIt() {
// 前端发来可以关闭了 // 前端发来可以关闭了
ipc.on('quit-app', function(event, arg) { ipc.on('quit-app', function(event, arg) {
console.log('get quit-app request'); console.log('get quit-app request');
if (mainWindow) {
mainWindow.destroy(); mainWindow.destroy();
mainWindow = null; mainWindow = null;
} else {
app.quit();
}
}); });
pdfMain.init(); pdfMain.init();
function show () { function show () {
if (mainWindow) {
mainWindow.show(); mainWindow.show();
mainWindow.restore(); mainWindow.restore();
mainWindow.focus(); mainWindow.focus();
mainWindow.webContents.send('focusWindow'); mainWindow.webContents.send('focusWindow');
} else {
app.quit();
}
} }
var trayShowed = false; var trayShowed = false;

View File

@@ -1,7 +1,6 @@
var Config = { var Config = {
"plugins": [ "plugins": [
"theme", "theme",
"md_theme",
"import_leanote", "import_leanote",
"import_evernote", "import_evernote",
"import_html", "import_html",

View File

@@ -1,7 +1,6 @@
var Config = { var Config = {
"plugins": [ "plugins": [
"theme", "theme",
"md_theme",
"import_leanote", "import_leanote",
"import_evernote", "import_evernote",
"import_html", "import_html",
@@ -34,8 +33,8 @@ var Config = {
"name": "日本語" "name": "日本語"
} }
], ],
"lang": "en-us", "lang": "zh-cn",
"theme": "", "theme": "night",
"view": "snippet", "view": "list",
"mdTheme": "github2" "mdTheme": "github2"
}; };

View File

@@ -3226,7 +3226,7 @@ $(function() {
var themeSubmenus = new gui.Menu(); var themeSubmenus = new gui.Menu();
themeSubmenus.append(new gui.MenuItem({ themeSubmenus.append(new gui.MenuItem({
checked: Config.view === "snippet", checked: Config.view === "snippet",
label: Api.getMsg("snippetView"), label: Api.getMsg("Snippet view"),
type: "checkbox", type: "checkbox",
click: function() { click: function() {
Note.switchView('snippet'); Note.switchView('snippet');
@@ -3234,7 +3234,7 @@ $(function() {
})); }));
themeSubmenus.append(new gui.MenuItem({ themeSubmenus.append(new gui.MenuItem({
checked: Config.view === "list", checked: Config.view === "list",
label: Api.getMsg("listView"), label: Api.getMsg("List view"),
type: "checkbox", type: "checkbox",
click: function() { click: function() {
Note.switchView('list'); Note.switchView('list');

View File

@@ -1982,15 +1982,15 @@ function setMacTopMenu() {
type: 'separator' type: 'separator'
}, },
{ {
label: Api.getMsg('snippetView'), label: Api.getMsg('Snippet view'),
type: "checkbox", // type: "checkbox",
click: function() { click: function() {
Note.switchView('snippet'); Note.switchView('snippet');
}, },
}, },
{ {
label: Api.getMsg('listView'), label: Api.getMsg('List view'),
type: "checkbox", // type: "checkbox",
click: function() { click: function() {
Note.switchView('list'); Note.switchView('list');
}, },
@@ -2181,9 +2181,9 @@ function userMenu(allUsers) {
this.menu.append(mdThemeMenu); this.menu.append(mdThemeMenu);
} }
var height = 260; var height = 235;
if (UserInfo.IsLocal) { if (UserInfo.IsLocal) {
height = 230; height = 215;
} }
if(!isMac()) { if(!isMac()) {
this.menu.append(new gui.MenuItem({ type: 'separator' })); this.menu.append(new gui.MenuItem({ type: 'separator' }));

View File

@@ -97,9 +97,11 @@ TagNav.prototype = {
var text = tag; var text = tag;
text = trimTitle(text); text = trimTitle(text);
if (text) {
var classes = 'label label-default'; var classes = 'label label-default';
// 笔记数量先隐藏, 不准确 // 笔记数量先隐藏, 不准确
$('#tagNav').append(tt('<li data-tag="?"><a> <span class="?">? <em style="display: none">(?)</em></span> <i class="tag-delete">X</i></li>', tag, classes, text, noteTag.Count)); $('#tagNav').append(tt('<li data-tag="?"><a> <span class="?">? <em style="display: none">(?)</em></span> <i class="tag-delete">X</i></li>', tag, classes, text, noteTag.Count));
}
} }
if(this.tags.length == 0) { if(this.tags.length == 0) {

View File

@@ -87,7 +87,7 @@
"leanoteBlog": "Blog", "leanoteBlog": "Blog",
"leftHidden": "Hidden slide bar", "leftHidden": "Hidden slide bar",
"leftShow": "Show slide bar", "leftShow": "Show slide bar",
"listView": "List view", "List view": "List view",
"login": "Sign in", "login": "Sign in",
"loginSuccess": "login success", "loginSuccess": "login success",
"logining": "Sign in", "logining": "Sign in",
@@ -146,7 +146,7 @@
"shareInfo": "Share your knowledge to your friends in leanote.", "shareInfo": "Share your knowledge to your friends in leanote.",
"shareToFriends": "Share to friends", "shareToFriends": "Share to friends",
"simple": "Simple", "simple": "Simple",
"snippetView": "Snippet view", "Snippet view": "Snippet view",
"submit": "submit", "submit": "submit",
"suggestions": "Suggestions", "suggestions": "Suggestions",
"suggestionsInfo": "help us to improve our service.", "suggestionsInfo": "help us to improve our service.",

View File

@@ -84,7 +84,6 @@
"leanoteBlog": "官方博客", "leanoteBlog": "官方博客",
"leftHidden": "隐藏左侧", "leftHidden": "隐藏左侧",
"leftShow": "展开左侧", "leftShow": "展开左侧",
"listView": "列表视图",
"login": "登录", "login": "登录",
"loginSuccess": "登录成功, 正在跳转", "loginSuccess": "登录成功, 正在跳转",
"logining": "正在登录", "logining": "正在登录",
@@ -141,7 +140,7 @@
"shareInfo": "你也可以将知识分享给你的好友.", "shareInfo": "你也可以将知识分享给你的好友.",
"shareToFriends": "分享给好友", "shareToFriends": "分享给好友",
"simple": "简约", "simple": "简约",
"snippetView": "摘要视图",
"submit": "提交", "submit": "提交",
"suggestions": "建议", "suggestions": "建议",
"suggestionsInfo": "帮助我们完善leanote", "suggestionsInfo": "帮助我们完善leanote",
@@ -315,5 +314,8 @@
"ctrl/cmd+e Toggle Modify with Readonly": "ctrl/cmd+e 切换编辑与只读", "ctrl/cmd+e Toggle Modify with Readonly": "ctrl/cmd+e 切换编辑与只读",
"Open": "打开", "Open": "打开",
"Close": "关闭" "Close": "关闭",
"Snippet view": "摘要视图",
"List view": "列表视图"
} }

View File

@@ -309,5 +309,11 @@
"Don't Show Anymore": "不再提示", "Don't Show Anymore": "不再提示",
"Load Database Error": "載入資料庫出錯, 請嘗試在帳戶管理中優化資料庫", "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": "列表視圖"
} }

View File

@@ -1224,13 +1224,13 @@ h3 {
#noteItemList .item-active, #noteItemList .item-active,
#noteItemList .item-active:hover { #noteItemList .item-active:hover {
background-color: #65bd77 !important; // #eee;/*@bgColor*/; background-color: #65bd77; // #eee;/*@bgColor*/;
color: #fff; color: #fff;
.fa { .fa {
color: #eee; color: #eee;
} }
.item-info .fa { .item-info .fa {
color: #eee !important; color: #eee;
} }
.item-title { .item-title {
color: #fff; color: #fff;

View File

@@ -916,10 +916,10 @@ body,
#viewModeDropdown { #viewModeDropdown {
width: 30px; width: 30px;
height:35px; height:35px;
line-height: 30px; line-height: 34px;
text-align: center; text-align: center;
position: relative; position: relative;
z-index: 10000; z-index: 2000;
cursor: pointer; cursor: pointer;
} }

View File

@@ -78,7 +78,7 @@ html, body, #page, #pageInner, #noteList, #notebook, #leftNotebook {
#winTool { #winTool {
display: none; display: none;
} }
#topDrag { #topDrag, #topDrag2 {
display: none; display: none;
} }
#notebook { #notebook {