mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 15:09:01 +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 optionsService from "./options.js";
|
||||||
import BBranch from "../becca/entities/bbranch.js";
|
import BBranch from "../becca/entities/bbranch.js";
|
||||||
import becca from "../becca/becca.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 eraseService from "../services/erase.js";
|
||||||
import sanitizeAttributeName from "./sanitize_attribute_name.js";
|
import sanitizeAttributeName from "./sanitize_attribute_name.js";
|
||||||
import noteTypesService from "../services/note_types.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).`);
|
logError(`Unable to recover note ${noteId} since it's content could not be retrieved (might be protected note).`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const blobId = utils.hashedBlobId(blankContent);
|
const blobId = hashedBlobId(blankContent);
|
||||||
const blobAlreadyExists = !!sql.getValue("SELECT 1 FROM blobs WHERE blobId = ?", [blobId]);
|
const blobAlreadyExists = !!sql.getValue("SELECT 1 FROM blobs WHERE blobId = ?", [blobId]);
|
||||||
|
|
||||||
if (!blobAlreadyExists) {
|
if (!blobAlreadyExists) {
|
||||||
@ -466,7 +466,7 @@ class ConsistencyChecks {
|
|||||||
dateModified: fakeDate
|
dateModified: fakeDate
|
||||||
});
|
});
|
||||||
|
|
||||||
const hash = utils.hash(utils.randomString(10));
|
const hash = getHash(randomString(10));
|
||||||
|
|
||||||
entityChangesService.putEntityChange({
|
entityChangesService.putEntityChange({
|
||||||
entityName: 'blobs',
|
entityName: 'blobs',
|
||||||
@ -689,7 +689,7 @@ class ConsistencyChecks {
|
|||||||
entityChangesService.putEntityChange({
|
entityChangesService.putEntityChange({
|
||||||
entityName,
|
entityName,
|
||||||
entityId,
|
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,
|
isErased: false,
|
||||||
utcDateChanged: entityRow.utcDateModified || entityRow.utcDateCreated,
|
utcDateChanged: entityRow.utcDateModified || entityRow.utcDateCreated,
|
||||||
isSynced: entityName !== 'options' || entityRow.isSynced
|
isSynced: entityName !== 'options' || entityRow.isSynced
|
||||||
|
|||||||
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
import optionService from "./options.js";
|
import optionService from "./options.js";
|
||||||
import log from "./log.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 { KeyboardShortcut } from './keyboard_actions_interface.js';
|
||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
|
|
||||||
const isMac = process.platform === "darwin";
|
const isMac = process.platform === "darwin";
|
||||||
const isElectron = utils.isElectron();
|
const isElectron = getIsElectron();
|
||||||
|
|
||||||
function getDefaultKeyboardActions() {
|
function getDefaultKeyboardActions() {
|
||||||
if (!t("keyboard_actions.note-navigation")) {
|
if (!t("keyboard_actions.note-navigation")) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user