mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 15:36:28 +00:00
command text fix
This commit is contained in:
@@ -67,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{#each filteredItems as command, index}
|
{#each filteredItems as command, index}
|
||||||
<div class="command" class:selected={index == selectedIndex} on:click={() => handleCommand(command)}>
|
<div class="command" class:selected={index == selectedIndex} on:click={() => handleCommand(command)}>
|
||||||
<div>{command.category}: {command.name}</div>
|
<div>{command.text}</div>
|
||||||
{#if command.keyText}
|
{#if command.keyText}
|
||||||
<div class="shortcut">{command.keyText}</div>
|
<div class="shortcut">{command.keyText}</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export interface GlobalCommand {
|
|||||||
id: string;
|
id: string;
|
||||||
category: string;
|
category: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
text: string /* category: name */;
|
||||||
keyText?: string;
|
keyText?: string;
|
||||||
getSubCommands?: () => SubCommand[];
|
getSubCommands?: () => SubCommand[];
|
||||||
onClick?: Function;
|
onClick?: Function;
|
||||||
@@ -26,6 +27,7 @@ export default function registerCommand(command: GlobalCommand) {
|
|||||||
commands.update(x => ({
|
commands.update(x => ({
|
||||||
...x,
|
...x,
|
||||||
[command.id]: {
|
[command.id]: {
|
||||||
|
text: `${command.category}: ${command.name}`,
|
||||||
...command,
|
...command,
|
||||||
enabled: !enabledStore,
|
enabled: !enabledStore,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.button.disabled {
|
.button.disabled {
|
||||||
background: var(--theme-bg-2);
|
|
||||||
color: var(--theme-font-3);
|
color: var(--theme-font-3);
|
||||||
}
|
}
|
||||||
.button:hover {
|
.button:hover {
|
||||||
|
|||||||
Reference in New Issue
Block a user