mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 17:55:52 +01:00
small cleanups
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user