Merge branch 'master' into m41

# Conflicts:
#	src/public/javascripts/services/entrypoints.js
This commit is contained in:
zadam 2020-01-19 09:30:38 +01:00
commit 37f279fab0
5 changed files with 18 additions and 3 deletions

View file

@ -0,0 +1 @@
UPDATE notes SET contentLength = COALESCE((SELECT COALESCE(LENGTH(content), 0) FROM note_contents WHERE note_contents.noteId = notes.noteId), -1);

View file

@ -154,7 +154,7 @@ function registerEntrypoints() {
d.showDialog(selectedOrActiveNodes);
}));
keyboardActionService.setGlobalActionHandler("CreateNoteIntoDayNote", async () => {
const todayNote = await dateNoteService.getTodayNote();
@ -203,6 +203,8 @@ function registerEntrypoints() {
});
keyboardActionService.setGlobalActionHandler('CollapseTree', () => appContext.getMainNoteTree().collapseTree());
keyboardActionService.setGlobalActionHandler("CopyWithoutFormatting", utils.copySelectionToClipboard);
}
export default {

View file

@ -241,6 +241,13 @@ function getUrlForDownload(url) {
}
}
function copySelectionToClipboard() {
const text = window.getSelection().toString();
if (navigator.clipboard) {
navigator.clipboard.writeText(text);
}
}
export default {
reloadApp,
parseDate,
@ -273,5 +280,6 @@ export default {
isHtmlEmpty,
clearBrowserCache,
getUrlForDownload,
normalizeShortcut
normalizeShortcut,
copySelectionToClipboard
};

View file

@ -4,7 +4,7 @@ const build = require('./build');
const packageJson = require('../../package');
const {TRILIUM_DATA_DIR} = require('./data_dir');
const APP_DB_VERSION = 156;
const APP_DB_VERSION = 157;
const SYNC_VERSION = 14;
const CLIPPER_PROTOCOL_VERSION = "1.0";

View file

@ -306,6 +306,10 @@ const DEFAULT_KEYBOARD_ACTIONS = [
{
actionName: "ZoomIn",
defaultShortcuts: ["CommandOrControl+="]
},
{
actionName: "CopyWithoutFormatting",
defaultShortcuts: ["CommandOrControl+Alt+C"]
}
];