Update style of component selection list and improve routing redirects
This commit is contained in:
parent
943dcc7afa
commit
70624a4d97
|
@ -134,7 +134,9 @@
|
|||
gap: var(--spacing-s);
|
||||
padding-top: 4px;
|
||||
transition: background 130ms ease-out;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.component :global(.spectrum-Body) {
|
||||
line-height: 1.2 !important;
|
||||
}
|
||||
.component:hover {
|
||||
cursor: pointer;
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<script>
|
||||
import { store } from "builderStore"
|
||||
import { store, selectedScreen } from "builderStore"
|
||||
import { onMount } from "svelte"
|
||||
import { redirect } from "@roxi/routify"
|
||||
|
||||
let loaded = false
|
||||
|
||||
onMount(() => {
|
||||
if ($store.screens?.length) {
|
||||
if ($selectedScreen) {
|
||||
$redirect(`./${$selectedScreen._id}`)
|
||||
} else if ($store.screens?.length) {
|
||||
$redirect(`./${$store.screens[0]._id}`)
|
||||
} else {
|
||||
loaded = true
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<script>
|
||||
import { store } from "builderStore"
|
||||
import { store, selectedScreen } from "builderStore"
|
||||
import { onMount } from "svelte"
|
||||
import { redirect } from "@roxi/routify"
|
||||
|
||||
let loaded = false
|
||||
|
||||
onMount(() => {
|
||||
if ($store.screens?.length) {
|
||||
if ($selectedScreen) {
|
||||
$redirect(`./${$selectedScreen._id}`)
|
||||
} else if ($store.screens?.length) {
|
||||
$redirect(`./${$store.screens[0]._id}`)
|
||||
} else {
|
||||
loaded = true
|
||||
|
|
Loading…
Reference in New Issue