Major mini editor refactoring (#225)
Replaces most editing components with CM components, enabling vim mode and completions everywhere Fixes #205 Fixes #221 Fixes #222 Fixes #223
This commit is contained in:
+12
-3
@@ -26,7 +26,6 @@ export type AppViewState = {
|
||||
currentPage?: string;
|
||||
editingPageName: boolean;
|
||||
perm: EditorMode;
|
||||
forcedROMode: boolean;
|
||||
isLoading: boolean;
|
||||
showPageNavigator: boolean;
|
||||
showCommandPalette: boolean;
|
||||
@@ -37,6 +36,12 @@ export type AppViewState = {
|
||||
notifications: Notification[];
|
||||
recentCommands: Map<string, Date>;
|
||||
|
||||
uiOptions: {
|
||||
vimMode: boolean;
|
||||
darkMode: boolean;
|
||||
forcedROMode: boolean;
|
||||
};
|
||||
|
||||
showFilterBox: boolean;
|
||||
filterBoxLabel: string;
|
||||
filterBoxPlaceHolder: string;
|
||||
@@ -48,11 +53,15 @@ export type AppViewState = {
|
||||
export const initialViewState: AppViewState = {
|
||||
perm: "rw",
|
||||
editingPageName: false,
|
||||
forcedROMode: false,
|
||||
isLoading: false,
|
||||
showPageNavigator: false,
|
||||
showCommandPalette: false,
|
||||
unsavedChanges: false,
|
||||
uiOptions: {
|
||||
vimMode: false,
|
||||
darkMode: false,
|
||||
forcedROMode: false,
|
||||
},
|
||||
panels: {
|
||||
lhs: {},
|
||||
rhs: {},
|
||||
@@ -103,4 +112,4 @@ export type Action =
|
||||
onSelect: (option: FilterOption | undefined) => void;
|
||||
}
|
||||
| { type: "hide-filterbox" }
|
||||
| { type: "set-editor-ro"; enabled: boolean };
|
||||
| { type: "set-ui-option"; key: string; value: any };
|
||||
|
||||
Reference in New Issue
Block a user