1
0
Fork 0
mirror of synced 2024-07-06 15:00:49 +12:00

Merge branch 'feature/page-refactor' of github.com:Budibase/budibase into feature/page-refactor

This commit is contained in:
Martin McKeaveney 2020-12-08 10:32:52 +00:00
commit 3af1b7bad7
6 changed files with 11 additions and 20 deletions

View file

@ -76,10 +76,6 @@ export default {
{ src: "src/index.html", dest: outputpath }, { src: "src/index.html", dest: outputpath },
{ src: "src/favicon.png", dest: outputpath }, { src: "src/favicon.png", dest: outputpath },
{ src: "assets", dest: outputpath }, { src: "assets", dest: outputpath },
{
src: "node_modules/@budibase/client/dist/budibase-client.esm.mjs",
dest: outputpath,
},
{ {
src: "node_modules/@budibase/bbui/dist/bbui.css", src: "node_modules/@budibase/bbui/dist/bbui.css",
dest: outputpath, dest: outputpath,

View file

@ -69,13 +69,11 @@
</script> </script>
<div class="component-container"> <div class="component-container">
{#if $currentAsset} <iframe
<iframe style="height: 100%; width: 100%"
style="height: 100%; width: 100%" title="componentPreview"
title="componentPreview" bind:this={iframe}
bind:this={iframe} srcdoc={iframeTemplate} />
srcdoc={iframeTemplate} />
{/if}
</div> </div>
<style> <style>

View file

@ -1,12 +1,11 @@
<html> <html>
<head> <head>
<link rel="stylesheet" href="https://rsms.me/inter/inter.css"> <link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono">
<style> <style>
body, html { body, html {
height: 100% !important; height: 100% !important;
font-family: Inter !important; font-family: Inter, sans-serif !important;
margin: 0px !important; margin: 0 !important;
} }
*, *:before, *:after { *, *:before, *:after {
box-sizing: border-box; box-sizing: border-box;
@ -35,8 +34,6 @@
} }
} }
let selectedComponentStyle
// Ignore clicks // Ignore clicks
["click", "mousedown"].forEach(type => { ["click", "mousedown"].forEach(type => {
document.addEventListener(type, function(e) { document.addEventListener(type, function(e) {

View file

@ -3,7 +3,7 @@
"version": "0.3.8", "version": "0.3.8",
"license": "MPL-2.0", "license": "MPL-2.0",
"main": "dist/budibase-client.js", "main": "dist/budibase-client.js",
"module": "dist/budibase-client.esm.mjs", "module": "dist/budibase-client.js",
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",
"dev:builder": "rollup -cw" "dev:builder": "rollup -cw"

View file

@ -34,7 +34,7 @@ const createRouteStore = () => {
} }
const setActiveRoute = route => { const setActiveRoute = route => {
store.update(state => { store.update(state => {
state.activeRoute = route state.activeRoute = state.routes.find(x => x.path === route)
return state return state
}) })
} }

View file

@ -24,9 +24,9 @@ const createScreenStore = () => {
activeLayout = layouts[0] activeLayout = layouts[0]
if (screens.length === 1) { if (screens.length === 1) {
activeScreen = screens[0] activeScreen = screens[0]
} else { } else if ($routeStore.activeRoute) {
activeScreen = screens.find( activeScreen = screens.find(
screen => screen.routing.route === $routeStore.activeRoute screen => screen._id === $routeStore.activeRoute.screenId
) )
} }
if (activeScreen) { if (activeScreen) {