mirror of
https://github.com/zadam/trilium.git
synced 2025-03-12 06:54:12 +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);
|
d.showDialog(selectedOrActiveNodes);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
keyboardActionService.setGlobalActionHandler("CreateNoteIntoDayNote", async () => {
|
keyboardActionService.setGlobalActionHandler("CreateNoteIntoDayNote", async () => {
|
||||||
const todayNote = await dateNoteService.getTodayNote();
|
const todayNote = await dateNoteService.getTodayNote();
|
||||||
|
|
||||||
|
@ -203,6 +203,8 @@ function registerEntrypoints() {
|
||||||
});
|
});
|
||||||
|
|
||||||
keyboardActionService.setGlobalActionHandler('CollapseTree', () => appContext.getMainNoteTree().collapseTree());
|
keyboardActionService.setGlobalActionHandler('CollapseTree', () => appContext.getMainNoteTree().collapseTree());
|
||||||
|
|
||||||
|
keyboardActionService.setGlobalActionHandler("CopyWithoutFormatting", utils.copySelectionToClipboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
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 {
|
export default {
|
||||||
reloadApp,
|
reloadApp,
|
||||||
parseDate,
|
parseDate,
|
||||||
|
@ -273,5 +280,6 @@ export default {
|
||||||
isHtmlEmpty,
|
isHtmlEmpty,
|
||||||
clearBrowserCache,
|
clearBrowserCache,
|
||||||
getUrlForDownload,
|
getUrlForDownload,
|
||||||
normalizeShortcut
|
normalizeShortcut,
|
||||||
|
copySelectionToClipboard
|
||||||
};
|
};
|
|
@ -4,7 +4,7 @@ const build = require('./build');
|
||||||
const packageJson = require('../../package');
|
const packageJson = require('../../package');
|
||||||
const {TRILIUM_DATA_DIR} = require('./data_dir');
|
const {TRILIUM_DATA_DIR} = require('./data_dir');
|
||||||
|
|
||||||
const APP_DB_VERSION = 156;
|
const APP_DB_VERSION = 157;
|
||||||
const SYNC_VERSION = 14;
|
const SYNC_VERSION = 14;
|
||||||
const CLIPPER_PROTOCOL_VERSION = "1.0";
|
const CLIPPER_PROTOCOL_VERSION = "1.0";
|
||||||
|
|
||||||
|
|
|
@ -306,6 +306,10 @@ const DEFAULT_KEYBOARD_ACTIONS = [
|
||||||
{
|
{
|
||||||
actionName: "ZoomIn",
|
actionName: "ZoomIn",
|
||||||
defaultShortcuts: ["CommandOrControl+="]
|
defaultShortcuts: ["CommandOrControl+="]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
actionName: "CopyWithoutFormatting",
|
||||||
|
defaultShortcuts: ["CommandOrControl+Alt+C"]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue