Compiled build
This commit is contained in:
@@ -236,13 +236,6 @@ class TagsPanelCtrl extends PureCtrl {
|
||||
}
|
||||
|
||||
async selectTag(tag: SNTag) {
|
||||
if (tag.isSmartTag()) {
|
||||
Object.defineProperty(tag, 'notes', {
|
||||
get: () => {
|
||||
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (tag.conflictOf) {
|
||||
this.application.changeAndSaveItem(tag.uuid, (mutator) => {
|
||||
mutator.conflictOf = undefined;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import { SNComponent, PurePayload } from 'snjs';
|
||||
import { SNComponent, PurePayload, ComponentMutator, AppDataField } from 'snjs';
|
||||
/* eslint-disable camelcase */
|
||||
import { WebApplication } from '@/application';
|
||||
// An interface used by the Desktop app to interact with SN
|
||||
import { isDesktopApplication } from '@/utils';
|
||||
import { EncryptionIntent, ApplicationService, ApplicationEvent, removeFromArray } from 'snjs';
|
||||
import { ComponentMutator } from '@/../../../../snjs/dist/@types/models';
|
||||
import { AppDataField } from '@/../../../../snjs/dist/@types/models/core/item';
|
||||
|
||||
type UpdateObserverCallback = (component: SNComponent) => void
|
||||
type ComponentActivationCallback = (payload: PurePayload) => void
|
||||
|
||||
@@ -4,11 +4,13 @@ import {
|
||||
ContentType,
|
||||
SNComponent,
|
||||
ApplicationService,
|
||||
ComponentAction
|
||||
ComponentAction,
|
||||
FillItemContent,
|
||||
ComponentMutator,
|
||||
Copy
|
||||
} from 'snjs';
|
||||
import { PayloadContent } from '@/../../../../snjs/dist/@types/protocol/payloads/generator';
|
||||
import { FillItemContent } from '@/../../../../snjs/dist/@types/models/generator';
|
||||
import { ComponentMutator } from '@/../../../../snjs/dist/@types/models';
|
||||
import { ComponentPermission } from '@/../../../../snjs/dist/@types/models/app/component';
|
||||
|
||||
/** A class for handling installation of system extensions */
|
||||
export class NativeExtManager extends ApplicationService {
|
||||
@@ -77,7 +79,7 @@ export class NativeExtManager extends ApplicationService {
|
||||
}
|
||||
}
|
||||
// Handle addition of SN|ExtensionRepo permission
|
||||
const permissions = extensionsManager!.permissions.slice();
|
||||
const permissions = Copy(extensionsManager!.permissions) as ComponentPermission[];
|
||||
const permission = permissions.find((p) => {
|
||||
return p.name === ComponentAction.StreamItems
|
||||
});
|
||||
@@ -155,7 +157,7 @@ export class NativeExtManager extends ApplicationService {
|
||||
}
|
||||
}
|
||||
// Handle addition of SN|ExtensionRepo permission
|
||||
const permissions = batchManager!.permissions.slice();
|
||||
const permissions = Copy(batchManager!.permissions) as ComponentPermission[];
|
||||
const permission = permissions.find((p) => {
|
||||
return p.name === ComponentAction.StreamItems
|
||||
});
|
||||
|
||||
@@ -5,9 +5,9 @@ import {
|
||||
ApplicationService,
|
||||
SNUserPrefs,
|
||||
WebPrefKey,
|
||||
UserPrefsMutator
|
||||
UserPrefsMutator,
|
||||
FillItemContent
|
||||
} from 'snjs';
|
||||
import { FillItemContent } from '@/../../../../snjs/dist/@types/models/generator';
|
||||
|
||||
export class PreferencesManager extends ApplicationService {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { WebApplication } from './../application';
|
||||
import { isDesktopApplication } from '@/utils';
|
||||
import pull from 'lodash/pull';
|
||||
import { ProtectedAction, ApplicationEvent, SNTag, SNNote, SNUserPrefs, ContentType } from 'snjs';
|
||||
import { ProtectedAction, ApplicationEvent, SNTag, SNNote, SNUserPrefs, ContentType, SNSmartTag } from 'snjs';
|
||||
|
||||
export enum AppStateEvent {
|
||||
TagChanged = 1,
|
||||
@@ -119,7 +119,6 @@ export class AppState {
|
||||
});
|
||||
} else {
|
||||
/* Tab visibility listener, web only */
|
||||
this.onVisibilityChange = this.onVisibilityChange.bind(this);
|
||||
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
||||
}
|
||||
}
|
||||
@@ -197,9 +196,13 @@ export class AppState {
|
||||
|
||||
/** Returns the notes this tag references */
|
||||
getTagNotes(tag: SNTag) {
|
||||
return this.application.referencesForItem(tag).filter((ref) => {
|
||||
return ref.content_type === tag.content_type;
|
||||
}) as SNNote[]
|
||||
if(tag.isSmartTag()) {
|
||||
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
|
||||
} else {
|
||||
return this.application.referencesForItem(tag).filter((ref) => {
|
||||
return ref.content_type === tag.content_type;
|
||||
}) as SNNote[]
|
||||
}
|
||||
}
|
||||
|
||||
getSelectedTag() {
|
||||
|
||||
Reference in New Issue
Block a user