Compiled build
This commit is contained in:
@@ -236,13 +236,6 @@ class TagsPanelCtrl extends PureCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async selectTag(tag: SNTag) {
|
async selectTag(tag: SNTag) {
|
||||||
if (tag.isSmartTag()) {
|
|
||||||
Object.defineProperty(tag, 'notes', {
|
|
||||||
get: () => {
|
|
||||||
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (tag.conflictOf) {
|
if (tag.conflictOf) {
|
||||||
this.application.changeAndSaveItem(tag.uuid, (mutator) => {
|
this.application.changeAndSaveItem(tag.uuid, (mutator) => {
|
||||||
mutator.conflictOf = undefined;
|
mutator.conflictOf = undefined;
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import { SNComponent, PurePayload } from 'snjs';
|
import { SNComponent, PurePayload, ComponentMutator, AppDataField } from 'snjs';
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
import { WebApplication } from '@/application';
|
import { WebApplication } from '@/application';
|
||||||
// An interface used by the Desktop app to interact with SN
|
// An interface used by the Desktop app to interact with SN
|
||||||
import { isDesktopApplication } from '@/utils';
|
import { isDesktopApplication } from '@/utils';
|
||||||
import { EncryptionIntent, ApplicationService, ApplicationEvent, removeFromArray } from 'snjs';
|
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 UpdateObserverCallback = (component: SNComponent) => void
|
||||||
type ComponentActivationCallback = (payload: PurePayload) => void
|
type ComponentActivationCallback = (payload: PurePayload) => void
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ import {
|
|||||||
ContentType,
|
ContentType,
|
||||||
SNComponent,
|
SNComponent,
|
||||||
ApplicationService,
|
ApplicationService,
|
||||||
ComponentAction
|
ComponentAction,
|
||||||
|
FillItemContent,
|
||||||
|
ComponentMutator,
|
||||||
|
Copy
|
||||||
} from 'snjs';
|
} from 'snjs';
|
||||||
import { PayloadContent } from '@/../../../../snjs/dist/@types/protocol/payloads/generator';
|
import { PayloadContent } from '@/../../../../snjs/dist/@types/protocol/payloads/generator';
|
||||||
import { FillItemContent } from '@/../../../../snjs/dist/@types/models/generator';
|
import { ComponentPermission } from '@/../../../../snjs/dist/@types/models/app/component';
|
||||||
import { ComponentMutator } from '@/../../../../snjs/dist/@types/models';
|
|
||||||
|
|
||||||
/** A class for handling installation of system extensions */
|
/** A class for handling installation of system extensions */
|
||||||
export class NativeExtManager extends ApplicationService {
|
export class NativeExtManager extends ApplicationService {
|
||||||
@@ -77,7 +79,7 @@ export class NativeExtManager extends ApplicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Handle addition of SN|ExtensionRepo permission
|
// Handle addition of SN|ExtensionRepo permission
|
||||||
const permissions = extensionsManager!.permissions.slice();
|
const permissions = Copy(extensionsManager!.permissions) as ComponentPermission[];
|
||||||
const permission = permissions.find((p) => {
|
const permission = permissions.find((p) => {
|
||||||
return p.name === ComponentAction.StreamItems
|
return p.name === ComponentAction.StreamItems
|
||||||
});
|
});
|
||||||
@@ -155,7 +157,7 @@ export class NativeExtManager extends ApplicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Handle addition of SN|ExtensionRepo permission
|
// Handle addition of SN|ExtensionRepo permission
|
||||||
const permissions = batchManager!.permissions.slice();
|
const permissions = Copy(batchManager!.permissions) as ComponentPermission[];
|
||||||
const permission = permissions.find((p) => {
|
const permission = permissions.find((p) => {
|
||||||
return p.name === ComponentAction.StreamItems
|
return p.name === ComponentAction.StreamItems
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import {
|
|||||||
ApplicationService,
|
ApplicationService,
|
||||||
SNUserPrefs,
|
SNUserPrefs,
|
||||||
WebPrefKey,
|
WebPrefKey,
|
||||||
UserPrefsMutator
|
UserPrefsMutator,
|
||||||
|
FillItemContent
|
||||||
} from 'snjs';
|
} from 'snjs';
|
||||||
import { FillItemContent } from '@/../../../../snjs/dist/@types/models/generator';
|
|
||||||
|
|
||||||
export class PreferencesManager extends ApplicationService {
|
export class PreferencesManager extends ApplicationService {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { WebApplication } from './../application';
|
import { WebApplication } from './../application';
|
||||||
import { isDesktopApplication } from '@/utils';
|
import { isDesktopApplication } from '@/utils';
|
||||||
import pull from 'lodash/pull';
|
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 {
|
export enum AppStateEvent {
|
||||||
TagChanged = 1,
|
TagChanged = 1,
|
||||||
@@ -119,7 +119,6 @@ export class AppState {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
/* Tab visibility listener, web only */
|
/* Tab visibility listener, web only */
|
||||||
this.onVisibilityChange = this.onVisibilityChange.bind(this);
|
|
||||||
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,9 +196,13 @@ export class AppState {
|
|||||||
|
|
||||||
/** Returns the notes this tag references */
|
/** Returns the notes this tag references */
|
||||||
getTagNotes(tag: SNTag) {
|
getTagNotes(tag: SNTag) {
|
||||||
return this.application.referencesForItem(tag).filter((ref) => {
|
if(tag.isSmartTag()) {
|
||||||
return ref.content_type === tag.content_type;
|
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
|
||||||
}) as SNNote[]
|
} else {
|
||||||
|
return this.application.referencesForItem(tag).filter((ref) => {
|
||||||
|
return ref.content_type === tag.content_type;
|
||||||
|
}) as SNNote[]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getSelectedTag() {
|
getSelectedTag() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
target='blank'
|
target='blank'
|
||||||
)
|
)
|
||||||
menu-row(label="'Download Actions'")
|
menu-row(label="'Download Actions'")
|
||||||
div(ng-repeat='extension in self.state.extensions')
|
div(ng-repeat='extension in self.state.extensions track by extension.uuid')
|
||||||
.sk-menu-panel-header(
|
.sk-menu-panel-header(
|
||||||
ng-click='extension.hide = !extension.hide; $event.stopPropagation();'
|
ng-click='extension.hide = !extension.hide; $event.stopPropagation();'
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
label="'Plain Editor'"
|
label="'Plain Editor'"
|
||||||
)
|
)
|
||||||
menu-row(
|
menu-row(
|
||||||
ng-repeat='editor in self.state.editors'
|
ng-repeat='editor in self.state.editors track by editor.uuid'
|
||||||
action='self.selectComponent(editor)',
|
action='self.selectComponent(editor)',
|
||||||
button-action='self.toggleDefaultForEditor(editor)',
|
button-action='self.toggleDefaultForEditor(editor)',
|
||||||
button-class="self.state.defaultEditor == editor ? 'warning' : 'info'",
|
button-class="self.state.defaultEditor == editor ? 'warning' : 'info'",
|
||||||
|
|||||||
@@ -240,7 +240,7 @@
|
|||||||
.left
|
.left
|
||||||
.sk-app-bar-item(
|
.sk-app-bar-item(
|
||||||
ng-click='self.toggleStackComponentForCurrentItem(component)',
|
ng-click='self.toggleStackComponentForCurrentItem(component)',
|
||||||
ng-repeat='component in self.state.componentStack'
|
ng-repeat='component in self.state.componentStack track by component.uuid'
|
||||||
)
|
)
|
||||||
.sk-app-bar-item-column
|
.sk-app-bar-item-column
|
||||||
.sk-circle.small(
|
.sk-circle.small(
|
||||||
@@ -253,7 +253,7 @@
|
|||||||
component='component',
|
component='component',
|
||||||
manual-dealloc='true',
|
manual-dealloc='true',
|
||||||
ng-if='component.active',
|
ng-if='component.active',
|
||||||
ng-repeat='component in self.state.componentStack',
|
ng-repeat='component in self.state.componentStack track by component.uuid',
|
||||||
ng-show='!component.hidden',
|
ng-show='!component.hidden',
|
||||||
application='self.application'
|
application='self.application'
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
.tag(
|
.tag(
|
||||||
ng-class="{'selected' : self.state.selectedTag == tag, 'faded' : !tag.content.isAllTag}",
|
ng-class="{'selected' : self.state.selectedTag == tag, 'faded' : !tag.content.isAllTag}",
|
||||||
ng-click='self.selectTag(tag)',
|
ng-click='self.selectTag(tag)',
|
||||||
ng-repeat='tag in self.state.smartTags'
|
ng-repeat='tag in self.state.smartTags track by tag.uuid'
|
||||||
)
|
)
|
||||||
.tag-info
|
.tag-info
|
||||||
input.title(
|
input.title(
|
||||||
|
|||||||
88076
dist/javascripts/app.js
vendored
88076
dist/javascripts/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/javascripts/app.js.map
vendored
2
dist/javascripts/app.js.map
vendored
File diff suppressed because one or more lines are too long
2642
dist/stylesheets/app.css
vendored
2642
dist/stylesheets/app.css
vendored
File diff suppressed because one or more lines are too long
2
dist/stylesheets/app.css.map
vendored
2
dist/stylesheets/app.css.map
vendored
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@ const webpack = require('webpack');
|
|||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const CopyPlugin = require('copy-webpack-plugin');
|
const CopyPlugin = require('copy-webpack-plugin');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: './app/assets/javascripts/index.js',
|
entry: './app/assets/javascripts/index.ts',
|
||||||
output: {
|
output: {
|
||||||
filename: './javascripts/app.js'
|
filename: './javascripts/app.js'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user