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