mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 04:59:04 +01:00
refactor(services): use named imports from utils
had rename the imports due to name clashes
This commit is contained in:
parent
7fe23c7ac2
commit
728037075f
@ -10,7 +10,7 @@ import entityChangesService from "./entity_changes.js";
|
||||
import optionsService from "./options.js";
|
||||
import BBranch from "../becca/entities/bbranch.js";
|
||||
import becca from "../becca/becca.js";
|
||||
import utils from "../services/utils.js";
|
||||
import { hash as getHash, hashedBlobId, randomString } from "../services/utils.js";
|
||||
import eraseService from "../services/erase.js";
|
||||
import sanitizeAttributeName from "./sanitize_attribute_name.js";
|
||||
import noteTypesService from "../services/note_types.js";
|
||||
@ -454,7 +454,7 @@ class ConsistencyChecks {
|
||||
logError(`Unable to recover note ${noteId} since it's content could not be retrieved (might be protected note).`);
|
||||
return;
|
||||
}
|
||||
const blobId = utils.hashedBlobId(blankContent);
|
||||
const blobId = hashedBlobId(blankContent);
|
||||
const blobAlreadyExists = !!sql.getValue("SELECT 1 FROM blobs WHERE blobId = ?", [blobId]);
|
||||
|
||||
if (!blobAlreadyExists) {
|
||||
@ -466,7 +466,7 @@ class ConsistencyChecks {
|
||||
dateModified: fakeDate
|
||||
});
|
||||
|
||||
const hash = utils.hash(utils.randomString(10));
|
||||
const hash = getHash(randomString(10));
|
||||
|
||||
entityChangesService.putEntityChange({
|
||||
entityName: 'blobs',
|
||||
@ -689,7 +689,7 @@ class ConsistencyChecks {
|
||||
entityChangesService.putEntityChange({
|
||||
entityName,
|
||||
entityId,
|
||||
hash: utils.randomString(10), // doesn't matter, will force sync, but that's OK
|
||||
hash: randomString(10), // doesn't matter, will force sync, but that's OK
|
||||
isErased: false,
|
||||
utcDateChanged: entityRow.utcDateModified || entityRow.utcDateCreated,
|
||||
isSynced: entityName !== 'options' || entityRow.isSynced
|
||||
|
||||
@ -2,12 +2,12 @@
|
||||
|
||||
import optionService from "./options.js";
|
||||
import log from "./log.js";
|
||||
import utils from "./utils.js";
|
||||
import { isElectron as getIsElectron } from "./utils.js";
|
||||
import { KeyboardShortcut } from './keyboard_actions_interface.js';
|
||||
import { t } from "i18next";
|
||||
|
||||
const isMac = process.platform === "darwin";
|
||||
const isElectron = utils.isElectron();
|
||||
const isElectron = getIsElectron();
|
||||
|
||||
function getDefaultKeyboardActions() {
|
||||
if (!t("keyboard_actions.note-navigation")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user