Improve app list styles
This commit is contained in:
parent
5a642071d6
commit
6958e860ef
|
@ -13,13 +13,13 @@
|
|||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<div>No apps</div>
|
||||
<div>No apps found.</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.appList {
|
||||
display: grid;
|
||||
grid-gap: 50px;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
}
|
||||
const userResp = await api.post(`/api/users/metadata/self`, user)
|
||||
await userResp.json()
|
||||
$goto(`./${appJson._id}`)
|
||||
$goto(`/app/builder/${appJson._id}/design`)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
notifications.error(error)
|
||||
|
|
|
@ -4,24 +4,28 @@
|
|||
import { auth } from "stores/backend"
|
||||
import { admin } from "stores/portal"
|
||||
|
||||
let checked = false
|
||||
let loaded = false
|
||||
$: hasAdminUser = !!$admin?.checklist?.adminUser
|
||||
|
||||
onMount(async () => {
|
||||
await admin.init()
|
||||
await auth.checkAuth()
|
||||
if (!$admin?.checklist?.adminUser) {
|
||||
loaded = true
|
||||
|
||||
// Force creation of an admin user if one doesn't exist
|
||||
if (!hasAdminUser) {
|
||||
$goto("./admin")
|
||||
}
|
||||
checked = true
|
||||
})
|
||||
|
||||
// Redirect to log in at any time if the user isn't authenticated
|
||||
$: {
|
||||
if (checked && !$auth.user) {
|
||||
if (loaded && hasAdminUser && !$auth.user) {
|
||||
$goto("./auth/login")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if checked}
|
||||
{#if loaded}
|
||||
<slot />
|
||||
{/if}
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
{#if layout === "grid"}
|
||||
<AppList />
|
||||
{:else}
|
||||
Table
|
||||
Table view.
|
||||
{/if}
|
||||
</Layout>
|
||||
<Modal
|
||||
|
|
Loading…
Reference in New Issue