2019-07-13 11:35:57 +02:00
|
|
|
<script>
|
2020-02-03 10:50:30 +01:00
|
|
|
import IconButton from "./common/IconButton.svelte"
|
|
|
|
import { store } from "./builderStore"
|
|
|
|
import UserInterfaceRoot from "./userInterface/UserInterfaceRoot.svelte"
|
|
|
|
import BackendRoot from "./BackendRoot.svelte"
|
|
|
|
import { fade } from "svelte/transition"
|
2020-03-07 14:02:54 +01:00
|
|
|
import { SettingsIcon, PreviewIcon, HelpIcon } from "./common/Icons/"
|
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
</script>
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
<div class="root">
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
<div class="top-nav">
|
2020-03-07 14:02:54 +01:00
|
|
|
<div class="topleftnav">
|
2020-02-03 10:50:30 +01:00
|
|
|
<button class="home-logo">
|
2020-03-07 14:02:54 +01:00
|
|
|
<img src="/_builder/assets/budibase-emblem-white.svg" />
|
|
|
|
</button>
|
|
|
|
<!-- <IconButton icon="home"
|
|
|
|
color="var(--slate)"
|
|
|
|
hoverColor="var(--secondary75)"/> -->
|
|
|
|
<span
|
|
|
|
class:active={$store.isBackend}
|
|
|
|
class="topnavitem"
|
|
|
|
on:click={store.showBackend}>
|
|
|
|
Backend
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class:active={!$store.isBackend}
|
|
|
|
class="topnavitem"
|
|
|
|
on:click={store.showFrontend}>
|
|
|
|
Frontend
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="toprightnav">
|
|
|
|
<span
|
|
|
|
class:active={!$store.isBackend}
|
|
|
|
class="topnavitemright"
|
|
|
|
on:click={store.showFrontend}>
|
|
|
|
<SettingsIcon />
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class:active={!$store.isBackend}
|
|
|
|
class="topnavitemright"
|
|
|
|
on:click={store.showFrontend}>
|
|
|
|
<PreviewIcon />
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-02-03 10:50:30 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
{#if $store.isBackend}
|
|
|
|
<div in:fade out:fade>
|
|
|
|
<BackendRoot />
|
|
|
|
</div>
|
|
|
|
{:else}
|
|
|
|
<div in:fade out:fade>
|
|
|
|
<UserInterfaceRoot />
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
</div>
|
2020-01-20 14:45:00 +01:00
|
|
|
|
2019-07-13 11:35:57 +02:00
|
|
|
</div>
|
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
<style>
|
2020-02-03 10:50:30 +01:00
|
|
|
.root {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
2019-08-30 09:25:00 +02:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2020-01-20 15:12:29 +01:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.top-nav {
|
2019-08-30 09:25:00 +02:00
|
|
|
flex: 0 0 auto;
|
2020-01-20 14:45:00 +01:00
|
|
|
height: 48px;
|
2020-03-07 14:02:54 +01:00
|
|
|
background: #0d203b;
|
2020-03-07 14:04:23 +01:00
|
|
|
padding: 0px 20px 0 20px;
|
2020-01-20 14:45:00 +01:00
|
|
|
display: flex;
|
2020-02-24 22:31:35 +01:00
|
|
|
box-sizing: border-box;
|
2020-03-07 14:02:54 +01:00
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.content {
|
2019-08-30 09:25:00 +02:00
|
|
|
flex: 1 1 auto;
|
|
|
|
width: 100%;
|
|
|
|
height: 100px;
|
2020-02-24 22:31:35 +01:00
|
|
|
overflow: hidden;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2019-08-20 08:24:02 +02:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.content > div {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2019-08-20 08:24:02 +02:00
|
|
|
|
2020-03-07 14:02:54 +01:00
|
|
|
.toprightnav {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.topleftnav {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.topnavitem {
|
2019-08-20 08:24:02 +02:00
|
|
|
cursor: pointer;
|
2020-03-07 14:02:54 +01:00
|
|
|
color: rgb(255, 255, 255, 0.6);
|
|
|
|
margin: 0px 10px;
|
2020-01-20 14:45:00 +01:00
|
|
|
padding-top: 4px;
|
2020-03-07 14:02:54 +01:00
|
|
|
font-weight: 500;
|
2020-01-20 14:45:00 +01:00
|
|
|
font-size: 1rem;
|
|
|
|
height: 100%;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.topnavitem:hover {
|
2020-03-07 14:02:54 +01:00
|
|
|
color: rgb(255, 255, 255, 0.8);
|
|
|
|
font-weight: 500;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2019-09-23 23:22:57 +02:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.active {
|
2020-03-07 14:02:54 +01:00
|
|
|
color: white;
|
2020-01-20 14:45:00 +01:00
|
|
|
font-weight: 600;
|
2020-03-07 14:02:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.topnavitemright {
|
|
|
|
cursor: pointer;
|
|
|
|
color: rgb(255, 255, 255, 0.6);
|
|
|
|
margin: 0px 5px;
|
|
|
|
padding-top: 4px;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 1rem;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex:1;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
.topnavitemright:hover {
|
|
|
|
color: rgb(255, 255, 255, 0.8);
|
|
|
|
font-weight: 500;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2019-08-30 09:25:00 +02:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.home-logo {
|
2020-01-20 14:45:00 +01:00
|
|
|
border-style: none;
|
2020-02-03 10:50:30 +01:00
|
|
|
background-color: rgba(0, 0, 0, 0);
|
2020-01-20 14:45:00 +01:00
|
|
|
cursor: pointer;
|
|
|
|
outline: none;
|
|
|
|
height: 40px;
|
2020-02-20 18:11:41 +01:00
|
|
|
padding: 8px 10px 8px 0;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2020-01-20 14:45:00 +01:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.home-logo:hover {
|
2020-01-20 14:45:00 +01:00
|
|
|
color: var(--hovercolor);
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2020-01-20 14:45:00 +01:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.home-logo:active {
|
|
|
|
outline: none;
|
|
|
|
}
|
2020-01-20 14:45:00 +01:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
.home-logo img {
|
2020-01-20 14:45:00 +01:00
|
|
|
height: 100%;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
2020-01-20 14:45:00 +01:00
|
|
|
</style>
|