feat: d2c tweaks (#7336)

This commit is contained in:
David Luzar
2023-11-24 14:02:11 +01:00
committed by GitHub
parent c7ee46e7f8
commit 3d1631f375
14 changed files with 168 additions and 74 deletions
+7 -2
View File
@@ -56,13 +56,18 @@ export const actionShortcuts = register({
viewMode: true,
trackEvent: { category: "menu", action: "toggleHelpDialog" },
perform: (_elements, appState, _, { focusContainer }) => {
if (appState.openDialog === "help") {
if (appState.openDialog?.name === "help") {
focusContainer();
}
return {
appState: {
...appState,
openDialog: appState.openDialog === "help" ? null : "help",
openDialog:
appState.openDialog?.name === "help"
? null
: {
name: "help",
},
},
commitToHistory: false,
};