Incipient TypeScript
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable camelcase */
|
||||
// An interface used by the Desktop app to interact with SN
|
||||
import { isDesktopApplication } from '@/utils';
|
||||
import { EncryptionIntents, ApplicationService, ApplicationEvents, removeFromArray } from 'snjs';
|
||||
import { EncryptionIntents, ApplicationService, ApplicationEvent, removeFromArray } from 'snjs';
|
||||
|
||||
const COMPONENT_DATA_KEY_INSTALL_ERROR = 'installError';
|
||||
const COMPONENT_CONTENT_KEY_PACKAGE_INFO = 'package_info';
|
||||
@@ -30,12 +30,12 @@ export class DesktopManager extends ApplicationService {
|
||||
/** @override */
|
||||
onAppEvent(eventName) {
|
||||
super.onAppEvent(eventName);
|
||||
if (eventName === ApplicationEvents.LocalDataLoaded) {
|
||||
if (eventName === ApplicationEvent.LocalDataLoaded) {
|
||||
this.dataLoaded = true;
|
||||
if (this.dataLoadHandler) {
|
||||
this.dataLoadHandler();
|
||||
}
|
||||
} else if (eventName === ApplicationEvents.MajorDataChange) {
|
||||
} else if (eventName === ApplicationEvent.MajorDataChange) {
|
||||
if (this.majorDataChangeHandler) {
|
||||
this.majorDataChangeHandler();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { isDesktopApplication } from '@/utils';
|
||||
import pull from 'lodash/pull';
|
||||
import { ProtectedActions, ApplicationEvents } from 'snjs';
|
||||
import { ProtectedActions, ApplicationEvent } from 'snjs';
|
||||
|
||||
export const AppStateEvents = {
|
||||
TagChanged: 1,
|
||||
@@ -52,9 +52,9 @@ export class AppState {
|
||||
|
||||
addAppEventObserver() {
|
||||
this.unsubApp = this.application.addEventObserver(async (eventName) => {
|
||||
if (eventName === ApplicationEvents.Started) {
|
||||
if (eventName === ApplicationEvent.Started) {
|
||||
this.locked = true;
|
||||
} else if (eventName === ApplicationEvents.Launched) {
|
||||
} else if (eventName === ApplicationEvent.Launched) {
|
||||
this.locked = false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
import {
|
||||
ApplicationEvents,
|
||||
ApplicationEvent,
|
||||
StorageValueModes,
|
||||
EncryptionIntents,
|
||||
ApplicationService,
|
||||
|
||||
Reference in New Issue
Block a user