Update with latest SNJS changes
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/* eslint-disable prefer-promise-reject-errors */
|
||||
import { SNAlertManager } from 'snjs';
|
||||
import { SNAlertService } from 'snjs';
|
||||
import { SKAlert } from 'sn-stylekit';
|
||||
|
||||
export class AlertManager extends SNAlertManager {
|
||||
export class AlertManager extends SNAlertService {
|
||||
async alert({
|
||||
title,
|
||||
text,
|
||||
|
||||
@@ -36,7 +36,7 @@ export class ArchiveManager {
|
||||
});
|
||||
};
|
||||
|
||||
if (await this.application.privilegesManager.actionRequiresPrivilege(ProtectedActions.ManageBackups)) {
|
||||
if (await this.application.privilegesService.actionRequiresPrivilege(ProtectedActions.ManageBackups)) {
|
||||
this.godService.presentPrivilegesModal(ProtectedActions.ManageBackups, () => {
|
||||
run();
|
||||
});
|
||||
@@ -58,7 +58,7 @@ export class ArchiveManager {
|
||||
|
||||
/** @private */
|
||||
async itemsData(items, intent) {
|
||||
const data = await this.application.protocolService.createBackupFile({
|
||||
const data = await this.application.createBackupFile({
|
||||
subItems: items,
|
||||
intent: intent
|
||||
});
|
||||
|
||||
@@ -193,7 +193,7 @@ export class DesktopManager {
|
||||
}
|
||||
|
||||
async desktop_requestBackupFile(callback) {
|
||||
const data = await this.application.protocolService.createBackupFile({
|
||||
const data = await this.application.createBackupFile({
|
||||
returnIfEmpty: true
|
||||
});
|
||||
callback(data);
|
||||
|
||||
@@ -16,7 +16,7 @@ export class GodService {
|
||||
if (this.application.noAccount()) {
|
||||
return false;
|
||||
}
|
||||
const updateAvailable = await this.application.protocolService.upgradeAvailable();
|
||||
const updateAvailable = await this.application.protocolUpgradeAvailable();
|
||||
if (updateAvailable !== this.securityUpdateAvailable) {
|
||||
this.securityUpdateAvailable = updateAvailable;
|
||||
this.$rootScope.$broadcast("security-update-status-changed");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { isDesktopApplication, dictToArray } from '@/utils';
|
||||
import {
|
||||
ApplicationEvents,
|
||||
SFPredicate,
|
||||
SNPredicate,
|
||||
ContentTypes,
|
||||
CreateMaxPayloadFromAnyObject
|
||||
} from 'snjs';
|
||||
@@ -23,17 +23,17 @@ export class NativeExtManager {
|
||||
|
||||
get extManagerPred() {
|
||||
const extManagerId = 'org.standardnotes.extensions-manager';
|
||||
return SFPredicate.CompoundPredicate([
|
||||
new SFPredicate('content_type', '=', ContentTypes.Component),
|
||||
new SFPredicate('package_info.identifier', '=', extManagerId)
|
||||
return SNPredicate.CompoundPredicate([
|
||||
new SNPredicate('content_type', '=', ContentTypes.Component),
|
||||
new SNPredicate('package_info.identifier', '=', extManagerId)
|
||||
]);
|
||||
}
|
||||
|
||||
get batchManagerPred() {
|
||||
const batchMgrId = 'org.standardnotes.batch-manager';
|
||||
return SFPredicate.CompoundPredicate([
|
||||
new SFPredicate('content_type', '=', ContentTypes.Component),
|
||||
new SFPredicate('package_info.identifier', '=', batchMgrId)
|
||||
return SNPredicate.CompoundPredicate([
|
||||
new SNPredicate('content_type', '=', ContentTypes.Component),
|
||||
new SNPredicate('package_info.identifier', '=', batchMgrId)
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ApplicationEvents, SFPredicate, ContentTypes, CreateMaxPayloadFromAnyObject } from 'snjs';
|
||||
import { ApplicationEvents, SNPredicate, ContentTypes, CreateMaxPayloadFromAnyObject } from 'snjs';
|
||||
|
||||
export const PrefKeys = {
|
||||
TagsPanelWidth: 'tagsPanelWidth',
|
||||
@@ -42,7 +42,7 @@ export class PreferencesManager {
|
||||
|
||||
async loadSingleton() {
|
||||
const contentType = ContentTypes.UserPrefs;
|
||||
const predicate = new SFPredicate('content_type', '=', contentType);
|
||||
const predicate = new SNPredicate('content_type', '=', contentType);
|
||||
this.userPreferences = await this.application.singletonManager.findOrCreateSingleton({
|
||||
predicate: predicate,
|
||||
createPayload: CreateMaxPayloadFromAnyObject({
|
||||
|
||||
Reference in New Issue
Block a user