modal styling

This commit is contained in:
Martin McKeaveney 2020-03-22 13:59:42 +00:00
parent df100f503d
commit e58546729d
8 changed files with 48 additions and 49 deletions

View File

@ -110,7 +110,7 @@
background: #fafafa; background: #fafafa;
} }
.budibase__table th { .budibase__table thead > tr > th {
color: var(--button-text); color: var(--button-text);
text-transform: capitalize; text-transform: capitalize;
font-weight: 500; font-weight: 500;

View File

@ -41,6 +41,9 @@
{/if} {/if}
<slot /> <slot />
</div> </div>
<div class="uk-modal-footer">
<slot name="footer" />
</div>
</div> </div>
{/if} {/if}
</div> </div>
@ -52,5 +55,6 @@
height: 80vh; height: 80vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0;
} }
</style> </style>

View File

@ -39,9 +39,12 @@
<style> <style>
.root { .root {
display: flex; display: flex;
background: #fafafa;
width: 100%; width: 100%;
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
position: absolute;
bottom: 0;
left: 0;
background: #fafafa;
} }
.button-container { .button-container {

View File

@ -13,7 +13,7 @@
CreateEditModelModal, CreateEditModelModal,
CreateEditViewModal, CreateEditViewModal,
CreateDatabaseModal, CreateDatabaseModal,
DeleteRecordModal DeleteRecordModal,
} from "./ModelDataTable/modals" } from "./ModelDataTable/modals"
let selectedRecord let selectedRecord
@ -52,7 +52,6 @@
{/if} {/if}
</Modal> </Modal>
<div class="root"> <div class="root">
<div class="node-view"> <div class="node-view">
<div class="database-actions"> <div class="database-actions">
@ -66,7 +65,7 @@
primary primary
on:click={() => { on:click={() => {
selectedRecord = null selectedRecord = null
backendUiStore.actions.modals.show("RECORD") backendUiStore.actions.modals.show('RECORD')
}}> }}>
Create new record Create new record
</ActionButton> </ActionButton>

View File

@ -82,9 +82,3 @@
</div> </div>
</div> </div>
</div> </div>
<style>
.actions {
/* position: absolute; */
}
</style>

View File

@ -166,7 +166,6 @@
<style> <style>
.root { .root {
height: 100%; height: 100%;
padding: 2rem;
} }
.horizontal-stack { .horizontal-stack {

View File

@ -25,7 +25,9 @@
<div class="components-list-container"> <div class="components-list-container">
<div class="nav-group-header"> <div class="nav-group-header">
<div class="hierarchy-title">Databases</div> <div class="hierarchy-title">Databases</div>
<i class="ri-add-line hoverable" on:click={() => backendUiStore.actions.modals.show("DATABASE")} /> <i
class="ri-add-line hoverable"
on:click={() => backendUiStore.actions.modals.show('DATABASE')} />
</div> </div>
</div> </div>
@ -34,6 +36,7 @@
</div> </div>
</div> </div>
<hr /> <hr />
{#if $backendUiStore.selectedDatabase.id}
<div class="hierarchy"> <div class="hierarchy">
<div class="components-list-container"> <div class="components-list-container">
<div class="nav-group-header"> <div class="nav-group-header">
@ -48,6 +51,7 @@
<NavItem name="ACCESS_LEVELS" label="User Levels" /> <NavItem name="ACCESS_LEVELS" label="User Levels" />
</div> </div>
{/if}
</div> </div>
<style> <style>

View File

@ -1,5 +1,7 @@
<script> <script>
import { store } from "../builderStore" import { onMount } from "svelte"
import { store, backendUiStore } from "../builderStore"
import api from "../builderStore/api";
import getIcon from "../common/icon" import getIcon from "../common/icon"
import { CheckIcon } from "../common/Icons" import { CheckIcon } from "../common/Icons"
@ -8,34 +10,28 @@
return { name, props } return { name, props }
} }
const pages = [ let users = []
{
title: "Joe",
id: "joe",
},
{
title: "Mike",
id: "mike",
},
{
title: "Martin",
id: "martin",
},
]
store.setCurrentPage("main") $: currentAppInfo = {
appname: $store.appname,
instanceId: $backendUiStore.selectedDatabase.id
}
async function fetchUsers() {
const DELETE_RECORDS_URL = `/_builder/instance/${currentAppInfo.appname}/${currentAppInfo.instanceId}/api/users`
const response = await api.get(DELETE_RECORDS_URL);
users = await response.json()
}
onMount(fetchUsers)
</script> </script>
<div class="root"> <div class="root">
<ul> <ul>
{#each pages as { title, id }} {#each users as user}
<li> <li>
<i class="ri-user-4-line" /> <i class="ri-user-4-line" />
<button <button class:active={user.id === $store.currentUserId}>{user.name}</button>
class:active={id === $store.currentPageName}
on:click={() => store.setCurrentPage(id)}>
{title}
</button>
</li> </li>
{/each} {/each}
</ul> </ul>