improvement: adding zen mode to context menu (#2734)
This commit is contained in:
parent
778e4b08af
commit
629341da4d
@ -20,6 +20,7 @@ export type ShortcutName =
|
|||||||
| "group"
|
| "group"
|
||||||
| "ungroup"
|
| "ungroup"
|
||||||
| "gridMode"
|
| "gridMode"
|
||||||
|
| "zenMode"
|
||||||
| "stats"
|
| "stats"
|
||||||
| "addToLibrary";
|
| "addToLibrary";
|
||||||
|
|
||||||
@ -52,6 +53,7 @@ const shortcutMap: Record<ShortcutName, string[]> = {
|
|||||||
group: [getShortcutKey("CtrlOrCmd+G")],
|
group: [getShortcutKey("CtrlOrCmd+G")],
|
||||||
ungroup: [getShortcutKey("CtrlOrCmd+Shift+G")],
|
ungroup: [getShortcutKey("CtrlOrCmd+Shift+G")],
|
||||||
gridMode: [getShortcutKey("CtrlOrCmd+'")],
|
gridMode: [getShortcutKey("CtrlOrCmd+'")],
|
||||||
|
zenMode: [getShortcutKey("Alt+Z")],
|
||||||
stats: [],
|
stats: [],
|
||||||
addToLibrary: [],
|
addToLibrary: [],
|
||||||
};
|
};
|
||||||
|
@ -3638,6 +3638,12 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||||||
label: t("labels.gridMode"),
|
label: t("labels.gridMode"),
|
||||||
action: this.toggleGridMode,
|
action: this.toggleGridMode,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
checked: this.state.zenModeEnabled,
|
||||||
|
shortcutName: "zenMode",
|
||||||
|
label: t("buttons.zenMode"),
|
||||||
|
action: this.toggleZenMode,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
checked: this.state.showStats,
|
checked: this.state.showStats,
|
||||||
shortcutName: "stats",
|
shortcutName: "stats",
|
||||||
|
@ -44,6 +44,7 @@ Please add the latest change on the top under the correct section.
|
|||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
|
||||||
|
- Added Zen Mode to the context menu [#2734](https://github.com/excalidraw/excalidraw/pull/2734)
|
||||||
- Do not reset to selection when using the draw tool [#2721](https://github.com/excalidraw/excalidraw/pull/2721)
|
- Do not reset to selection when using the draw tool [#2721](https://github.com/excalidraw/excalidraw/pull/2721)
|
||||||
- Display proper tooltip for 2-point lines during resize, and normalize modifier key labels in hints [#2655](https://github.com/excalidraw/excalidraw/pull/2655)
|
- Display proper tooltip for 2-point lines during resize, and normalize modifier key labels in hints [#2655](https://github.com/excalidraw/excalidraw/pull/2655)
|
||||||
- Improve error message around importing images [#2619](https://github.com/excalidraw/excalidraw/pull/2619)
|
- Improve error message around importing images [#2619](https://github.com/excalidraw/excalidraw/pull/2619)
|
||||||
|
@ -621,6 +621,7 @@ describe("regression tests", () => {
|
|||||||
const expectedShortcutNames: ShortcutName[] = [
|
const expectedShortcutNames: ShortcutName[] = [
|
||||||
"selectAll",
|
"selectAll",
|
||||||
"gridMode",
|
"gridMode",
|
||||||
|
"zenMode",
|
||||||
"stats",
|
"stats",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user