mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
redis: add key modal style
This commit is contained in:
parent
735c48902f
commit
5b39576e61
@ -1,4 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
import AceEditor from '../query/AceEditor.svelte';
|
import AceEditor from '../query/AceEditor.svelte';
|
||||||
|
|
||||||
export let dbKeyFields;
|
export let dbKeyFields;
|
||||||
@ -8,7 +10,7 @@
|
|||||||
|
|
||||||
<div class="props">
|
<div class="props">
|
||||||
{#each dbKeyFields as column}
|
{#each dbKeyFields as column}
|
||||||
<div class="colname">{column.name}</div>
|
<div class="colname">{_.startCase(column.name)}</div>
|
||||||
<div class="colvalue">
|
<div class="colvalue">
|
||||||
<AceEditor
|
<AceEditor
|
||||||
readOnly={!onChangeItem}
|
readOnly={!onChangeItem}
|
||||||
@ -34,7 +36,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.colname {
|
.colname {
|
||||||
margin: 10px;
|
margin-top: 20px;
|
||||||
|
color: var(--theme-font-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.colvalue {
|
.colvalue {
|
||||||
|
@ -26,10 +26,22 @@
|
|||||||
|
|
||||||
<FormProvider>
|
<FormProvider>
|
||||||
<ModalBase {...$$restProps}>
|
<ModalBase {...$$restProps}>
|
||||||
<svelte:fragment slot="header">Add item</svelte:fragment>
|
<svelte:fragment slot="header">Add key</svelte:fragment>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<FormFieldTemplateLarge label="Type" type="combo">
|
<FormFieldTemplateLarge label="Key" type="text" noMargin>
|
||||||
|
<TextField
|
||||||
|
value={keyName}
|
||||||
|
on:change={e => {
|
||||||
|
// @ts-ignore
|
||||||
|
keyName = e.target.value;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</FormFieldTemplateLarge>
|
||||||
|
|
||||||
|
<div class="m-3" />
|
||||||
|
|
||||||
|
<FormFieldTemplateLarge label="Type" type="combo" noMargin>
|
||||||
<SelectField
|
<SelectField
|
||||||
options={driver.supportedKeyTypes.map(t => ({ value: t.name, label: t.label }))}
|
options={driver.supportedKeyTypes.map(t => ({ value: t.name, label: t.label }))}
|
||||||
value={type}
|
value={type}
|
||||||
@ -40,16 +52,6 @@
|
|||||||
/>
|
/>
|
||||||
</FormFieldTemplateLarge>
|
</FormFieldTemplateLarge>
|
||||||
|
|
||||||
<FormFieldTemplateLarge label="Name" type="text">
|
|
||||||
<TextField
|
|
||||||
value={keyName}
|
|
||||||
on:change={e => {
|
|
||||||
// @ts-ignore
|
|
||||||
keyName = e.target.value;
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</FormFieldTemplateLarge>
|
|
||||||
|
|
||||||
<DbKeyItemDetail
|
<DbKeyItemDetail
|
||||||
dbKeyFields={driver.supportedKeyTypes.find(x => x.name == type).dbKeyFields}
|
dbKeyFields={driver.supportedKeyTypes.find(x => x.name == type).dbKeyFields}
|
||||||
{item}
|
{item}
|
||||||
|
Loading…
Reference in New Issue
Block a user