feat: disable SSR
This commit is contained in:
parent
e59b3e5db2
commit
a6578155ae
29 changed files with 109 additions and 175 deletions
|
@ -1,10 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
const { currentUser } = $(useClientState())
|
||||
|
||||
const params = useRoute().params
|
||||
const id = computed(() => params.post as string)
|
||||
|
||||
const masto = await useMasto()
|
||||
const { data: status } = await useAsyncData(`${id}-status`, () => masto.statuses.fetch(params.post as string))
|
||||
const { data: context } = await useAsyncData(`${id}-context`, () => masto.statuses.fetchContext(params.post as string))
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@ const props = defineProps<{
|
|||
|
||||
const params = useRoute().params
|
||||
const user = $computed(() => params.user as string)
|
||||
const masto = await useMasto()
|
||||
|
||||
const { data: account } = await useAsyncData(`${user}:info`, () => masto.accounts.lookup({ acct: user }))
|
||||
const paginator = masto.accounts.getFollowersIterable(account.value!.id!, {})
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@ const props = defineProps<{
|
|||
|
||||
const params = useRoute().params
|
||||
const user = $computed(() => params.user as string)
|
||||
const masto = await useMasto()
|
||||
|
||||
const { data: account } = await useAsyncData(`${user}:info`, () => masto.accounts.lookup({ acct: user }))
|
||||
const paginator = masto.accounts.getFollowingIterable(account.value!.id!, {})
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@ const props = defineProps<{
|
|||
|
||||
const params = useRoute().params
|
||||
const user = $computed(() => params.user as string)
|
||||
const masto = await useMasto()
|
||||
|
||||
const { data: account } = await useAsyncData(`${user}:info`, () => masto.accounts.lookup({ acct: user }))
|
||||
|
||||
const tabNames = ['Posts', 'Posts and replies'] as const
|
||||
|
|
|
@ -3,7 +3,6 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const masto = await useMasto()
|
||||
const paginator = masto.bookmarks.getIterator()
|
||||
</script>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const masto = await useMasto()
|
||||
const paginator = masto.conversations.getIterator()
|
||||
</script>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const masto = await useMasto()
|
||||
const paginator = masto.trends.getStatuses()
|
||||
</script>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const masto = await useMasto()
|
||||
const paginator = masto.favourites.getIterator()
|
||||
</script>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const masto = await useMasto()
|
||||
const paginator = masto.timelines.getHomeIterable()
|
||||
</script>
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ definePageMeta({
|
|||
const { query } = useRoute()
|
||||
|
||||
onMounted(async () => {
|
||||
const { login } = useClientState()
|
||||
await login(query as any)
|
||||
await loginCallback(query as any)
|
||||
await nextTick()
|
||||
await nextTick()
|
||||
location.pathname = '/'
|
||||
|
|
|
@ -3,8 +3,6 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const masto = await useMasto()
|
||||
|
||||
const tabNames = ['All', 'Mentions'] as const
|
||||
const tab = $(useLocalStorage<typeof tabNames[number]>('nuxtodon-notifications-tab', 'All'))
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const masto = await useMasto()
|
||||
|
||||
const paginator = masto.timelines.getPublicIterable()
|
||||
</script>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ const router = useRouter()
|
|||
if (!token.value)
|
||||
router.replace('/public')
|
||||
|
||||
const masto = await useMasto()
|
||||
|
||||
const { data: timelines } = await useAsyncData('timelines-home', () => masto.timelines.fetchPublic({ local: true }).then(r => r.value))
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
const params = useRoute().params
|
||||
const tag = $computed(() => params.tag as string)
|
||||
const masto = await useMasto()
|
||||
|
||||
const paginator = masto.timelines.getHashtagIterable(tag)
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue