modal styling

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

View File

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

View File

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

View File

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

View File

@ -13,7 +13,7 @@
CreateEditModelModal,
CreateEditViewModal,
CreateDatabaseModal,
DeleteRecordModal
DeleteRecordModal,
} from "./ModelDataTable/modals"
let selectedRecord
@ -52,21 +52,20 @@
{/if}
</Modal>
<div class="root">
<div class="node-view">
<div class="database-actions">
<div class="budibase__label--big">
{#if $backendUiStore.selectedDatabase.name}
{$backendUiStore.selectedDatabase.name} {breadcrumbs}
{$backendUiStore.selectedDatabase.name} {breadcrumbs}
{/if}
</div>
</div>
{#if $backendUiStore.selectedDatabase.id}
<ActionButton
primary
on:click={() => {
selectedRecord = null
backendUiStore.actions.modals.show("RECORD")
backendUiStore.actions.modals.show('RECORD')
}}>
Create new record
</ActionButton>

View File

@ -81,10 +81,4 @@
</ActionButton>
</div>
</div>
</div>
<style>
.actions {
/* position: absolute; */
}
</style>
</div>

View File

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

View File

@ -25,7 +25,9 @@
<div class="components-list-container">
<div class="nav-group-header">
<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>
@ -34,20 +36,22 @@
</div>
</div>
<hr />
<div class="hierarchy">
<div class="components-list-container">
<div class="nav-group-header">
<div class="hierarchy-title">Users</div>
<i class="ri-add-line" />
{#if $backendUiStore.selectedDatabase.id}
<div class="hierarchy">
<div class="components-list-container">
<div class="nav-group-header">
<div class="hierarchy-title">Users</div>
<i class="ri-add-line" />
</div>
</div>
</div>
<div class="hierarchy-items-container">
<UsersList />
</div>
<div class="hierarchy-items-container">
<UsersList />
</div>
<NavItem name="ACCESS_LEVELS" label="User Levels" />
</div>
<NavItem name="ACCESS_LEVELS" label="User Levels" />
</div>
{/if}
</div>
<style>

View File

@ -1,5 +1,7 @@
<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 { CheckIcon } from "../common/Icons"
@ -8,34 +10,28 @@
return { name, props }
}
const pages = [
{
title: "Joe",
id: "joe",
},
{
title: "Mike",
id: "mike",
},
{
title: "Martin",
id: "martin",
},
]
let users = []
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>
<div class="root">
<ul>
{#each pages as { title, id }}
{#each users as user}
<li>
<i class="ri-user-4-line" />
<button
class:active={id === $store.currentPageName}
on:click={() => store.setCurrentPage(id)}>
{title}
</button>
<button class:active={user.id === $store.currentUserId}>{user.name}</button>
</li>
{/each}
</ul>