feat: native listed integration (#846)
* feat(wip): native listed integration * feat(wip): wip * feat: simplified actions menu structure * feat: open settings alert upon succesful creation * fix: handle remove menu row api * chore(deps): snjs
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
import { UuidString } from "@standardnotes/snjs";
|
||||
import { action, makeObservable, observable } from "mobx";
|
||||
import { UuidString } from '@standardnotes/snjs';
|
||||
import { action, makeObservable, observable } from 'mobx';
|
||||
|
||||
export class ActionsMenuState {
|
||||
hiddenExtensions: Record<UuidString, boolean> = {};
|
||||
hiddenSections: Record<UuidString, boolean> = {};
|
||||
|
||||
constructor() {
|
||||
makeObservable(this, {
|
||||
hiddenExtensions: observable,
|
||||
toggleExtensionVisibility: action,
|
||||
hiddenSections: observable,
|
||||
toggleSectionVisibility: action,
|
||||
reset: action,
|
||||
});
|
||||
}
|
||||
|
||||
toggleExtensionVisibility = (uuid: UuidString): void => {
|
||||
this.hiddenExtensions[uuid] = !this.hiddenExtensions[uuid];
|
||||
}
|
||||
toggleSectionVisibility = (uuid: UuidString): void => {
|
||||
this.hiddenSections[uuid] = !this.hiddenSections[uuid];
|
||||
};
|
||||
|
||||
reset = (): void => {
|
||||
this.hiddenExtensions = {};
|
||||
}
|
||||
this.hiddenSections = {};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user