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

Update hosttree menus

This commit is contained in:
2023-01-23 13:17:07 +01:00
parent 4d50d43f4d
commit c76e5c9503
3 changed files with 51 additions and 49 deletions

View File

@ -75,18 +75,20 @@
onMount(getHosts);
</script>
<HostTree
{hosts}
bind:activeHostKey
bind:activeCollKey
bind:activeDbKey
bind:this={hostTree}
on:newHost={createHost}
on:newDatabase={() => newDb = {}}
on:newCollection={() => newColl = {}}
on:editHost={e => editHost(e.detail)}
on:editCollection={e => openEditCollModal(e.detail)}
/>
<div class="tree">
<HostTree
{hosts}
bind:activeHostKey
bind:activeCollKey
bind:activeDbKey
bind:this={hostTree}
on:newHost={createHost}
on:newDatabase={() => newDb = {}}
on:newCollection={() => newColl = {}}
on:editHost={e => editHost(e.detail)}
on:renameCollection={e => openEditCollModal(e.detail)}
/>
</div>
<CollectionDetail
collection={$connections[activeHostKey]?.databases[activeDbKey]?.collections?.[activeCollKey]}
@ -156,6 +158,11 @@
justify-content: space-between;
}
.tree {
padding: 0.5rem;
background-color: #fff;
}
.rename {
text-align: center;
display: flex;