refactor: ♻️ Rewrite code page

This commit is contained in:
Jesse Wierzbinski 2024-12-02 23:03:38 +01:00
parent 5b3e9ce8b3
commit 8d618d5e7f
No known key found for this signature in database
2 changed files with 20 additions and 61 deletions

View file

@ -1,28 +1,28 @@
<template>
<div class="flex min-h-screen relative flex-col justify-center px-6 py-12 lg:px-8">
<div class="mx-auto max-w-md mt-10">
<h1 class="text-2xl font-bold tracking-tight text-gray-50 sm:text-4xl">Here's your code
</h1>
<p class="mt-6 text-lg leading-8 text-gray-300">You have signed in successfully. Your code is
</p>
<div class="prose prose-invert select-all mt-6">
<pre
class="overflow-x-hidden whitespace-normal break-all bg-dark-500 ring-1 ring-white/10"><code class="text-wrap max-w-full">{{ code }}</code></pre>
</div>
<p class="mt-6 text-lg leading-8 text-gray-300">Paste this code into the application you are signing in
to.
</p>
<p class="mt-6 text-lg leading-8 text-gray-300">
Found a problem? Report it on <a href="https://github.com/versia-pub/server/issues/new/choose"
target="_blank" class="underline text-primary2-700">the issue tracker</a>.
</p>
</div>
<div class="h-svh flex items-center justify-center px-4">
<Card class="w-full max-w-md">
<CardHeader>
<CardTitle>Here's your code</CardTitle>
<CardDescription>You have signed in successfully.<br />Paste the following code into your app:
</CardDescription>
</CardHeader>
<CardContent class="grid">
<code
class="rounded bg-muted px-4 py-2 border text-center w-full font-mono text-sm font-semibold select-all">{{ code }}</code>
</CardContent>
</Card>
</div>
</template>
<script setup lang="ts">
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "~/components/ui/card";
const params = useUrlSearchParams();
const code = params.code;