mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 12:03:58 +00:00
new shell command
This commit is contained in:
@@ -96,6 +96,14 @@ export default function ToolBar({ toolbarPortalRef }) {
|
|||||||
showModal((modalState) => <FavoriteModal modalState={modalState} savingTab={currentTab} />);
|
showModal((modalState) => <FavoriteModal modalState={modalState} savingTab={currentTab} />);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const newShell = () => {
|
||||||
|
openNewTab({
|
||||||
|
title: 'Shell',
|
||||||
|
icon: 'img shell',
|
||||||
|
tabComponent: 'ShellTab',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const { hash } = document.location;
|
const { hash } = document.location;
|
||||||
const openFavoriteName = hash && hash.startsWith('#favorite=') ? hash.substring('#favorite='.length) : null;
|
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>}
|
{!!currentDatabase && <DropDownMenuItem onClick={newQueryDesign}>Query designer</DropDownMenuItem>}
|
||||||
<DropDownMenuItem onClick={newFreeTable}>Free table editor</DropDownMenuItem>
|
<DropDownMenuItem onClick={newFreeTable}>Free table editor</DropDownMenuItem>
|
||||||
<DropDownMenuItem onClick={newMarkdown}>Markdown page</DropDownMenuItem>
|
<DropDownMenuItem onClick={newMarkdown}>Markdown page</DropDownMenuItem>
|
||||||
|
<DropDownMenuItem onClick={newShell}>JavaScript shell script</DropDownMenuItem>
|
||||||
</ToolbarDropDownButton>
|
</ToolbarDropDownButton>
|
||||||
|
|
||||||
<ToolbarButton onClick={showImport} icon="icon import">
|
<ToolbarButton onClick={showImport} icon="icon import">
|
||||||
|
|||||||
Reference in New Issue
Block a user