mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 17:46:00 +00:00
custom error shortcuts
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import AppObjectList from '../appobj/AppObjectList.svelte';
|
||||
import * as connectionAppObject from '../appobj/ConnectionAppObject.svelte';
|
||||
import SubDatabaseList from '../appobj/SubDatabaseList.svelte';
|
||||
import { commands, openedConnections } from '../stores';
|
||||
import { commands, commandsCustomized, openedConnections } from '../stores';
|
||||
import axiosInstance from '../utility/axiosInstance';
|
||||
import ToolbarButton from './ToolbarButton.svelte';
|
||||
import runCommand from '../commands/runCommand';
|
||||
@@ -43,7 +43,7 @@
|
||||
isExpandable={data => $openedConnections.includes(data._id)}
|
||||
{filter}
|
||||
/>
|
||||
{#if $connections && $connections.length == 0 && $commands['new.connection']?.enabled}
|
||||
{#if $connections && $connections.length == 0 && $commandsCustomized['new.connection']?.enabled}
|
||||
<ToolbarButton icon="icon new-connection" on:click={() => runCommand('new.connection')}>
|
||||
Add new connection
|
||||
</ToolbarButton>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import _ from 'lodash';
|
||||
import { openFavorite } from '../appobj/FavoriteFileAppObject.svelte';
|
||||
import runCommand from '../commands/runCommand';
|
||||
import { commands } from '../stores';
|
||||
import { commands, commandsCustomized } from '../stores';
|
||||
import getElectron from '../utility/getElectron';
|
||||
import { useFavorites } from '../utility/metadataLoaders';
|
||||
import ToolbarButton from './ToolbarButton.svelte';
|
||||
@@ -20,7 +20,7 @@
|
||||
$: favorites = useFavorites();
|
||||
|
||||
$: list = _.sortBy(
|
||||
Object.values($commands).filter(x => (x.enabled || x.showDisabled) && x.toolbar && x.onClick),
|
||||
Object.values($commandsCustomized).filter(x => (x.enabled || x.showDisabled) && x.toolbar && x.onClick),
|
||||
x => (x.toolbarOrder == null ? 100 : x.toolbarOrder)
|
||||
);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user