mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
new shell command
This commit is contained in:
parent
7a5187e283
commit
4cc1da3319
@ -96,6 +96,14 @@ export default function ToolBar({ toolbarPortalRef }) {
|
||||
showModal((modalState) => <FavoriteModal modalState={modalState} savingTab={currentTab} />);
|
||||
};
|
||||
|
||||
const newShell = () => {
|
||||
openNewTab({
|
||||
title: 'Shell',
|
||||
icon: 'img shell',
|
||||
tabComponent: 'ShellTab',
|
||||
});
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
const { hash } = document.location;
|
||||
const openFavoriteName = hash && hash.startsWith('#favorite=') ? hash.substring('#favorite='.length) : null;
|
||||
@ -138,6 +146,7 @@ export default function ToolBar({ toolbarPortalRef }) {
|
||||
{!!currentDatabase && <DropDownMenuItem onClick={newQueryDesign}>Query designer</DropDownMenuItem>}
|
||||
<DropDownMenuItem onClick={newFreeTable}>Free table editor</DropDownMenuItem>
|
||||
<DropDownMenuItem onClick={newMarkdown}>Markdown page</DropDownMenuItem>
|
||||
<DropDownMenuItem onClick={newShell}>JavaScript shell script</DropDownMenuItem>
|
||||
</ToolbarDropDownButton>
|
||||
|
||||
<ToolbarButton onClick={showImport} icon="icon import">
|
||||
|
Loading…
Reference in New Issue
Block a user