Merge remote-tracking branch 'origin/stable'

This commit is contained in:
zadam 2020-11-23 21:20:06 +01:00
commit 167b6974fe
6 changed files with 21 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/* !!!!!! TRILIUM CUSTOM CHANGES !!!!!! */ /* !!!!!! TRILIUM CUSTOM CHANGES !!!!!! */
.ck-widget__selection-handle, .ck-widget__type-around { /* gets rid of triangles: https://github.com/zadam/trilium/issues/1129 */ .printed-content .ck-widget__selection-handle, .printed-content .ck-widget__type-around { /* gets rid of triangles: https://github.com/zadam/trilium/issues/1129 */
display: none; display: none;
} }

View File

@ -94,7 +94,7 @@ class TreeContextMenu {
enabled: !clipboard.isClipboardEmpty() && notSearch && noSelectedNotes }, enabled: !clipboard.isClipboardEmpty() && notSearch && noSelectedNotes },
{ title: 'Paste after', command: "pasteNotesAfterFromClipboard", uiIcon: "paste", { title: 'Paste after', command: "pasteNotesAfterFromClipboard", uiIcon: "paste",
enabled: !clipboard.isClipboardEmpty() && isNotRoot && !isHoisted && parentNotSearch && noSelectedNotes }, enabled: !clipboard.isClipboardEmpty() && isNotRoot && !isHoisted && parentNotSearch && noSelectedNotes },
{ title: "Duplicate subtree(s) here", command: "duplicateSubtree", uiIcon: "empty", { title: `Duplicate subtree <kbd data-command="duplicateSubtree">`, command: "duplicateSubtree", uiIcon: "empty",
enabled: parentNotSearch && isNotRoot && !isHoisted }, enabled: parentNotSearch && isNotRoot && !isHoisted },
{ title: "----" }, { title: "----" },
{ title: "Export", command: "exportNote", uiIcon: "empty", { title: "Export", command: "exportNote", uiIcon: "empty",

View File

@ -248,7 +248,7 @@ export default class NoteDetailWidget extends TabAwareWidget {
this.$widget.find('.note-detail-printable:visible').printThis({ this.$widget.find('.note-detail-printable:visible').printThis({
header: $("<h2>").text(this.note && this.note.title).prop('outerHTML'), header: $("<h2>").text(this.note && this.note.title).prop('outerHTML'),
footer: "<script>document.body.className += ' ck-content';</script>", footer: "<script>document.body.className += ' ck-content printed-content';</script>",
importCSS: false, importCSS: false,
loadCSS: [ loadCSS: [
"libraries/codemirror/codemirror.css", "libraries/codemirror/codemirror.css",

View File

@ -143,6 +143,11 @@ body {
--ck-color-dropdown-panel-background: var(--accented-background-color); --ck-color-dropdown-panel-background: var(--accented-background-color);
--ck-color-dropdown-panel-border: var(--main-border-color); --ck-color-dropdown-panel-border: var(--main-border-color);
/* -- Overrides the default .ck-splitbutton class colors. ----------------------------------- */
--ck-color-split-button-hover-background: var(--ck-color-button-default-hover-background);
--ck-color-split-button-hover-border: var(--main-border-color);
/* -- Overrides the default .ck-input class colors. ----------------------------------------- */ /* -- Overrides the default .ck-input class colors. ----------------------------------------- */
--ck-color-input-background: var(--accented-background-color); --ck-color-input-background: var(--accented-background-color);
@ -199,6 +204,9 @@ body {
--ck-color-engine-placeholder-text: var(--muted-text-color); --ck-color-engine-placeholder-text: var(--muted-text-color);
--ck-z-modal: 10000; --ck-z-modal: 10000;
--ck-color-widget-type-around-button: var(--main-border-color);
--ck-color-widget-type-around-button-hover: var(--main-border-color);
} }
body { body {

View File

@ -184,6 +184,12 @@ const DEFAULT_KEYBOARD_ACTIONS = [
description: "Add note above to the selection", description: "Add note above to the selection",
scope: "note-tree" scope: "note-tree"
}, },
{
actionName: "duplicateSubtree",
defaultShortcuts: [],
description: "Duplicate subtree",
scope: "note-tree"
},
{ {

View File

@ -739,7 +739,10 @@ function duplicateSubtree(origNoteId, newParentNoteId) {
const res = duplicateSubtreeInner(origNote, origBranch, newParentNoteId, noteIdMapping); const res = duplicateSubtreeInner(origNote, origBranch, newParentNoteId, noteIdMapping);
if (!res.note.title.endsWith('(dup)')) {
res.note.title += " (dup)"; res.note.title += " (dup)";
}
res.note.save(); res.note.save();
return res; return res;