chore(deps): update lint (#1928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
parent
2838e18ff7
commit
3c43a1cdd1
62 changed files with 464 additions and 434 deletions
|
@ -6,7 +6,7 @@ import type { ElkInstance } from '../users'
|
|||
import type { Mutable } from '~/types/utils'
|
||||
import type { UserLogin } from '~/types'
|
||||
|
||||
export const createMasto = () => {
|
||||
export function createMasto() {
|
||||
let client = $shallowRef<mastodon.Client>(undefined as never)
|
||||
let params = $ref<Mutable<CreateClientParams>>()
|
||||
const canStreaming = $computed(() => !!params?.streamingApiUrl)
|
||||
|
@ -26,8 +26,12 @@ export const createMasto = () => {
|
|||
}
|
||||
export type ElkMasto = ReturnType<typeof createMasto>
|
||||
|
||||
export const useMasto = () => useNuxtApp().$masto as ElkMasto
|
||||
export const useMastoClient = () => useMasto().client.value
|
||||
export function useMasto() {
|
||||
return useNuxtApp().$masto as ElkMasto
|
||||
}
|
||||
export function useMastoClient() {
|
||||
return useMasto().client.value
|
||||
}
|
||||
|
||||
export function mastoLogin(masto: ElkMasto, user: Pick<UserLogin, 'server' | 'token'>) {
|
||||
const { setParams } = $(masto)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue