mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 05:03:57 +00:00
SYNC: Merge pull request #2 from dbgate/feature/admin-ui
This commit is contained in:
@@ -33,6 +33,26 @@ function loadEncryptionKey() {
|
|||||||
return _encryptionKey;
|
return _encryptionKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function loadEncryptionKeyFromExternal(storedValue, setStoredValue) {
|
||||||
|
const encryptor = simpleEncryptor.createEncryptor(defaultEncryptionKey);
|
||||||
|
|
||||||
|
if (!storedValue) {
|
||||||
|
const generatedKey = crypto.randomBytes(32);
|
||||||
|
const newKey = generatedKey.toString('hex');
|
||||||
|
const result = {
|
||||||
|
encryptionKey: newKey,
|
||||||
|
};
|
||||||
|
await setStoredValue(encryptor.encrypt(result));
|
||||||
|
|
||||||
|
setEncryptionKey(newKey);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = encryptor.decrypt(storedValue);
|
||||||
|
setEncryptionKey(data['encryptionKey']);
|
||||||
|
}
|
||||||
|
|
||||||
let _encryptor = null;
|
let _encryptor = null;
|
||||||
|
|
||||||
function getEncryptor() {
|
function getEncryptor() {
|
||||||
@@ -43,35 +63,32 @@ function getEncryptor() {
|
|||||||
return _encryptor;
|
return _encryptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
function encryptPasswordField(connection, field) {
|
function encryptObjectPasswordField(obj, field) {
|
||||||
if (
|
if (obj && obj[field] && !obj[field].startsWith('crypt:')) {
|
||||||
connection &&
|
|
||||||
connection[field] &&
|
|
||||||
!connection[field].startsWith('crypt:') &&
|
|
||||||
connection.passwordMode != 'saveRaw'
|
|
||||||
) {
|
|
||||||
return {
|
return {
|
||||||
...connection,
|
...obj,
|
||||||
[field]: 'crypt:' + getEncryptor().encrypt(connection[field]),
|
[field]: 'crypt:' + getEncryptor().encrypt(obj[field]),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return connection;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function decryptPasswordField(connection, field) {
|
function decryptObjectPasswordField(obj, field) {
|
||||||
if (connection && connection[field] && connection[field].startsWith('crypt:')) {
|
if (obj && obj[field] && obj[field].startsWith('crypt:')) {
|
||||||
return {
|
return {
|
||||||
...connection,
|
...obj,
|
||||||
[field]: getEncryptor().decrypt(connection[field].substring('crypt:'.length)),
|
[field]: getEncryptor().decrypt(obj[field].substring('crypt:'.length)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return connection;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function encryptConnection(connection) {
|
function encryptConnection(connection) {
|
||||||
connection = encryptPasswordField(connection, 'password');
|
if (connection.passwordMode != 'saveRaw') {
|
||||||
connection = encryptPasswordField(connection, 'sshPassword');
|
connection = encryptObjectPasswordField(connection, 'password');
|
||||||
connection = encryptPasswordField(connection, 'sshKeyfilePassword');
|
connection = encryptObjectPasswordField(connection, 'sshPassword');
|
||||||
|
connection = encryptObjectPasswordField(connection, 'sshKeyfilePassword');
|
||||||
|
}
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,12 +98,24 @@ function maskConnection(connection) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function decryptConnection(connection) {
|
function decryptConnection(connection) {
|
||||||
connection = decryptPasswordField(connection, 'password');
|
connection = decryptObjectPasswordField(connection, 'password');
|
||||||
connection = decryptPasswordField(connection, 'sshPassword');
|
connection = decryptObjectPasswordField(connection, 'sshPassword');
|
||||||
connection = decryptPasswordField(connection, 'sshKeyfilePassword');
|
connection = decryptObjectPasswordField(connection, 'sshKeyfilePassword');
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function encryptUser(user) {
|
||||||
|
if (user.encryptPassword) {
|
||||||
|
user = encryptObjectPasswordField(user, 'password');
|
||||||
|
}
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
function decryptUser(user) {
|
||||||
|
user = decryptObjectPasswordField(user, 'password');
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
function pickSafeConnectionInfo(connection) {
|
function pickSafeConnectionInfo(connection) {
|
||||||
if (process.env.LOG_CONNECTION_SENSITIVE_VALUES) {
|
if (process.env.LOG_CONNECTION_SENSITIVE_VALUES) {
|
||||||
return connection;
|
return connection;
|
||||||
@@ -99,10 +128,18 @@ function pickSafeConnectionInfo(connection) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setEncryptionKey(encryptionKey) {
|
||||||
|
_encryptionKey = encryptionKey;
|
||||||
|
_encryptor = null;
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
loadEncryptionKey,
|
loadEncryptionKey,
|
||||||
encryptConnection,
|
encryptConnection,
|
||||||
|
encryptUser,
|
||||||
|
decryptUser,
|
||||||
decryptConnection,
|
decryptConnection,
|
||||||
maskConnection,
|
maskConnection,
|
||||||
pickSafeConnectionInfo,
|
pickSafeConnectionInfo,
|
||||||
|
loadEncryptionKeyFromExternal,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -58,6 +58,24 @@ body {
|
|||||||
.relative {
|
.relative {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.scroll {
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
.bg-0 {
|
||||||
|
background-color: var(--theme-bg-0);
|
||||||
|
}
|
||||||
|
.bg-1 {
|
||||||
|
background-color: var(--theme-bg-1);
|
||||||
|
}
|
||||||
|
.bg-2 {
|
||||||
|
background-color: var(--theme-bg-2);
|
||||||
|
}
|
||||||
|
.bg-3 {
|
||||||
|
background-color: var(--theme-bg-3);
|
||||||
|
}
|
||||||
|
.bg-4 {
|
||||||
|
background-color: var(--theme-bg-4);
|
||||||
|
}
|
||||||
|
|
||||||
.col-10 {
|
.col-10 {
|
||||||
flex-basis: 83.3333%;
|
flex-basis: 83.3333%;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="content" class:scrollContent>
|
<div class="content" class:scrollContent class:isComponentActive>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -41,6 +41,10 @@
|
|||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content.isComponentActive {
|
||||||
|
max-height: calc(100% - 30px);
|
||||||
|
}
|
||||||
|
|
||||||
.toolstrip {
|
.toolstrip {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|||||||
@@ -619,6 +619,24 @@ registerCommand({
|
|||||||
onClick: doLogout,
|
onClick: doLogout,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
registerCommand({
|
||||||
|
id: 'app.loggedUserCommands',
|
||||||
|
category: 'App',
|
||||||
|
name: 'Logged user',
|
||||||
|
getSubCommands: () => {
|
||||||
|
const config = getCurrentConfig();
|
||||||
|
if (!config) return [];
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
text: 'Logout',
|
||||||
|
onClick: () => {
|
||||||
|
doLogout();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'app.disconnect',
|
id: 'app.disconnect',
|
||||||
category: 'App',
|
category: 'App',
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
export let containerMaxWidth = undefined;
|
export let containerMaxWidth = undefined;
|
||||||
export let flex1 = true;
|
export let flex1 = true;
|
||||||
export let contentTestId = undefined;
|
export let contentTestId = undefined;
|
||||||
|
export let inlineTabs = false;
|
||||||
|
|
||||||
export function setValue(index) {
|
export function setValue(index) {
|
||||||
value = index;
|
value = index;
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="main" class:flex1>
|
<div class="main" class:flex1>
|
||||||
<div class="tabs">
|
<div class="tabs" class:inlineTabs>
|
||||||
{#each _.compact(tabs) as tab, index}
|
{#each _.compact(tabs) as tab, index}
|
||||||
<div class="tab-item" class:selected={value == index} on:click={() => (value = index)} data-testid={tab.testid}>
|
<div class="tab-item" class:selected={value == index} on:click={() => (value = index)} data-testid={tab.testid}>
|
||||||
<span class="ml-2">
|
<span class="ml-2">
|
||||||
@@ -78,17 +79,27 @@
|
|||||||
height: var(--dim-tabs-height);
|
height: var(--dim-tabs-height);
|
||||||
min-height: var(--dim-tabs-height);
|
min-height: var(--dim-tabs-height);
|
||||||
right: 0;
|
right: 0;
|
||||||
background-color: var(--theme-bg-2);
|
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tabs:not(.inlineTabs) {
|
||||||
|
background-color: var(--theme-bg-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.inlineTabs {
|
||||||
|
border-bottom: 1px solid var(--theme-border);
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.inlineTabs .tab-item.selected {
|
||||||
|
border-bottom: 2px solid var(--theme-font-link);
|
||||||
|
}
|
||||||
.tabs::-webkit-scrollbar {
|
.tabs::-webkit-scrollbar {
|
||||||
height: 7px;
|
height: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-item {
|
.tab-item {
|
||||||
border-right: 1px solid var(--theme-border);
|
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -96,6 +107,10 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tabs:not(.inlineTabs) .tab-item {
|
||||||
|
border-right: 1px solid var(--theme-border);
|
||||||
|
}
|
||||||
|
|
||||||
/* .tab-item:hover {
|
/* .tab-item:hover {
|
||||||
color: ${props => props.theme.tabs_font_hover};
|
color: ${props => props.theme.tabs_font_hover};
|
||||||
} */
|
} */
|
||||||
@@ -124,4 +139,5 @@
|
|||||||
.container.isInline:not(.tabVisible) {
|
.container.isInline:not(.tabVisible) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -31,6 +31,11 @@
|
|||||||
export let noCellPadding = false;
|
export let noCellPadding = false;
|
||||||
|
|
||||||
export let domTable = undefined;
|
export let domTable = undefined;
|
||||||
|
export let stickyHeader = false;
|
||||||
|
|
||||||
|
export let checkedKeys = null;
|
||||||
|
export let onSetCheckedKeys = null;
|
||||||
|
export let extractCheckedKey = x => x.id;
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
@@ -63,11 +68,15 @@
|
|||||||
on:keydown
|
on:keydown
|
||||||
tabindex={selectable ? -1 : undefined}
|
tabindex={selectable ? -1 : undefined}
|
||||||
on:keydown={handleKeyDown}
|
on:keydown={handleKeyDown}
|
||||||
|
class:stickyHeader
|
||||||
>
|
>
|
||||||
<thead>
|
<thead class:stickyHeader>
|
||||||
<tr>
|
<tr>
|
||||||
|
{#if checkedKeys}
|
||||||
|
<th></th>
|
||||||
|
{/if}
|
||||||
{#each columnList as col}
|
{#each columnList as col}
|
||||||
<td
|
<th
|
||||||
class:clickable={col.sortable}
|
class:clickable={col.sortable}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (col.sortable) {
|
if (col.sortable) {
|
||||||
@@ -89,7 +98,7 @@
|
|||||||
{#if sortedByField == col.fieldName}
|
{#if sortedByField == col.fieldName}
|
||||||
<FontIcon icon={sortOrderIsDesc ? 'img sort-desc' : 'img sort-asc'} padLeft />
|
<FontIcon icon={sortOrderIsDesc ? 'img sort-desc' : 'img sort-asc'} padLeft />
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</th>
|
||||||
{/each}
|
{/each}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -108,6 +117,18 @@
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{#if checkedKeys}
|
||||||
|
<td>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={checkedKeys.includes(extractCheckedKey(row))}
|
||||||
|
on:change={e => {
|
||||||
|
if (e.target['checked']) onSetCheckedKeys(_.uniq([...checkedKeys, extractCheckedKey(row)]));
|
||||||
|
else onSetCheckedKeys(checkedKeys.filter(x => x != extractCheckedKey(row)));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</td>
|
||||||
|
{/if}
|
||||||
{#each columnList as col}
|
{#each columnList as col}
|
||||||
{@const rowProps = { ...col.props, ...(col.getProps ? col.getProps(row) : null) }}
|
{@const rowProps = { ...col.props, ...(col.getProps ? col.getProps(row) : null) }}
|
||||||
<td class:isHighlighted={col.isHighlighted && col.isHighlighted(row)} class:noCellPadding>
|
<td class:isHighlighted={col.isHighlighted && col.isHighlighted(row)} class:noCellPadding>
|
||||||
@@ -164,7 +185,7 @@
|
|||||||
background: var(--theme-bg-hover);
|
background: var(--theme-bg-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
thead td {
|
thead th {
|
||||||
border: 1px solid var(--theme-border);
|
border: 1px solid var(--theme-border);
|
||||||
background-color: var(--theme-bg-1);
|
background-color: var(--theme-bg-1);
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
@@ -184,4 +205,31 @@
|
|||||||
td.clickable {
|
td.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thead.stickyHeader {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1;
|
||||||
|
border-top: 1px solid var(--theme-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
table.stickyHeader th {
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead.stickyHeader :global(tr:first-child) :global(th) {
|
||||||
|
border-top: 1px solid var(--theme-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
table.stickyHeader td {
|
||||||
|
border: 0px;
|
||||||
|
border-bottom: 1px solid var(--theme-border);
|
||||||
|
border-right: 1px solid var(--theme-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
table.stickyHeader {
|
||||||
|
border-spacing: 0;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-left: 1px solid var(--theme-border);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
79
packages/web/src/forms/ExtendedCheckBoxField.svelte
Normal file
79
packages/web/src/forms/ExtendedCheckBoxField.svelte
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
export let value;
|
||||||
|
|
||||||
|
// use for 3-state checkbox
|
||||||
|
export let inheritedValue = null;
|
||||||
|
|
||||||
|
export let onChange;
|
||||||
|
|
||||||
|
export let label;
|
||||||
|
|
||||||
|
$: renderedValue = value ?? inheritedValue;
|
||||||
|
$: isInherited = inheritedValue != null && value == null;
|
||||||
|
|
||||||
|
function getNextValue() {
|
||||||
|
if (inheritedValue != null) {
|
||||||
|
// 3-state logic
|
||||||
|
if (isInherited) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (renderedValue) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !value;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="wrapper"
|
||||||
|
on:click|preventDefault|stopPropagation={() => {
|
||||||
|
onChange(getNextValue());
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div class="checkbox" {...$$restProps} class:checked={!!renderedValue} class:isInherited />
|
||||||
|
<div class="label">
|
||||||
|
{label}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
width: 14px !important;
|
||||||
|
height: 14px !important;
|
||||||
|
margin: 5px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
-o-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
outline: 1px solid var(--theme-border);
|
||||||
|
box-shadow: none;
|
||||||
|
font-size: 0.8em;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1em;
|
||||||
|
background: var(--theme-bg-0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.checked:after {
|
||||||
|
content: '✔';
|
||||||
|
color: var(--theme-font-1);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.isInherited {
|
||||||
|
background: var(--theme-bg-2) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -8,15 +8,23 @@
|
|||||||
|
|
||||||
export let message;
|
export let message;
|
||||||
export let onConfirm;
|
export let onConfirm;
|
||||||
|
export let confirmLabel = 'OK';
|
||||||
|
export let header = null;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<FormProvider>
|
<FormProvider>
|
||||||
<ModalBase {...$$restProps}>
|
<ModalBase {...$$restProps}>
|
||||||
|
<svelte:fragment slot="header">
|
||||||
|
{#if header}
|
||||||
|
{header}
|
||||||
|
{/if}
|
||||||
|
</svelte:fragment>
|
||||||
|
|
||||||
{message}
|
{message}
|
||||||
|
|
||||||
<svelte:fragment slot="footer">
|
<svelte:fragment slot="footer">
|
||||||
<FormSubmit
|
<FormSubmit
|
||||||
value="OK"
|
value={confirmLabel}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
closeCurrentModal();
|
closeCurrentModal();
|
||||||
onConfirm();
|
onConfirm();
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
export let tabid;
|
export let tabid;
|
||||||
export let conid;
|
export let conid;
|
||||||
export let connectionStore = undefined;
|
export let connectionStore = undefined;
|
||||||
|
export let inlineTabs = false;
|
||||||
|
|
||||||
export let onlyTestButton;
|
export let onlyTestButton;
|
||||||
|
|
||||||
@@ -237,6 +238,7 @@
|
|||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<TabControl
|
<TabControl
|
||||||
isInline
|
isInline
|
||||||
|
{inlineTabs}
|
||||||
containerMaxWidth="800px"
|
containerMaxWidth="800px"
|
||||||
flex1={false}
|
flex1={false}
|
||||||
contentTestId="ConnectionTab_tabControlContent"
|
contentTestId="ConnectionTab_tabControlContent"
|
||||||
|
|||||||
@@ -16,7 +16,12 @@
|
|||||||
visibleCommandPalette,
|
visibleCommandPalette,
|
||||||
} from '../stores';
|
} from '../stores';
|
||||||
import { getConnectionLabel } from 'dbgate-tools';
|
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 { findCommand } from '../commands/runCommand';
|
||||||
import { useConnectionColor } from '../utility/useConnectionColor';
|
import { useConnectionColor } from '../utility/useConnectionColor';
|
||||||
import { apiCall } from '../utility/api';
|
import { apiCall } from '../utility/api';
|
||||||
@@ -27,6 +32,7 @@
|
|||||||
$: dbid = connection ? { conid: connection._id, database: databaseName } : null;
|
$: dbid = connection ? { conid: connection._id, database: databaseName } : null;
|
||||||
$: status = useDatabaseStatus(dbid || {});
|
$: status = useDatabaseStatus(dbid || {});
|
||||||
$: serverVersion = useDatabaseServerVersion(dbid || {});
|
$: serverVersion = useDatabaseServerVersion(dbid || {});
|
||||||
|
$: config = useConfig();
|
||||||
|
|
||||||
$: contextItems = $statusBarTabInfo[$activeTabId] as any[];
|
$: contextItems = $statusBarTabInfo[$activeTabId] as any[];
|
||||||
$: connectionLabel = getConnectionLabel(connection, { allowExplicitDatabase: false });
|
$: connectionLabel = getConnectionLabel(connection, { allowExplicitDatabase: false });
|
||||||
@@ -171,6 +177,13 @@
|
|||||||
</div>
|
</div>
|
||||||
{/each}
|
{/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}
|
{#if $appUpdateStatus}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<FontIcon icon={$appUpdateStatus.icon} padRight />
|
<FontIcon icon={$appUpdateStatus.icon} padRight />
|
||||||
|
|||||||
Reference in New Issue
Block a user