Files
AstralRinth/pages/auth/welcome.vue
falseresync 0ffe8ef102 Refine the auth design; clean up the layout and styles there (#1240)
* Refine the auth design; clean up the layout and styles there

* It doesn't really sing, does it

* Tweak auth form spacing and wording

* Final tweaks to improved auth design

* Merge

* fix lockfile

---------

Co-authored-by: Prospector <prospectordev@gmail.com>
2023-08-18 12:00:44 -07:00

59 lines
1.3 KiB
Vue

<template>
<div>
<h1>Welcome to Modrinth!</h1>
<section class="auth-form">
<p>
Thank you for creating an account. You can now follow and create projects, receive updates
about your favorite projects, and more!
</p>
<Checkbox
v-model="subscribe"
class="subscribe-btn"
label="Subscribe to updates about Modrinth"
/>
<button class="btn btn-primary continue-btn centered-btn" @click="continueSignUp">
Continue <RightArrowIcon />
</button>
<p>
By creating an account, you have agreed to Modrinth's
<NuxtLink to="/legal/terms" class="text-link">Terms</NuxtLink> and
<NuxtLink to="/legal/privacy" class="text-link">Privacy Policy</NuxtLink>.
</p>
</section>
</div>
</template>
<script setup>
import { Checkbox, RightArrowIcon } from 'omorphia'
useHead({
title: 'Welcome - Modrinth',
})
const subscribe = ref(true)
async function continueSignUp() {
const route = useRoute()
await useAuth(route.query.authToken)
await useUser()
if (subscribe.value) {
try {
await useBaseFetch('auth/email/subscribe', {
method: 'POST',
})
} catch {}
}
if (route.query.redirect) {
await navigateTo(route.query.redirect)
} else {
await navigateTo('/dashboard')
}
}
</script>