mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 08:26:01 +00:00
grid commands + ctx menu
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
<script context="module">
|
||||
function getCommandTitle(command) {
|
||||
let res = command.text;
|
||||
if (command.keyText) res += ` (${command.keyText})`;
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import _ from 'lodash';
|
||||
import App from '../App.svelte';
|
||||
@@ -12,9 +20,14 @@
|
||||
|
||||
<div class="container">
|
||||
{#each list as command}
|
||||
<ToolbarButton icon={command.icon} on:click={command.onClick} disabled={!command.enabled}
|
||||
>{command.toolbarName || command.name}</ToolbarButton
|
||||
<ToolbarButton
|
||||
icon={command.icon}
|
||||
on:click={command.onClick}
|
||||
disabled={!command.enabled}
|
||||
title={getCommandTitle(command)}
|
||||
>
|
||||
{command.toolbarName || command.name}
|
||||
</ToolbarButton>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user