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