1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-18 14:04:04 +00:00

A lot of improvements

This commit is contained in:
2023-01-20 13:54:57 +01:00
parent 9811235be7
commit 6703950734
14 changed files with 248 additions and 61 deletions

View File

@ -2,6 +2,7 @@
import ObjectViewer from '../../../components/objectviewer.svelte';
import ObjectGrid from '../../../components/objectgrid.svelte';
import { DropIndex, GetIndexes } from '../../../../wailsjs/go/app/App';
import Icon from '../../../components/icon.svelte';
export let collection;
@ -9,6 +10,8 @@
let activePath = [];
let objectViewerData = '';
$: collection && getIndexes();
async function getIndexes() {
const result = await GetIndexes(collection.hostKey, collection.dbKey, collection.key);
if (result) {
@ -35,11 +38,15 @@
<div class="indexes">
<div class="actions">
<button class="btn" on:click={getIndexes}>Get indexes</button>
<button class="btn danger" on:click={drop} disabled={!indexes?.length || !activePath[0]}>
Drop selected
<button class="btn" on:click={getIndexes}>
<Icon name="reload" /> Reload
</button>
<button class="btn">
<Icon name="+" /> Create index…
</button>
<button class="btn danger" on:click={drop} disabled={!indexes?.length || !activePath[0]}>
<Icon name="x" /> Drop selected
</button>
<button class="btn">Create…</button>
</div>
<div class="grid">