refactor: upgrade masto 5 (#867)

This commit is contained in:
三咲智子 Kevin Deng 2023-01-08 14:21:09 +08:00 committed by GitHub
parent 39034c5777
commit 5c8f75b9b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
108 changed files with 438 additions and 445 deletions

View file

@ -1,15 +1,15 @@
<script setup lang="ts">
import type { Status, StatusEdit } from 'masto'
import type { mastodon } from 'masto'
import { formatTimeAgo } from '@vueuse/core'
const { status } = defineProps<{
status: Status
status: mastodon.v1.Status
}>()
const masto = useMasto()
const { data: statusEdits } = useAsyncData(`status:history:${status.id}`, () => masto.statuses.fetchHistory(status.id).then(res => res.reverse()))
const { data: statusEdits } = useAsyncData(`status:history:${status.id}`, () => masto.v1.statuses.listHistory(status.id).then(res => res.reverse()))
const showHistory = (edit: StatusEdit) => {
const showHistory = (edit: mastodon.v1.StatusEdit) => {
openEditHistoryDialog(edit)
}
const timeAgoOptions = useTimeAgoOptions()

View file

@ -1,8 +1,8 @@
<script setup lang="ts">
import type { Status } from 'masto'
import type { mastodon } from 'masto'
const { status } = defineProps<{
status: Status
status: mastodon.v1.Status
inline: boolean
}>()

View file

@ -1,8 +1,8 @@
<script setup lang="ts">
import type { StatusEdit } from 'masto'
import type { mastodon } from 'masto'
const { edit } = defineProps<{
edit: StatusEdit
edit: mastodon.v1.StatusEdit
}>()
</script>