Making internal database view a bit nicer.
This commit is contained in:
parent
0cec87a0b6
commit
c594ce20b7
|
@ -1,6 +1,9 @@
|
|||
<script>
|
||||
import { Button, Heading, Body, Layout, Modal } from "@budibase/bbui"
|
||||
import { Button, Heading, Body, Layout, Modal, Divider } from "@budibase/bbui"
|
||||
import CreateTableModal from "components/backend/TableNavigator/modals/CreateTableModal.svelte"
|
||||
import ICONS from "components/backend/DatasourceNavigator/icons"
|
||||
import { tables, datasources } from "stores/backend"
|
||||
import { goto } from "@roxi/routify"
|
||||
|
||||
let modal
|
||||
</script>
|
||||
|
@ -9,10 +12,66 @@
|
|||
<CreateTableModal />
|
||||
</Modal>
|
||||
|
||||
<Layout>
|
||||
<Heading>Budibase Internal DB</Heading>
|
||||
|
||||
<section>
|
||||
<Layout>
|
||||
<header>
|
||||
<svelte:component
|
||||
this={ICONS.BUDIBASE}
|
||||
height="26"
|
||||
width="26"
|
||||
/>
|
||||
<Heading size="M">Budibase Internal</Heading>
|
||||
</header>
|
||||
<Body size="S" grey lh>Budibase internal tables are part of your app, the data will be stored in your apps context.</Body>
|
||||
<Divider />
|
||||
<Heading size="S">Tables</Heading>
|
||||
<div class="table-list">
|
||||
{#each $tables.list.filter(table => table.type !== "external") as table}
|
||||
<div class="table-list-item" on:click={$goto(`../../table/${table._id}`)}>
|
||||
<Body size="S">{table.name}</Body>
|
||||
<Body size="S">display column: {table.primaryDisplay}</Body>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<div>
|
||||
<Button cta on:click={modal.show}>Create new table</Button>
|
||||
</div>
|
||||
</Layout>
|
||||
</Layout>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
section {
|
||||
margin: 0 auto;
|
||||
width: 640px;
|
||||
}
|
||||
|
||||
header {
|
||||
margin: 0 0 var(--spacing-xs) 0;
|
||||
display: flex;
|
||||
gap: var(--spacing-l);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.table-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-m);
|
||||
}
|
||||
|
||||
.table-list-item {
|
||||
border-radius: var(--border-radius-m);
|
||||
background: var(--background);
|
||||
border: var(--border-dark);
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 0.75fr 20px;
|
||||
align-items: center;
|
||||
padding: var(--spacing-m);
|
||||
gap: var(--layout-xs);
|
||||
transition: 200ms background ease;
|
||||
}
|
||||
|
||||
.table-list-item:hover {
|
||||
background: var(--grey-1);
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue