show qr code in share link and add version to footer

This commit is contained in:
Milo Schwartz
2024-12-24 12:06:13 -05:00
parent 9e50a580a5
commit ccc2e3358c
8 changed files with 104 additions and 40 deletions

View File

@@ -139,7 +139,7 @@ export default function GeneralPage() {
</form>
</Form>
<Card className="border-red-900">
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2 text-red-600">
<AlertTriangle className="h-5 w-5" />

View File

@@ -63,6 +63,7 @@ import { Checkbox } from "@app/components/ui/checkbox";
import { GenerateAccessTokenResponse } from "@server/routers/accessToken";
import { constructShareLink } from "@app/lib/shareLinks";
import { ShareLinkRow } from "./ShareLinksTable";
import { QRCodeSVG } from "qrcode.react";
type FormProps = {
open: boolean;
@@ -448,14 +449,24 @@ export default function CreateShareLinkForm({
{link && (
<div className="max-w-md space-y-4">
<p>
You will be able to see this link once.
You will only be able to see this link once.
Make sure to copy it.
</p>
<p>
Anyone with this link can access the
resource. Share it with care.
</p>
<CopyTextBox text={link} wrapText={false} />
<div className="w-64 h-64 mx-auto flex items-center justify-center">
<QRCodeSVG
value={link}
size={256}
/>
</div>
<div className="mx-auto">
<CopyTextBox text={link} wrapText={false} />
</div>
</div>
)}
</div>