2019-07-13 11:35:57 +02:00
|
|
|
<script>
|
|
|
|
|
|
|
|
import NoPackage from "./NoPackage.svelte";
|
|
|
|
import PackageRoot from "./PackageRoot.svelte";
|
2019-09-23 01:56:39 +02:00
|
|
|
import Settings from "./Settings.svelte";
|
2019-07-31 09:09:04 +02:00
|
|
|
import {store, initialise} from "./builderStore";
|
2019-07-13 11:35:57 +02:00
|
|
|
import { onMount } from 'svelte';
|
2019-09-23 01:56:39 +02:00
|
|
|
import IconButton from "./common/IconButton.svelte";
|
|
|
|
|
2019-07-13 11:35:57 +02:00
|
|
|
let init = initialise();
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<main>
|
|
|
|
|
|
|
|
{#await init}
|
|
|
|
|
|
|
|
<h1>loading</h1>
|
|
|
|
|
|
|
|
{:then result}
|
2019-09-23 01:56:39 +02:00
|
|
|
{#if $store.showSettings}
|
|
|
|
<Settings />
|
|
|
|
{:else}
|
|
|
|
{#if $store.hasAppPackage}
|
|
|
|
<PackageRoot />
|
|
|
|
|
|
|
|
{:else}
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-09-23 01:56:39 +02:00
|
|
|
<NoPackage />
|
|
|
|
{/if}
|
2019-07-13 11:35:57 +02:00
|
|
|
{/if}
|
|
|
|
|
|
|
|
{:catch err}
|
|
|
|
<h1 style="color:red">{err}</h1>
|
|
|
|
{/await}
|
2019-09-23 01:56:39 +02:00
|
|
|
|
|
|
|
<div class="settings">
|
|
|
|
<IconButton icon="settings"
|
|
|
|
on:click={store.showSettings}/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{#if $store.useAnalytics}
|
|
|
|
<iframe src="https://marblekirby.github.io/bb-analytics.html" width="0" height="0" style="visibility:hidden;display:none"/>
|
|
|
|
{/if}
|
2019-07-13 11:35:57 +02:00
|
|
|
</main>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
main {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
2019-09-18 20:16:11 +02:00
|
|
|
font-family: "Roboto", Helvetica, Arial, sans-serif;
|
2019-07-13 11:35:57 +02:00
|
|
|
}
|
2019-09-23 01:56:39 +02:00
|
|
|
|
|
|
|
.settings {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 25px;
|
|
|
|
right: 25px;
|
|
|
|
}
|
2019-07-13 11:35:57 +02:00
|
|
|
</style>
|