You've already forked AstralRinth
forked from didirus/AstralRinth
* feat: base api-client impl * fix: doc * feat: start work on module stuff * feat: migrate v2/v3 projects into module system * fix: lint & README.md contributing * refactor: remove utils old api client prototype * fix: lint * fix: api url issues * fix: baseurl in error.vue * fix: readme * fix typo in readme * Update apps/frontend/src/providers/api-client.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Calum H. <hendersoncal117@gmail.com> * Update packages/api-client/src/features/verbose-logging.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Calum H. <hendersoncal117@gmail.com> * Update packages/api-client/src/features/retry.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Calum H. <hendersoncal117@gmail.com> --------- Signed-off-by: Calum H. <hendersoncal117@gmail.com> Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
28 lines
864 B
Vue
28 lines
864 B
Vue
<template>
|
|
<NuxtLayout>
|
|
<ModrinthLoadingIndicator />
|
|
<NotificationPanel />
|
|
<NuxtPage />
|
|
</NuxtLayout>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { NotificationPanel, provideNotificationManager } from '@modrinth/ui'
|
|
|
|
import ModrinthLoadingIndicator from '~/components/ui/modrinth-loading-indicator.ts'
|
|
|
|
import { createModrinthClient, provideModrinthClient } from './providers/api-client.ts'
|
|
import { FrontendNotificationManager } from './providers/frontend-notifications.ts'
|
|
|
|
const auth = await useAuth()
|
|
const config = useRuntimeConfig()
|
|
|
|
provideNotificationManager(new FrontendNotificationManager())
|
|
|
|
const client = createModrinthClient(auth.value, {
|
|
apiBaseUrl: config.public.apiBaseUrl.replace('/v2/', '/'),
|
|
archonBaseUrl: config.public.pyroBaseUrl.replace('/v2/', '/'),
|
|
rateLimitKey: config.rateLimitKey,
|
|
})
|
|
provideModrinthClient(client)
|
|
</script>
|