refactor: new snjs support (#967)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { displayStringForContentType, SNComponent } from '@standardnotes/snjs';
|
||||
import { DisplayStringForContentType, SNComponent } from '@standardnotes/snjs';
|
||||
import { Button } from '@/components/Button';
|
||||
import { FunctionComponent } from 'preact';
|
||||
import { Title, Text, Subtitle, PreferencesSegment } from '../../components';
|
||||
@@ -30,7 +30,7 @@ export const ConfirmCustomExtension: FunctionComponent<{
|
||||
},
|
||||
{
|
||||
label: 'Extension Type',
|
||||
value: displayStringForContentType(component.content_type),
|
||||
value: DisplayStringForContentType(component.content_type),
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export const ExtensionItem: FunctionComponent<ExtensionItemProps> = ({
|
||||
const newOfflineOnly = !offlineOnly;
|
||||
setOfflineOnly(newOfflineOnly);
|
||||
application.mutator
|
||||
.changeAndSaveItem(extension.uuid, (m: any) => {
|
||||
.changeAndSaveItem(extension, (m: any) => {
|
||||
if (m.content == undefined) m.content = {};
|
||||
m.content.offlineOnly = newOfflineOnly;
|
||||
})
|
||||
@@ -63,7 +63,7 @@ export const ExtensionItem: FunctionComponent<ExtensionItemProps> = ({
|
||||
const changeExtensionName = (newName: string) => {
|
||||
setExtensionName(newName);
|
||||
application.mutator
|
||||
.changeAndSaveItem(extension.uuid, (m: any) => {
|
||||
.changeAndSaveItem(extension, (m: any) => {
|
||||
if (m.content == undefined) m.content = {};
|
||||
m.content.name = newName;
|
||||
})
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { WebApplication } from '@/ui_models/application';
|
||||
import { FeatureDescription } from '@standardnotes/features';
|
||||
import { SNComponent, ClientDisplayableError } from '@standardnotes/snjs';
|
||||
import {
|
||||
SNComponent,
|
||||
ClientDisplayableError,
|
||||
FeatureDescription,
|
||||
} from '@standardnotes/snjs';
|
||||
import { makeAutoObservable, observable } from 'mobx';
|
||||
|
||||
export class ExtensionsLatestVersions {
|
||||
|
||||
Reference in New Issue
Block a user