refactor: new snjs support (#967)
This commit is contained in:
@@ -104,7 +104,7 @@ const ListedActionsMenu: FunctionComponent<ListedActionsMenuProps> = ({
|
||||
const updatedGroup: ListedMenuGroup = {
|
||||
name: updatedAccountInfo.display_name,
|
||||
account: group.account,
|
||||
actions: updatedAccountInfo.actions,
|
||||
actions: updatedAccountInfo.actions as Action[],
|
||||
};
|
||||
|
||||
const updatedGroups = menuGroups.map((group) => {
|
||||
@@ -145,7 +145,7 @@ const ListedActionsMenu: FunctionComponent<ListedActionsMenuProps> = ({
|
||||
menuGroups.push({
|
||||
name: accountInfo.display_name,
|
||||
account,
|
||||
actions: accountInfo.actions,
|
||||
actions: accountInfo.actions as Action[],
|
||||
});
|
||||
} else {
|
||||
menuGroups.push({
|
||||
|
||||
@@ -219,7 +219,6 @@ export const NotesOptions = observer(
|
||||
const notTrashed = notes.some((note) => !note.trashed);
|
||||
const pinned = notes.some((note) => note.pinned);
|
||||
const unpinned = notes.some((note) => !note.pinned);
|
||||
const errored = notes.some((note) => note.errorDecrypting);
|
||||
|
||||
useEffect(() => {
|
||||
const removeAltKeyObserver = application.io.addKeyObserver({
|
||||
@@ -278,26 +277,6 @@ export const NotesOptions = observer(
|
||||
});
|
||||
};
|
||||
|
||||
if (errored) {
|
||||
return (
|
||||
<>
|
||||
{notes.length === 1 ? (
|
||||
<div className="px-3 pt-1.5 pb-1 text-xs color-neutral font-medium">
|
||||
<div>
|
||||
<span className="font-semibold">Note ID:</span> {notes[0].uuid}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
<DeletePermanentlyButton
|
||||
closeOnBlur={closeOnBlur}
|
||||
onClick={async () => {
|
||||
await appState.notes.deleteNotesPermanently();
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
const openRevisionHistoryModal = () => {
|
||||
appState.notes.setShowRevisionHistoryModal(true);
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ export const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
|
||||
) => {
|
||||
if (component) {
|
||||
if (component.conflictOf) {
|
||||
application.mutator.changeAndSaveItem(component.uuid, (mutator) => {
|
||||
application.mutator.changeAndSaveItem(component, (mutator) => {
|
||||
mutator.conflictOf = undefined;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { WebApplication } from '@/ui_models/application';
|
||||
import {
|
||||
ContentType,
|
||||
FeatureStatus,
|
||||
SNComponent,
|
||||
ComponentArea,
|
||||
FeatureDescription,
|
||||
GetFeatures,
|
||||
NoteType,
|
||||
} from '@standardnotes/features';
|
||||
import { ContentType, FeatureStatus, SNComponent } from '@standardnotes/snjs';
|
||||
} from '@standardnotes/snjs';
|
||||
import { EditorMenuItem, EditorMenuGroup } from '../ChangeEditorOption';
|
||||
|
||||
export const PLAIN_EDITOR_NAME = 'Plain Editor';
|
||||
|
||||
Reference in New Issue
Block a user