mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 18:26:00 +00:00
themes
This commit is contained in:
@@ -32,26 +32,52 @@
|
||||
{/each}
|
||||
</select>
|
||||
{:else}
|
||||
<SvelteSelect
|
||||
{...$$restProps}
|
||||
items={options}
|
||||
selectedValue={isMulti
|
||||
? value?.map(item => options.find(x => x.value == item))
|
||||
: options.find(x => x.value == value)}
|
||||
on:select={e => {
|
||||
if (isMulti) {
|
||||
dispatch(
|
||||
'change',
|
||||
e.detail?.map(x => x.value)
|
||||
);
|
||||
} else {
|
||||
dispatch('change', e.detail.value);
|
||||
}
|
||||
}}
|
||||
showIndicator={!isMulti}
|
||||
isClearable={isMulti}
|
||||
{isMulti}
|
||||
bind:listOpen
|
||||
bind:isFocused
|
||||
/>
|
||||
<div class="select">
|
||||
<SvelteSelect
|
||||
{...$$restProps}
|
||||
items={options}
|
||||
selectedValue={isMulti
|
||||
? value?.map(item => options.find(x => x.value == item))
|
||||
: options.find(x => x.value == value)}
|
||||
on:select={e => {
|
||||
if (isMulti) {
|
||||
dispatch(
|
||||
'change',
|
||||
e.detail?.map(x => x.value)
|
||||
);
|
||||
} else {
|
||||
dispatch('change', e.detail.value);
|
||||
}
|
||||
}}
|
||||
showIndicator={!isMulti}
|
||||
isClearable={isMulti}
|
||||
{isMulti}
|
||||
bind:listOpen
|
||||
bind:isFocused
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.select {
|
||||
--border: 1px solid var(--theme-border);
|
||||
--placeholderColor: var(--theme-font-2);
|
||||
--background: var(--theme-bg-0);
|
||||
--listBackground: var(--theme-bg-1);
|
||||
--itemActiveBackground: var(--theme-bg-selected);
|
||||
--itemIsActiveBG: var(--theme-bg-selected);
|
||||
--itemHoverBG: var(--theme-bg-hover);
|
||||
--itemColor: var(--theme-font-1);
|
||||
--listEmptyColor: var(--theme-bg-0);
|
||||
|
||||
--multiClearBG: var(--theme-bg-3);
|
||||
--multiClearFill: var(--theme-font-2);
|
||||
--multiClearHoverBG: var(--theme-bg-hover);
|
||||
--multiClearHoverFill: var(--theme-font-hover);
|
||||
--multiItemActiveBG: var(--theme-bg-1);
|
||||
--multiItemActiveColor: var(--theme-font-1);
|
||||
--multiItemBG: var(--theme-bg-1);
|
||||
--multiItemDisabledHoverBg: var(--theme-bg-1);
|
||||
--multiItemDisabledHoverColor: var(--theme-bg-1);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
if (focused) onMount(() => domEditor.focus());
|
||||
</script>
|
||||
|
||||
<input type="text" {...$$restProps} bind:value on:change on:input bind:this={domEditor} on:keydown />
|
||||
<input type="text" {...$$restProps} bind:value on:change on:input bind:this={domEditor} on:keydown autocomplete="new-password" />
|
||||
|
||||
Reference in New Issue
Block a user