mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 17:46:00 +00:00
SYNC: Merge pull request #2 from dbgate/feature/admin-ui
This commit is contained in:
@@ -16,7 +16,12 @@
|
||||
visibleCommandPalette,
|
||||
} from '../stores';
|
||||
import { getConnectionLabel } from 'dbgate-tools';
|
||||
import { useConnectionList, useDatabaseServerVersion, useDatabaseStatus } from '../utility/metadataLoaders';
|
||||
import {
|
||||
useConfig,
|
||||
useConnectionList,
|
||||
useDatabaseServerVersion,
|
||||
useDatabaseStatus,
|
||||
} from '../utility/metadataLoaders';
|
||||
import { findCommand } from '../commands/runCommand';
|
||||
import { useConnectionColor } from '../utility/useConnectionColor';
|
||||
import { apiCall } from '../utility/api';
|
||||
@@ -27,6 +32,7 @@
|
||||
$: dbid = connection ? { conid: connection._id, database: databaseName } : null;
|
||||
$: status = useDatabaseStatus(dbid || {});
|
||||
$: serverVersion = useDatabaseServerVersion(dbid || {});
|
||||
$: config = useConfig();
|
||||
|
||||
$: contextItems = $statusBarTabInfo[$activeTabId] as any[];
|
||||
$: connectionLabel = getConnectionLabel(connection, { allowExplicitDatabase: false });
|
||||
@@ -171,6 +177,13 @@
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
{#if $config?.isUserLoggedIn && $config?.login}
|
||||
<div class="item clickable" on:click={() => visibleCommandPalette.set(findCommand('app.loggedUserCommands'))}>
|
||||
<FontIcon icon="icon users" padRight />
|
||||
{$config?.login}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if $appUpdateStatus}
|
||||
<div class="item">
|
||||
<FontIcon icon={$appUpdateStatus.icon} padRight />
|
||||
|
||||
Reference in New Issue
Block a user