chore(deps): snjs
This commit is contained in:
@@ -57,7 +57,6 @@ type State = {
|
||||
export class Footer extends PureComponent<Props, State> {
|
||||
public user?: unknown;
|
||||
private didCheckForOffline = false;
|
||||
private observerRemovers: Array<() => void> = [];
|
||||
private completedInitialSync = false;
|
||||
private showingDownloadStatus = false;
|
||||
private webEventListenerDestroyer: () => void;
|
||||
@@ -86,17 +85,9 @@ export class Footer extends PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
this.syncResolutionClickHandler =
|
||||
this.syncResolutionClickHandler.bind(this);
|
||||
this.closeAccountMenu = this.closeAccountMenu.bind(this);
|
||||
}
|
||||
|
||||
deinit() {
|
||||
for (const remove of this.observerRemovers) remove();
|
||||
this.observerRemovers.length = 0;
|
||||
(this.closeAccountMenu as unknown) = undefined;
|
||||
(this.syncResolutionClickHandler as unknown) = undefined;
|
||||
this.webEventListenerDestroyer();
|
||||
(this.webEventListenerDestroyer as unknown) = undefined;
|
||||
super.deinit();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
ComponentArea,
|
||||
FeatureDescription,
|
||||
Features,
|
||||
GetFeatures,
|
||||
NoteType,
|
||||
} from '@standardnotes/features';
|
||||
import { ContentType, SNComponent } from '@standardnotes/snjs';
|
||||
@@ -49,20 +49,24 @@ export const createEditorMenuGroups = (editors: SNComponent[]) => {
|
||||
others: [],
|
||||
};
|
||||
|
||||
Features.filter(
|
||||
(feature) =>
|
||||
feature.content_type === ContentType.Component &&
|
||||
feature.area === ComponentArea.Editor
|
||||
).forEach((editorFeature) => {
|
||||
if (
|
||||
!editors.find((editor) => editor.identifier === editorFeature.identifier)
|
||||
) {
|
||||
editorItems[getEditorGroup(editorFeature)].push({
|
||||
name: editorFeature.name as string,
|
||||
isPremiumFeature: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
GetFeatures()
|
||||
.filter(
|
||||
(feature) =>
|
||||
feature.content_type === ContentType.Component &&
|
||||
feature.area === ComponentArea.Editor
|
||||
)
|
||||
.forEach((editorFeature) => {
|
||||
if (
|
||||
!editors.find(
|
||||
(editor) => editor.identifier === editorFeature.identifier
|
||||
)
|
||||
) {
|
||||
editorItems[getEditorGroup(editorFeature)].push({
|
||||
name: editorFeature.name as string,
|
||||
isPremiumFeature: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
editors.forEach((editor) => {
|
||||
const editorItem: EditorMenuItem = {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
ComponentArea,
|
||||
ContentType,
|
||||
FeatureIdentifier,
|
||||
Features,
|
||||
GetFeatures,
|
||||
SNComponent,
|
||||
SNTheme,
|
||||
} from '@standardnotes/snjs';
|
||||
@@ -115,20 +115,22 @@ export const QuickSettingsMenu: FunctionComponent<MenuProps> = observer(
|
||||
};
|
||||
}) as ThemeItem[];
|
||||
|
||||
Features.filter(
|
||||
(feature) =>
|
||||
feature.content_type === ContentType.Theme && !feature.layerable
|
||||
).forEach((theme) => {
|
||||
if (
|
||||
themes.findIndex((item) => item.identifier === theme.identifier) ===
|
||||
-1
|
||||
) {
|
||||
themes.push({
|
||||
name: theme.name as string,
|
||||
identifier: theme.identifier,
|
||||
});
|
||||
}
|
||||
});
|
||||
GetFeatures()
|
||||
.filter(
|
||||
(feature) =>
|
||||
feature.content_type === ContentType.Theme && !feature.layerable
|
||||
)
|
||||
.forEach((theme) => {
|
||||
if (
|
||||
themes.findIndex((item) => item.identifier === theme.identifier) ===
|
||||
-1
|
||||
) {
|
||||
themes.push({
|
||||
name: theme.name as string,
|
||||
identifier: theme.identifier,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
setThemes(themes);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { sortThemes } from '@/components/QuickSettingsMenu/QuickSettingsMenu';
|
||||
import { HorizontalSeparator } from '@/components/shared/HorizontalSeparator';
|
||||
import { Switch } from '@/components/Switch';
|
||||
import { WebApplication } from '@/ui_models/application';
|
||||
import { Features } from '@standardnotes/features';
|
||||
import { GetFeatures } from '@standardnotes/features';
|
||||
import {
|
||||
ContentType,
|
||||
FeatureIdentifier,
|
||||
@@ -73,21 +73,24 @@ export const Appearance: FunctionComponent<Props> = observer(
|
||||
};
|
||||
});
|
||||
|
||||
Features.filter(
|
||||
(feature) =>
|
||||
feature.content_type === ContentType.Theme && !feature.layerable
|
||||
).forEach((theme) => {
|
||||
if (
|
||||
themesAsItems.findIndex((item) => item.value === theme.identifier) ===
|
||||
-1
|
||||
) {
|
||||
themesAsItems.push({
|
||||
label: theme.name as string,
|
||||
value: theme.identifier,
|
||||
icon: 'premium-feature',
|
||||
});
|
||||
}
|
||||
});
|
||||
GetFeatures()
|
||||
.filter(
|
||||
(feature) =>
|
||||
feature.content_type === ContentType.Theme && !feature.layerable
|
||||
)
|
||||
.forEach((theme) => {
|
||||
if (
|
||||
themesAsItems.findIndex(
|
||||
(item) => item.value === theme.identifier
|
||||
) === -1
|
||||
) {
|
||||
themesAsItems.push({
|
||||
label: theme.name as string,
|
||||
value: theme.identifier,
|
||||
icon: 'premium-feature',
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
themesAsItems.unshift({
|
||||
label: 'Default',
|
||||
|
||||
Reference in New Issue
Block a user