Update config checklist to be mobile friendly

This commit is contained in:
Andrew Kingston 2021-09-14 12:32:04 +01:00
parent 11962bb5fa
commit 0b5669efdc
1 changed files with 21 additions and 2 deletions

View File

@ -8,9 +8,28 @@
} from "@budibase/bbui" } from "@budibase/bbui"
import { admin } from "stores/portal" import { admin } from "stores/portal"
import { goto } from "@roxi/routify" import { goto } from "@roxi/routify"
import { onMount } from "svelte"
let width = window.innerWidth
$: side = width < 500 ? "right" : "left"
const resizeObserver = new ResizeObserver(entries => {
if (entries?.[0]) {
width = entries[0].contentRect?.width
}
})
onMount(() => {
const doc = document.documentElement
resizeObserver.observe(doc)
return () => {
resizeObserver.unobserve(doc)
}
})
</script> </script>
<ActionMenu> <ActionMenu align={side}>
<div slot="control" class="icon"> <div slot="control" class="icon">
<ProgressCircle size="S" value={$admin.onboardingProgress} /> <ProgressCircle size="S" value={$admin.onboardingProgress} />
</div> </div>
@ -37,7 +56,7 @@
.item { .item {
display: grid; display: grid;
align-items: center; align-items: center;
grid-template-columns: 200px 20px; grid-template-columns: 175px 20px;
} }
.icon { .icon {
cursor: pointer; cursor: pointer;