feat: render app shell with ssr to improve loading experience (#448)
This commit is contained in:
parent
b545efeacc
commit
9395b7031e
35 changed files with 169 additions and 127 deletions
|
@ -1,12 +1,11 @@
|
|||
import type { Ref } from 'vue'
|
||||
import type { Account, MastoClient, Relationship, Status } from 'masto'
|
||||
import type { Account, Relationship, Status } from 'masto'
|
||||
import { withoutProtocol } from 'ufo'
|
||||
import type { ElkMasto } from '~/types'
|
||||
|
||||
export const useMasto = () => useNuxtApp().$masto.api as MastoClient
|
||||
export const useMasto = () => useNuxtApp().$masto as ElkMasto
|
||||
|
||||
export const setMasto = (masto: MastoClient) => {
|
||||
useNuxtApp().$masto?.replace(masto)
|
||||
}
|
||||
export const isMastoInitialised = computed(() => process.client && useMasto().loggedIn.value)
|
||||
|
||||
// @unocss-include
|
||||
export const STATUS_VISIBILITIES = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue