mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 05:26:00 +00:00
connection modal
This commit is contained in:
@@ -2,6 +2,8 @@ import { currentTheme, extensions, visibleToolbar } from '../stores';
|
||||
import registerCommand from './registerCommand';
|
||||
import { derived, get } from 'svelte/store';
|
||||
import { ThemeDefinition } from 'dbgate-types';
|
||||
import ConnectionModal from '../modals/ConnectionModal.svelte';
|
||||
import { showModal } from '../modals/modalTools';
|
||||
|
||||
function themeCommand(theme: ThemeDefinition) {
|
||||
return {
|
||||
@@ -39,3 +41,13 @@ registerCommand({
|
||||
onClick: () => visibleToolbar.set(0),
|
||||
enabledStore: derived(visibleToolbar, $visibleToolbar => $visibleToolbar),
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'new.connection',
|
||||
toolbar: true,
|
||||
icon: 'icon connection',
|
||||
toolbarName: 'Add connection',
|
||||
category: 'New',
|
||||
name: 'Connection',
|
||||
onClick: () => showModal(ConnectionModal),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user