chore: migrate legacy pages and utilities to nuxt

This commit is contained in:
Tim
2025-08-07 20:21:22 +08:00
parent 73b9dcf0cd
commit 565678f79a
49 changed files with 7894 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
<template>
<CallbackPage />
</template>
<script>
import CallbackPage from '../components/CallbackPage.vue'
import { githubExchange } from '../utils/github'
export default {
name: 'GithubCallbackPageView',
components: { CallbackPage },
async mounted() {
const url = new URL(window.location.href)
const code = url.searchParams.get('code')
const state = url.searchParams.get('state')
const result = await githubExchange(code, state, '')
if (result.needReason) {
this.$router.push('/signup-reason?token=' + result.token)
} else {
this.$router.push('/')
}
}
}
</script>