opened file change detection now useable on all note types

This commit is contained in:
zadam
2021-04-24 21:56:44 +02:00
parent dcd35b1ea2
commit ccac46527c
13 changed files with 100 additions and 49 deletions

View File

@@ -21,9 +21,9 @@ function downloadFileNote(noteId) {
download(url);
}
async function openFileNote(noteId) {
async function openNoteExternally(noteId) {
if (utils.isElectron()) {
const resp = await server.post("notes/" + noteId + "/saveToTmpDir");
const resp = await server.post("notes/" + noteId + "/save-to-tmp-dir");
const electron = utils.dynamicRequire('electron');
const res = await electron.shell.openPath(resp.tmpFilePath);
@@ -66,7 +66,7 @@ function getHost() {
export default {
download,
downloadFileNote,
openFileNote,
openNoteExternally,
downloadNoteRevision,
getUrlForDownload
}