Tidy up
This commit is contained in:
parent
f7d5456e72
commit
34a0c77d73
|
@ -63,10 +63,10 @@
|
||||||
|
|
||||||
// If using devtools, find the first screen matching our role
|
// If using devtools, find the first screen matching our role
|
||||||
if ($devToolsStore.role) {
|
if ($devToolsStore.role) {
|
||||||
firstRoute =
|
const roleRoutes = $screenStore.screens.filter(
|
||||||
$screenStore.screens.filter(
|
|
||||||
screen => screen.routing?.roleId === $devToolsStore.role
|
screen => screen.routing?.roleId === $devToolsStore.role
|
||||||
)[0]?.routing?.route || "/"
|
)
|
||||||
|
firstRoute = roleRoutes[0]?.routing?.route || "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise just use the fist route
|
// Otherwise just use the fist route
|
||||||
|
@ -164,12 +164,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Selection indicators should be bounded by device -->
|
<!-- Preview and dev tools utilities -->
|
||||||
<!--
|
{#if $appStore.isDevApp}
|
||||||
We don't want to key these by componentID as they control their own
|
|
||||||
re-mounting to avoid flashes.
|
|
||||||
-->
|
|
||||||
<SelectionIndicator />
|
<SelectionIndicator />
|
||||||
|
{/if}
|
||||||
{#if $builderStore.inBuilder || $devToolsStore.allowSelection}
|
{#if $builderStore.inBuilder || $devToolsStore.allowSelection}
|
||||||
<HoverIndicator />
|
<HoverIndicator />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -219,6 +217,7 @@
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app-body {
|
#app-body {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -70,7 +70,7 @@ module.exports = async (ctx, next) => {
|
||||||
const isDevApp = appId && isDevAppID(appId)
|
const isDevApp = appId && isDevAppID(appId)
|
||||||
const roleHeader = ctx.request.headers[Headers.PREVIEW_ROLE]
|
const roleHeader = ctx.request.headers[Headers.PREVIEW_ROLE]
|
||||||
if (isBuilder && isDevApp && roleHeader) {
|
if (isBuilder && isDevApp && roleHeader) {
|
||||||
// Ensure the role is valid ensuring a definition exists
|
// Ensure the role is valid by ensuring a definition exists
|
||||||
try {
|
try {
|
||||||
await getRole(roleHeader)
|
await getRole(roleHeader)
|
||||||
roleId = roleHeader
|
roleId = roleHeader
|
||||||
|
|
Loading…
Reference in New Issue