chore(deps): snjs

This commit is contained in:
Mo
2022-02-08 14:25:53 -06:00
parent e07f3732c5
commit 1dd70364e7
6 changed files with 91 additions and 91 deletions

View File

@@ -57,7 +57,6 @@ type State = {
export class Footer extends PureComponent<Props, State> { export class Footer extends PureComponent<Props, State> {
public user?: unknown; public user?: unknown;
private didCheckForOffline = false; private didCheckForOffline = false;
private observerRemovers: Array<() => void> = [];
private completedInitialSync = false; private completedInitialSync = false;
private showingDownloadStatus = false; private showingDownloadStatus = false;
private webEventListenerDestroyer: () => void; 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() { 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();
(this.webEventListenerDestroyer as unknown) = undefined; (this.webEventListenerDestroyer as unknown) = undefined;
super.deinit(); super.deinit();

View File

@@ -1,7 +1,7 @@
import { import {
ComponentArea, ComponentArea,
FeatureDescription, FeatureDescription,
Features, GetFeatures,
NoteType, NoteType,
} from '@standardnotes/features'; } from '@standardnotes/features';
import { ContentType, SNComponent } from '@standardnotes/snjs'; import { ContentType, SNComponent } from '@standardnotes/snjs';
@@ -49,20 +49,24 @@ export const createEditorMenuGroups = (editors: SNComponent[]) => {
others: [], others: [],
}; };
Features.filter( GetFeatures()
(feature) => .filter(
feature.content_type === ContentType.Component && (feature) =>
feature.area === ComponentArea.Editor feature.content_type === ContentType.Component &&
).forEach((editorFeature) => { feature.area === ComponentArea.Editor
if ( )
!editors.find((editor) => editor.identifier === editorFeature.identifier) .forEach((editorFeature) => {
) { if (
editorItems[getEditorGroup(editorFeature)].push({ !editors.find(
name: editorFeature.name as string, (editor) => editor.identifier === editorFeature.identifier
isPremiumFeature: true, )
}); ) {
} editorItems[getEditorGroup(editorFeature)].push({
}); name: editorFeature.name as string,
isPremiumFeature: true,
});
}
});
editors.forEach((editor) => { editors.forEach((editor) => {
const editorItem: EditorMenuItem = { const editorItem: EditorMenuItem = {

View File

@@ -9,7 +9,7 @@ import {
ComponentArea, ComponentArea,
ContentType, ContentType,
FeatureIdentifier, FeatureIdentifier,
Features, GetFeatures,
SNComponent, SNComponent,
SNTheme, SNTheme,
} from '@standardnotes/snjs'; } from '@standardnotes/snjs';
@@ -115,20 +115,22 @@ export const QuickSettingsMenu: FunctionComponent<MenuProps> = observer(
}; };
}) as ThemeItem[]; }) as ThemeItem[];
Features.filter( GetFeatures()
(feature) => .filter(
feature.content_type === ContentType.Theme && !feature.layerable (feature) =>
).forEach((theme) => { feature.content_type === ContentType.Theme && !feature.layerable
if ( )
themes.findIndex((item) => item.identifier === theme.identifier) === .forEach((theme) => {
-1 if (
) { themes.findIndex((item) => item.identifier === theme.identifier) ===
themes.push({ -1
name: theme.name as string, ) {
identifier: theme.identifier, themes.push({
}); name: theme.name as string,
} identifier: theme.identifier,
}); });
}
});
setThemes(themes); setThemes(themes);

View File

@@ -4,7 +4,7 @@ import { sortThemes } from '@/components/QuickSettingsMenu/QuickSettingsMenu';
import { HorizontalSeparator } from '@/components/shared/HorizontalSeparator'; import { HorizontalSeparator } from '@/components/shared/HorizontalSeparator';
import { Switch } from '@/components/Switch'; import { Switch } from '@/components/Switch';
import { WebApplication } from '@/ui_models/application'; import { WebApplication } from '@/ui_models/application';
import { Features } from '@standardnotes/features'; import { GetFeatures } from '@standardnotes/features';
import { import {
ContentType, ContentType,
FeatureIdentifier, FeatureIdentifier,
@@ -73,21 +73,24 @@ export const Appearance: FunctionComponent<Props> = observer(
}; };
}); });
Features.filter( GetFeatures()
(feature) => .filter(
feature.content_type === ContentType.Theme && !feature.layerable (feature) =>
).forEach((theme) => { feature.content_type === ContentType.Theme && !feature.layerable
if ( )
themesAsItems.findIndex((item) => item.value === theme.identifier) === .forEach((theme) => {
-1 if (
) { themesAsItems.findIndex(
themesAsItems.push({ (item) => item.value === theme.identifier
label: theme.name as string, ) === -1
value: theme.identifier, ) {
icon: 'premium-feature', themesAsItems.push({
}); label: theme.name as string,
} value: theme.identifier,
}); icon: 'premium-feature',
});
}
});
themesAsItems.unshift({ themesAsItems.unshift({
label: 'Default', label: 'Default',

View File

@@ -82,9 +82,9 @@
"@reach/dialog": "^0.16.2", "@reach/dialog": "^0.16.2",
"@reach/listbox": "^0.16.2", "@reach/listbox": "^0.16.2",
"@reach/tooltip": "^0.16.2", "@reach/tooltip": "^0.16.2",
"@standardnotes/components": "1.5.0", "@standardnotes/components": "1.7.0",
"@standardnotes/features": "1.27.0", "@standardnotes/features": "1.29.0",
"@standardnotes/snjs": "2.51.2", "@standardnotes/snjs": "2.52.1",
"@standardnotes/settings": "^1.11.3", "@standardnotes/settings": "^1.11.3",
"@standardnotes/sncrypto-web": "1.6.2", "@standardnotes/sncrypto-web": "1.6.2",
"mobx": "^6.3.5", "mobx": "^6.3.5",

View File

@@ -2597,39 +2597,39 @@
dependencies: dependencies:
"@sinonjs/commons" "^1.7.0" "@sinonjs/commons" "^1.7.0"
"@standardnotes/auth@^3.15.3": "@standardnotes/auth@^3.15.4":
version "3.15.3" version "3.15.4"
resolved "https://registry.yarnpkg.com/@standardnotes/auth/-/auth-3.15.3.tgz#bf77332e0ac3d846acc45f25083459e42f4a4374" resolved "https://registry.yarnpkg.com/@standardnotes/auth/-/auth-3.15.4.tgz#acb2e9497724e1ba290664f199f3cc165c0fce3e"
integrity sha512-16wgMl0qmq8w+HUktfQ7ODoprkngSs0vsSF5G9aHM1L+lFMwlGeVOztHH2zwG91pFkl7BaK6LcEimoYiml6VAw== integrity sha512-QhOnM8yPL63RrS+0qQjT4PIlHT3a+Ht17BmTEoNeNw3hc0QSXb3wqkwHoqyMfxWZKcAVjOSPhl+aOO9O2JUC3w==
dependencies: dependencies:
"@standardnotes/common" "^1.8.0" "@standardnotes/common" "^1.9.0"
jsonwebtoken "^8.5.1" jsonwebtoken "^8.5.1"
"@standardnotes/common@^1.8.0": "@standardnotes/common@^1.9.0":
version "1.8.0" version "1.9.0"
resolved "https://registry.yarnpkg.com/@standardnotes/common/-/common-1.8.0.tgz#af72ad85f0d410ae31c0c110137911e2595634de" resolved "https://registry.yarnpkg.com/@standardnotes/common/-/common-1.9.0.tgz#45c0a8da16cb6e3c56ee53e8abde73934c5cf91e"
integrity sha512-R3nfAvhaXp5ufMB0M0fmV9yizE/Of2PGNJKnxtdxwowAq/ZakHu8Rh/v485PXrCaCFREVOZQO8kg0RQM8YngSw== integrity sha512-4c/7f/sFBykmiu/SqYn3OfmMSdJ6dNVsl6yDm4aPB37EAyNPhOfhOeY8kQ12606EZArtUJ8FYo5sKPbLV0PCug==
"@standardnotes/components@1.5.0": "@standardnotes/components@1.7.0":
version "1.5.0" version "1.7.0"
resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.5.0.tgz#29f46734ac8837b74cd15c8ba78358205a56d4bc" resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.0.tgz#192f358ddffe275a9ab3709ef31b7b8bf3b58ec1"
integrity sha512-Xz8JsGxDuBClIu+US0UM1tqCbuSFJ5xHCmRWXBPEXQpkCFCENQ6avheIXp3oJKR2iYxwwgZuHAfnZClyIEMxSg== integrity sha512-4J9iuos5WZvl+/Z7dNvhgEY9SRTdSm6JiUHbo6rRtryjvlJB4EkvnARxexJvw17MBmTWjvHY8c3aLm/w1dzv0A==
"@standardnotes/domain-events@^2.21.2": "@standardnotes/domain-events@^2.21.4":
version "2.21.2" version "2.21.4"
resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.21.2.tgz#e28a0c1a65b09cf9712ce1efab279af33f68cae6" resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.21.4.tgz#d6a78e5e9ff700208e7ed407edf492bd289137a4"
integrity sha512-wZuTpgFFhV6CxwWHxU1Y0rtlR7SLZAccnT+GIbWk77WlkbdyJydpMIgcr5I94+9wFZuzMGA3SU+HyYbAE08ozg== integrity sha512-1odojLlirCNB8h8O3PKPgaSmbjRtkg1MYTovg4uvcDPRbPecw+2F70dA9gMS33224JlorBhjBi4qcn+ehraP8w==
dependencies: dependencies:
"@standardnotes/auth" "^3.15.3" "@standardnotes/auth" "^3.15.4"
"@standardnotes/features" "^1.27.0" "@standardnotes/features" "^1.29.0"
"@standardnotes/features@1.27.0", "@standardnotes/features@^1.27.0": "@standardnotes/features@1.29.0", "@standardnotes/features@^1.29.0":
version "1.27.0" version "1.29.0"
resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.27.0.tgz#eac735cafaa90f2d174fea65757034bfd841b056" resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.29.0.tgz#f7c4c2cb9fdf5c7cc08bae177a40ec09eb73be95"
integrity sha512-RJXtBw5PCGNXuvUZDn1UJHQuF9+V0kZcGI4leWZJNRFDCQeuESOopVXvVIPCske/vUTHy8BGJttc2m9OatTlPw== integrity sha512-OTxAtj1nA5yj6yEh3m2AsMnpd+JU6xQ8MBd6Vn3nxx3WKux5d+hTJkkskkbERc+0MZhIFLCiBUrkSolJc8Yo+g==
dependencies: dependencies:
"@standardnotes/auth" "^3.15.3" "@standardnotes/auth" "^3.15.4"
"@standardnotes/common" "^1.8.0" "@standardnotes/common" "^1.9.0"
"@standardnotes/settings@^1.11.3": "@standardnotes/settings@^1.11.3":
version "1.11.3" version "1.11.3"
@@ -2650,15 +2650,15 @@
buffer "^6.0.3" buffer "^6.0.3"
libsodium-wrappers "^0.7.9" libsodium-wrappers "^0.7.9"
"@standardnotes/snjs@2.51.2": "@standardnotes/snjs@2.52.1":
version "2.51.2" version "2.52.1"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.51.2.tgz#9804e27071a8d139bf72095d94231a1e29a61593" resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.52.1.tgz#00e2e1f7eaeef2c95b6830470031496e48ff4b83"
integrity sha512-sxS/QnDnOqUx88Mv8BVR2sd4UAvrBQj0Daa9rH5+INryY5qkLdlTod6MqDfxy+MRkyioVpDAE+yYuBJbcPyqQw== integrity sha512-U35dangXmhl1uEnPcDmWrRlqHyT/N5KIE5izT8w0xkhrWpc5a62j+m0u2uJNYU7C00d6ERqVWXeHCDsdSXTx8A==
dependencies: dependencies:
"@standardnotes/auth" "^3.15.3" "@standardnotes/auth" "^3.15.4"
"@standardnotes/common" "^1.8.0" "@standardnotes/common" "^1.9.0"
"@standardnotes/domain-events" "^2.21.2" "@standardnotes/domain-events" "^2.21.4"
"@standardnotes/features" "^1.27.0" "@standardnotes/features" "^1.29.0"
"@standardnotes/settings" "^1.11.3" "@standardnotes/settings" "^1.11.3"
"@standardnotes/sncrypto-common" "^1.6.0" "@standardnotes/sncrypto-common" "^1.6.0"