mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
Merge pull request #671 from KKishikawa/save-menu-are-not-working
fix(web): file menu save and save as not working
This commit is contained in:
commit
843675a056
@ -1,6 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
import { getContext, setContext } from 'svelte';
|
||||
import invalidateCommands from '../commands/invalidateCommands';
|
||||
import { runGroupCommand } from '../commands/runCommand';
|
||||
import { currentDropDownMenu, visibleCommandPalette } from '../stores';
|
||||
import getAsArray from './getAsArray';
|
||||
|
||||
@ -98,8 +99,12 @@ function mapItem(item, commands) {
|
||||
text: item.text || command.menuName || command.toolbarName || command.name,
|
||||
keyText: command.keyText || command.keyTextFromGroup,
|
||||
onClick: () => {
|
||||
if (command.getSubCommands) visibleCommandPalette.set(command);
|
||||
else if (command.onClick) command.onClick();
|
||||
if (command.isGroupCommand) {
|
||||
runGroupCommand(command.group);
|
||||
} else {
|
||||
if (command.getSubCommands) visibleCommandPalette.set(command);
|
||||
else if (command.onClick) command.onClick();
|
||||
}
|
||||
},
|
||||
disabled: !command.enabled,
|
||||
hideDisabled: item.hideDisabled,
|
||||
|
Loading…
Reference in New Issue
Block a user