mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-16 16:04:56 +00:00
starrd -> untitle, 关闭隐藏窗口, 拖动区域优化
This commit is contained in:
@@ -93,7 +93,7 @@ h1, h2, h3 {
|
|||||||
#tool {
|
#tool {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
margin-left: -5px; // 为了和左边的底部线连接起来
|
// margin-left: -5px; // 为了和左边的底部线连接起来
|
||||||
}
|
}
|
||||||
#tag {
|
#tag {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
@@ -1726,9 +1726,8 @@ body {
|
|||||||
#myNotebookNavForListNav span {
|
#myNotebookNavForListNav span {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
#notesAndSort, #tool {
|
#newMyNote, #tool {
|
||||||
// top: -5px;
|
z-index: 1001; // 比topDrag大些
|
||||||
// height: 41px;
|
|
||||||
}
|
}
|
||||||
#editor, #mdEditor {
|
#editor, #mdEditor {
|
||||||
// top: 51px;
|
// top: 51px;
|
||||||
@@ -1739,7 +1738,7 @@ body {
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 10px;
|
height: 40px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
|
@@ -14,6 +14,9 @@ body {
|
|||||||
.navbar.navbar-default {
|
.navbar.navbar-default {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
#topDrag {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
#presentation {
|
#presentation {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@@ -16,7 +16,9 @@ body {
|
|||||||
{
|
{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
#topDrag {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
#presentation {
|
#presentation {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@@ -88,7 +88,6 @@ h3 {
|
|||||||
#tool {
|
#tool {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
margin-left: -5px;
|
|
||||||
}
|
}
|
||||||
#tag {
|
#tag {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
@@ -1526,13 +1525,17 @@ body.init #pageInner {
|
|||||||
#myNotebookNavForListNav span {
|
#myNotebookNavForListNav span {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
#newMyNote,
|
||||||
|
#tool {
|
||||||
|
z-index: 1001;
|
||||||
|
}
|
||||||
#topDrag {
|
#topDrag {
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 10px;
|
height: 40px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
@@ -37,6 +37,9 @@ Note.isReadOnly = false;
|
|||||||
// 定时保存信息
|
// 定时保存信息
|
||||||
Note.intervalTime = 10 * 1000; // 600s, 10mins
|
Note.intervalTime = 10 * 1000; // 600s, 10mins
|
||||||
Note.startInterval = function() {
|
Note.startInterval = function() {
|
||||||
|
// 不要自动保存
|
||||||
|
return;
|
||||||
|
|
||||||
console.error("??");
|
console.error("??");
|
||||||
if(Note.interval) {
|
if(Note.interval) {
|
||||||
clearInterval(Note.interval);
|
clearInterval(Note.interval);
|
||||||
@@ -799,6 +802,8 @@ Note.renderChangedNote = function(changedNote) {
|
|||||||
var $leftNoteNav = $(tt('[noteId="?"]', changedNote.NoteId));
|
var $leftNoteNav = $(tt('[noteId="?"]', changedNote.NoteId));
|
||||||
if(changedNote.Title) {
|
if(changedNote.Title) {
|
||||||
$leftNoteNav.find(".item-title").html(changedNote.Title);
|
$leftNoteNav.find(".item-title").html(changedNote.Title);
|
||||||
|
// 如果标题改了, 如果也在star列表中, 那也要改star的标题啊
|
||||||
|
Note.changeStarNoteTitle(changedNote.NoteId, changedNote.Title);
|
||||||
}
|
}
|
||||||
if(changedNote.Desc) {
|
if(changedNote.Desc) {
|
||||||
$leftNoteNav.find(".desc").html(changedNote.Desc);
|
$leftNoteNav.find(".desc").html(changedNote.Desc);
|
||||||
@@ -818,8 +823,7 @@ Note.renderChangedNote = function(changedNote) {
|
|||||||
$leftNoteNav.removeClass("item-image");
|
$leftNoteNav.removeClass("item-image");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果标题改了, 如果也在star列表中, 那也要改star的标题啊
|
|
||||||
Note.changeStarNoteTitle(changedNote);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清空右侧note信息, 可能是共享的,
|
// 清空右侧note信息, 可能是共享的,
|
||||||
@@ -1824,15 +1828,20 @@ Note.renderStarNote = function(target) {
|
|||||||
Notebook.changeCurNotebookTitle('Starred', true);
|
Notebook.changeCurNotebookTitle('Starred', true);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 笔记标签改了后, 如果在star中, 则也要改标题
|
// 笔记标题改了后, 如果在star中, 则也要改标题
|
||||||
Note.changeStarNoteTitle = function(note) {
|
Note.changeStarNoteTitle = function(noteId, title) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var cacheNote = me.getNote(note.NoteId);
|
var cacheNote = me.getNote(noteId);
|
||||||
|
/*
|
||||||
if(!cacheNote.Star) {
|
if(!cacheNote.Star) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var target = me.starNotesO.find('li[data-id="' + note.NoteId + '"]');
|
*/
|
||||||
target.find('a').html((note.Title || 'Untitled') + '<span class="delete-star" title="Remove">X</span>');
|
|
||||||
|
var target = me.starNotesO.find('li[data-id="' + noteId + '"]');
|
||||||
|
if(target.length == 1) {
|
||||||
|
target.find('a').html((title || 'Untitled') + '<span class="delete-star" title="Remove">X</span>');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 取消star, note delete/trash时取消star
|
// 取消star, note delete/trash时取消star
|
||||||
@@ -2594,6 +2603,7 @@ $(function() {
|
|||||||
$('#editorContent, #wmd-input, #noteTitle').keyup(function() {
|
$('#editorContent, #wmd-input, #noteTitle').keyup(function() {
|
||||||
Note.curNoteIsDirtied();
|
Note.curNoteIsDirtied();
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$('#addTagInput').click(function() {
|
$('#addTagInput').click(function() {
|
||||||
Note.curNoteIsDirtied();
|
Note.curNoteIsDirtied();
|
||||||
|
@@ -66,14 +66,28 @@ function isURL(str_url) {
|
|||||||
function openExternal(url) {
|
function openExternal(url) {
|
||||||
gui.Shell.openExternal(url);
|
gui.Shell.openExternal(url);
|
||||||
}
|
}
|
||||||
|
function isMac() {
|
||||||
|
return process.platform === 'darwin';
|
||||||
|
}
|
||||||
|
|
||||||
// 窗口大小设置
|
// 窗口大小设置
|
||||||
var win = gui.Window.get();
|
var win = gui.Window.get();
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
var isMacP = isMac();
|
||||||
$('.tool-close, .tool-close-blur').click(function() {
|
$('.tool-close, .tool-close-blur').click(function() {
|
||||||
win.close();
|
// mac下关闭才是隐藏
|
||||||
|
if(isMacP) {
|
||||||
|
win.hide();
|
||||||
|
} else {
|
||||||
|
win.close();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
gui.App.on('reopen', function() {
|
||||||
|
win.show();
|
||||||
|
win.focus();
|
||||||
|
});
|
||||||
|
|
||||||
$('.tool-min, .tool-min-blur').click(function() {
|
$('.tool-min, .tool-min-blur').click(function() {
|
||||||
win.minimize();
|
win.minimize();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user