Import image assets as needed to allow proper bundling

This commit is contained in:
Andrew Kingston 2021-03-31 19:58:30 +01:00
parent 183e33ae82
commit 17c06cfb84
7 changed files with 14 additions and 12 deletions

View File

@ -1,11 +1,12 @@
<script> <script>
import Spinner from "components/common/Spinner.svelte" import Spinner from "components/common/Spinner.svelte"
import { fade } from "svelte/transition" import { fade } from "svelte/transition"
import Logo from "/assets/bb-logo.svg"
</script> </script>
<div class="ag-overlay-loading-center loading-container"> <div class="ag-overlay-loading-center loading-container">
<div transition:fade class="loading-overlay"> <div transition:fade class="loading-overlay">
<img height="30" width="30" src="/assets/bb-logo.svg" alt="Budibase icon" /> <img height="30" width="30" src={Logo} alt="Budibase icon" />
<span> Loading Your Data </span> <span> Loading Your Data </span>
<Spinner size="12" /> <Spinner size="12" />
</div> </div>

View File

@ -19,6 +19,7 @@
import { post } from "builderStore/api" import { post } from "builderStore/api"
import analytics from "analytics" import analytics from "analytics"
import { onMount } from "svelte" import { onMount } from "svelte"
import Logo from "/assets/bb-logo.svg"
//Move this to context="module" once svelte-forms is updated so that it can bind to stores correctly //Move this to context="module" once svelte-forms is updated so that it can bind to stores correctly
const createAppStore = writable({ currentStep: 0, values: {} }) const createAppStore = writable({ currentStep: 0, values: {} })
@ -242,7 +243,7 @@
{/if} {/if}
</div> </div>
</div> </div>
<img src="/assets/bb-logo.svg" alt="budibase icon" /> <img src={Logo} alt="budibase icon" />
{#if submitting} {#if submitting}
<div in:fade class="spinner-container"> <div in:fade class="spinner-container">
<Spinner /> <Spinner />

View File

@ -6,6 +6,7 @@
import FeedbackNavLink from "components/feedback/FeedbackNavLink.svelte" import FeedbackNavLink from "components/feedback/FeedbackNavLink.svelte"
import { get } from "builderStore/api" import { get } from "builderStore/api"
import { isActive, goto, layout } from "@roxi/routify" import { isActive, goto, layout } from "@roxi/routify"
import Logo from "/assets/bb-logo.svg"
// Get Package and set store // Get Package and set store
export let application export let application
@ -49,7 +50,7 @@
<div class="topleftnav"> <div class="topleftnav">
<button class="home-logo"> <button class="home-logo">
<img <img
src="/assets/bb-logo.svg" src={Logo}
alt="budibase icon" alt="budibase icon"
on:click={() => $goto(`/builder/`)} /> on:click={() => $goto(`/builder/`)} />
</button> </button>

View File

@ -1,13 +1,12 @@
<script> <script>
import { onMount } from "svelte" import { Button, Modal } from "@budibase/bbui"
import { Button, Spacer, Modal } from "@budibase/bbui"
import { store, hostingStore } from "builderStore" import { store, hostingStore } from "builderStore"
import { notifier } from "builderStore/store/notifications" import { notifier } from "builderStore/store/notifications"
import api from "builderStore/api" import api from "builderStore/api"
import Spinner from "components/common/Spinner.svelte"
import DeploymentHistory from "components/deploy/DeploymentHistory.svelte" import DeploymentHistory from "components/deploy/DeploymentHistory.svelte"
import analytics from "analytics" import analytics from "analytics"
import FeedbackIframe from "components/feedback/FeedbackIframe.svelte" import FeedbackIframe from "components/feedback/FeedbackIframe.svelte"
import Rocket from "/assets/deploy-rocket.jpg"
let loading = false let loading = false
let deployments = [] let deployments = []
@ -63,7 +62,7 @@
<h4>It's time to shine!</h4> <h4>It's time to shine!</h4>
<Button secondary medium on:click={deployApp}>Deploy App</Button> <Button secondary medium on:click={deployApp}>Deploy App</Button>
</div> </div>
<img src="/assets/deploy-rocket.jpg" alt="Rocket flying through sky" /> <img src={Rocket} alt="Rocket flying through sky" />
</section> </section>
<Modal bind:this={feedbackModal}> <Modal bind:this={feedbackModal}>
<FeedbackIframe on:finished={() => feedbackModal.hide()} /> <FeedbackIframe on:finished={() => feedbackModal.hide()} />

View File

@ -8,16 +8,14 @@
BugIcon, BugIcon,
} from "components/common/Icons" } from "components/common/Icons"
import BuilderSettingsButton from "components/start/BuilderSettingsButton.svelte" import BuilderSettingsButton from "components/start/BuilderSettingsButton.svelte"
import Logo from "/assets/budibase-logo.svg"
let modal let modal
</script> </script>
<div class="root"> <div class="root">
<div class="ui-nav"> <div class="ui-nav">
<div class="home-logo"> <div class="home-logo"><img src={Logo} alt="Budibase icon" /></div>
<img src="/assets/budibase-logo.svg" alt="Budibase icon" />
</div>
<div class="nav-section"> <div class="nav-section">
<div class="nav-top"> <div class="nav-top">
<Link icon={AppsIcon} title="Apps" href="/" active /> <Link icon={AppsIcon} title="Apps" href="/" active />

View File

@ -6,6 +6,7 @@
import { Button, Heading, Modal, Spacer } from "@budibase/bbui" import { Button, Heading, Modal, Spacer } from "@budibase/bbui"
import TemplateList from "components/start/TemplateList.svelte" import TemplateList from "components/start/TemplateList.svelte"
import analytics from "analytics" import analytics from "analytics"
import Banner from "/assets/orange-landscape.png"
let hasKey let hasKey
let template let template
@ -65,7 +66,7 @@
</div> </div>
<div class="banner"> <div class="banner">
<img src="/assets/orange-landscape.png" alt="rocket" /> <img src={Banner} alt="rocket" />
<div class="banner-content"> <div class="banner-content">
Every accomplishment starts with a decision to try. Every accomplishment starts with a decision to try.
</div> </div>

View File

@ -9,6 +9,7 @@ export default ({ mode }) => {
base: "/builder/", base: "/builder/",
build: { build: {
minify: isProduction, minify: isProduction,
outDir: "../server/builder",
}, },
plugins: [ plugins: [
svelte({ svelte({