small cleanups

This commit is contained in:
zadam
2020-02-17 19:42:52 +01:00
parent 32d60a7eb9
commit 9797942b8e
13 changed files with 58 additions and 92 deletions

View File

@@ -1,9 +1,9 @@
import noteAutocompleteService from "../services/note_autocomplete.js";
import utils from "../services/utils.js";
import cloningService from "../services/cloning.js";
import treeService from "../services/tree.js";
import toastService from "../services/toast.js";
import treeCache from "../services/tree_cache.js";
import branchService from "../services/branches.js";
const $dialog = $("#clone-to-dialog");
const $form = $("#clone-to-form");
@@ -42,7 +42,7 @@ async function cloneNotesTo(notePath) {
const targetNoteId = treeService.getNoteIdFromNotePath(notePath);
for (const cloneNoteId of clonedNoteIds) {
await cloningService.cloneNoteTo(cloneNoteId, targetNoteId, $clonePrefix.val());
await branchService.cloneNoteTo(cloneNoteId, targetNoteId, $clonePrefix.val());
const clonedNote = await treeCache.getNote(cloneNoteId);
const targetNote = await treeCache.getNote(targetNoteId);

View File

@@ -2,8 +2,7 @@ import noteAutocompleteService from "../services/note_autocomplete.js";
import utils from "../services/utils.js";
import toastService from "../services/toast.js";
import treeCache from "../services/tree_cache.js";
import treeChangesService from "../services/branches.js";
import appContext from "../services/app_context.js";
import branchService from "../services/branches.js";
import treeService from "../services/tree.js";
const $dialog = $("#move-to-dialog");
@@ -34,7 +33,7 @@ export async function showDialog(branchIds) {
}
async function moveNotesTo(parentNoteId) {
await treeChangesService.moveToParentNote(movedBranchIds, parentNoteId);
await branchService.moveToParentNote(movedBranchIds, parentNoteId);
const parentNote = await treeCache.getNote(parentNoteId);

View File

@@ -1,7 +1,7 @@
import server from "../../services/server.js";
import utils from "../../services/utils.js";
import cssLoader from "../../services/css_loader.js";
import appContext from "../../services/app_context.js";
import libraryLoader from "../../services/library_loader.js";
const TPL = `
<p><strong>Settings on this options tab are saved automatically after each change.</strong></p>
@@ -98,7 +98,7 @@ export default class ApperanceOptions {
if (noteId) {
// make sure the CSS is loaded
// if the CSS has been loaded and then updated then the changes won't take effect though
cssLoader.requireCss(`api/notes/download/${noteId}`);
libraryLoader.requireCss(`api/notes/download/${noteId}`);
}
this.$body.addClass("theme-" + newTheme);