mirror of
https://github.com/zadam/trilium.git
synced 2025-03-11 14:33:29 +08:00
Merge branch 'master' into m41
# Conflicts: # src/public/javascripts/services/entrypoints.js
This commit is contained in:
commit
37f279fab0
5 changed files with 18 additions and 3 deletions
1
db/migrations/0157__fix_contentLength.sql
Normal file
1
db/migrations/0157__fix_contentLength.sql
Normal file
|
@ -0,0 +1 @@
|
|||
UPDATE notes SET contentLength = COALESCE((SELECT COALESCE(LENGTH(content), 0) FROM note_contents WHERE note_contents.noteId = notes.noteId), -1);
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
};
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -306,6 +306,10 @@ const DEFAULT_KEYBOARD_ACTIONS = [
|
|||
{
|
||||
actionName: "ZoomIn",
|
||||
defaultShortcuts: ["CommandOrControl+="]
|
||||
},
|
||||
{
|
||||
actionName: "CopyWithoutFormatting",
|
||||
defaultShortcuts: ["CommandOrControl+Alt+C"]
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue