feat: upgrade to masto.js v6 (#2530)
This commit is contained in:
parent
d8ea685803
commit
6c5bb83ac3
62 changed files with 262 additions and 263 deletions
|
@ -22,7 +22,7 @@ const { data: status, pending, refresh: refreshStatus } = useAsyncData(
|
|||
const { client } = $(useMasto())
|
||||
const { data: context, pending: pendingContext, refresh: refreshContext } = useAsyncData(
|
||||
`context:${id}`,
|
||||
async () => client.v1.statuses.fetchContext(id),
|
||||
async () => client.v1.statuses.$select(id).context.fetch(),
|
||||
{ watch: [isHydrated], immediate: isHydrated.value, lazy: true, default: () => shallowRef() },
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ const handle = $(computedEager(() => params.account as string))
|
|||
definePageMeta({ name: 'account-followers' })
|
||||
|
||||
const account = await fetchAccountByHandle(handle)
|
||||
const paginator = account ? useMastoClient().v1.accounts.listFollowers(account.id, {}) : null
|
||||
const paginator = account ? useMastoClient().v1.accounts.$select(account.id).followers.list() : null
|
||||
|
||||
const isSelf = useSelfAccount(account)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ const handle = $(computedEager(() => params.account as string))
|
|||
definePageMeta({ name: 'account-following' })
|
||||
|
||||
const account = await fetchAccountByHandle(handle)
|
||||
const paginator = account ? useMastoClient().v1.accounts.listFollowing(account.id, {}) : null
|
||||
const paginator = account ? useMastoClient().v1.accounts.$select(account.id).following.list() : null
|
||||
|
||||
const isSelf = useSelfAccount(account)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ function reorderAndFilter(items: mastodon.v1.Status[]) {
|
|||
return reorderedTimeline(items, 'account')
|
||||
}
|
||||
|
||||
const paginator = useMastoClient().v1.accounts.listStatuses(account.id, { limit: 30, excludeReplies: true })
|
||||
const paginator = useMastoClient().v1.accounts.$select(account.id).statuses.list({ limit: 30, excludeReplies: true })
|
||||
|
||||
if (account) {
|
||||
useHydratedHead({
|
||||
|
|
|
@ -7,7 +7,7 @@ const handle = $(computedEager(() => params.account as string))
|
|||
|
||||
const account = await fetchAccountByHandle(handle)
|
||||
|
||||
const paginator = useMastoClient().v1.accounts.listStatuses(account.id, { onlyMedia: true, excludeReplies: false })
|
||||
const paginator = useMastoClient().v1.accounts.$select(account.id).statuses.list({ onlyMedia: true, excludeReplies: false })
|
||||
|
||||
if (account) {
|
||||
useHydratedHead({
|
||||
|
|
|
@ -7,7 +7,7 @@ const handle = $(computedEager(() => params.account as string))
|
|||
|
||||
const account = await fetchAccountByHandle(handle)
|
||||
|
||||
const paginator = useMastoClient().v1.accounts.listStatuses(account.id, { excludeReplies: false })
|
||||
const paginator = useMastoClient().v1.accounts.$select(account.id).statuses.list({ excludeReplies: false })
|
||||
|
||||
if (account) {
|
||||
useHydratedHead({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue