-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add meta settings tab to display info and option to reset settings (#95)
* initial implementation for the meta settings * client:fix * fix small things * change type
- Loading branch information
1 parent
94aa615
commit a98cde3
Showing
24 changed files
with
431 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,33 @@ | ||
//! Reducers for editor settings | ||
import { ReducerDeclWithPayload, withPayload } from "low/store"; | ||
import { withPayload } from "low/store"; | ||
|
||
import { EditorSettingsState } from "./state"; | ||
|
||
/// Set if the file tree is shown | ||
export const setShowFileTree: ReducerDeclWithPayload< | ||
EditorSettingsState, | ||
boolean | ||
> = withPayload((state: EditorSettingsState, showFileTree: boolean) => { | ||
state.showFileTree = showFileTree; | ||
}); | ||
export const setShowFileTree = withPayload<EditorSettingsState, boolean>( | ||
(state, showFileTree) => { | ||
state.showFileTree = showFileTree; | ||
}, | ||
); | ||
|
||
/// Set if auto load is enabled | ||
export const setAutoLoadEnabled: ReducerDeclWithPayload< | ||
EditorSettingsState, | ||
boolean | ||
> = withPayload((state: EditorSettingsState, autoLoadEnabled: boolean) => { | ||
state.autoLoadEnabled = autoLoadEnabled; | ||
}); | ||
export const setAutoLoadEnabled = withPayload<EditorSettingsState, boolean>( | ||
(state, autoLoadEnabled) => { | ||
state.autoLoadEnabled = autoLoadEnabled; | ||
}, | ||
); | ||
|
||
/// Set if auto save is enabled | ||
export const setAutoSaveEnabled: ReducerDeclWithPayload< | ||
EditorSettingsState, | ||
boolean | ||
> = withPayload((state: EditorSettingsState, autoSaveEnabled: boolean) => { | ||
state.autoSaveEnabled = autoSaveEnabled; | ||
}); | ||
export const setAutoSaveEnabled = withPayload<EditorSettingsState, boolean>( | ||
(state, autoSaveEnabled) => { | ||
state.autoSaveEnabled = autoSaveEnabled; | ||
}, | ||
); | ||
|
||
/// Set the time of inactivity after which auto load is disabled | ||
export const setDeactivateAutoLoadAfterMinutes: ReducerDeclWithPayload< | ||
export const setDeactivateAutoLoadAfterMinutes = withPayload< | ||
EditorSettingsState, | ||
number | ||
> = withPayload( | ||
(state: EditorSettingsState, deactivateAutoLoadAfterMinutes: number) => { | ||
state.deactivateAutoLoadAfterMinutes = deactivateAutoLoadAfterMinutes; | ||
}, | ||
); | ||
>((state, deactivateAutoLoadAfterMinutes) => { | ||
state.deactivateAutoLoadAfterMinutes = deactivateAutoLoadAfterMinutes; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.