Skip to content

Commit 1ace84b

Browse files
committed
feat: login page
1 parent c9f4a17 commit 1ace84b

File tree

6 files changed

+298
-195
lines changed

6 files changed

+298
-195
lines changed

platforms/eVoting/package.json

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
{
2-
"name": "evoting",
3-
"version": "0.1.0",
4-
"private": true,
5-
"scripts": {
6-
"dev": "next dev --turbopack",
7-
"build": "next build",
8-
"start": "next start",
9-
"lint": "next lint"
10-
},
11-
"dependencies": {
12-
"@hookform/resolvers": "^3.10.0",
13-
"@radix-ui/react-label": "^2.1.3",
14-
"@radix-ui/react-radio-group": "^1.2.4",
15-
"@radix-ui/react-slot": "^1.2.0",
16-
"@tailwindcss/typography": "^0.5.16",
17-
"class-variance-authority": "^0.7.1",
18-
"clsx": "^2.1.1",
19-
"lucide-react": "^0.453.0",
20-
"next": "15.4.2",
21-
"react": "19.1.0",
22-
"react-dom": "19.1.0",
23-
"react-hook-form": "^7.55.0",
24-
"tailwind-merge": "^3.3.1",
25-
"tailwindcss-animate": "^1.0.7",
26-
"zod": "^3.24.2"
27-
},
28-
"devDependencies": {
29-
"@eslint/eslintrc": "^3",
30-
"@tailwindcss/postcss": "^4",
31-
"@types/node": "^20",
32-
"@types/react": "^19",
33-
"@types/react-dom": "^19",
34-
"eslint": "^9",
35-
"eslint-config-next": "15.4.2",
36-
"tailwindcss": "^4",
37-
"typescript": "^5"
38-
}
2+
"name": "evoting",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev --turbopack",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint"
10+
},
11+
"dependencies": {
12+
"@hookform/resolvers": "^3.10.0",
13+
"@radix-ui/react-label": "^2.1.3",
14+
"@radix-ui/react-radio-group": "^1.2.4",
15+
"@radix-ui/react-slot": "^1.2.0",
16+
"@tailwindcss/typography": "^0.5.16",
17+
"class-variance-authority": "^0.7.1",
18+
"clsx": "^2.1.1",
19+
"lucide-react": "^0.453.0",
20+
"next": "15.4.2",
21+
"next-qrcode": "^2.5.1",
22+
"react": "19.1.0",
23+
"react-dom": "19.1.0",
24+
"react-hook-form": "^7.55.0",
25+
"tailwind-merge": "^3.3.1",
26+
"tailwindcss-animate": "^1.0.7",
27+
"zod": "^3.24.2"
28+
},
29+
"devDependencies": {
30+
"@eslint/eslintrc": "^3",
31+
"@tailwindcss/postcss": "^4",
32+
"@types/node": "^20",
33+
"@types/react": "^19",
34+
"@types/react-dom": "^19",
35+
"eslint": "^9",
36+
"eslint-config-next": "15.4.2",
37+
"tailwindcss": "^4",
38+
"typescript": "^5"
39+
}
3940
}

platforms/eVoting/public/Logo.png

5.63 KB
Loading
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
"use client";
2+
3+
import { Card, CardHeader } from "@/components/ui/card";
4+
import { useQRCode } from "next-qrcode";
5+
6+
export default function LoginPage() {
7+
const { SVG } = useQRCode();
8+
return (
9+
<div className="flex flex-col h-screen items-center justify-center gap-8">
10+
<div className="flex flex-col items-center text-center gap-4">
11+
<div className="flex items-center gap-2 text-5xl font-bold">
12+
<img src="/Logo.png" alt="eVoting Logo" />
13+
eVoting
14+
</div>
15+
<p className="text-2xl">Secure voting in the W3DS</p>
16+
</div>
17+
<Card className="flex flex-col items-center gap-4 w-96 p-8">
18+
<CardHeader className="text-foreground text-3xl font-black">
19+
Welcome to eVoting
20+
</CardHeader>
21+
<div className="flex flex-col gap-4 text-muted-foreground justify-center">
22+
<p className="flex justify-center text-xl">
23+
Scan QR to sign in
24+
</p>
25+
<SVG
26+
text={"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}
27+
options={{
28+
margin: 2,
29+
width: 200,
30+
color: {
31+
dark: "#000000",
32+
light: "#FFFFFF",
33+
},
34+
}}
35+
/>
36+
<p>Features you'll get access to:</p>
37+
<ul className="flex flex-col gap-2 list-disc">
38+
<li>Create public and blind votes</li>
39+
<li>Vote on active polls</li>
40+
<li>View real-time results</li>
41+
<li>Manage your created votes</li>
42+
</ul>
43+
</div>
44+
</Card>
45+
</div>
46+
);
47+
}
Lines changed: 66 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,86 @@
1-
import * as React from "react"
1+
import * as React from "react";
22

3-
import { cn } from "@/lib/utils"
3+
import { cn } from "@/lib/utils";
44

55
const Card = React.forwardRef<
6-
HTMLDivElement,
7-
React.HTMLAttributes<HTMLDivElement>
6+
HTMLDivElement,
7+
React.HTMLAttributes<HTMLDivElement>
88
>(({ className, ...props }, ref) => (
9-
<div
10-
ref={ref}
11-
className={cn(
12-
"rounded-lg border bg-card text-card-foreground shadow-xs",
13-
className
14-
)}
15-
{...props}
16-
/>
17-
))
18-
Card.displayName = "Card"
9+
<div
10+
ref={ref}
11+
className={cn(
12+
"rounded-lg border bg-card text-card-foreground shadow-xs",
13+
className
14+
)}
15+
{...props}
16+
/>
17+
));
18+
Card.displayName = "Card";
1919

2020
const CardHeader = React.forwardRef<
21-
HTMLDivElement,
22-
React.HTMLAttributes<HTMLDivElement>
21+
HTMLDivElement,
22+
React.HTMLAttributes<HTMLDivElement>
2323
>(({ className, ...props }, ref) => (
24-
<div
25-
ref={ref}
26-
className={cn("flex flex-col space-y-1.5 p-6", className)}
27-
{...props}
28-
/>
29-
))
30-
CardHeader.displayName = "CardHeader"
24+
<div
25+
ref={ref}
26+
className={cn("flex flex-col space-y-1.5", className)}
27+
{...props}
28+
/>
29+
));
30+
CardHeader.displayName = "CardHeader";
3131

3232
const CardTitle = React.forwardRef<
33-
HTMLDivElement,
34-
React.HTMLAttributes<HTMLDivElement>
33+
HTMLDivElement,
34+
React.HTMLAttributes<HTMLDivElement>
3535
>(({ className, ...props }, ref) => (
36-
<div
37-
ref={ref}
38-
className={cn(
39-
"text-2xl font-semibold leading-none tracking-tight",
40-
className
41-
)}
42-
{...props}
43-
/>
44-
))
45-
CardTitle.displayName = "CardTitle"
36+
<div
37+
ref={ref}
38+
className={cn(
39+
"text-2xl font-semibold leading-none tracking-tight",
40+
className
41+
)}
42+
{...props}
43+
/>
44+
));
45+
CardTitle.displayName = "CardTitle";
4646

4747
const CardDescription = React.forwardRef<
48-
HTMLDivElement,
49-
React.HTMLAttributes<HTMLDivElement>
48+
HTMLDivElement,
49+
React.HTMLAttributes<HTMLDivElement>
5050
>(({ className, ...props }, ref) => (
51-
<div
52-
ref={ref}
53-
className={cn("text-sm text-muted-foreground", className)}
54-
{...props}
55-
/>
56-
))
57-
CardDescription.displayName = "CardDescription"
51+
<div
52+
ref={ref}
53+
className={cn("text-sm text-muted-foreground", className)}
54+
{...props}
55+
/>
56+
));
57+
CardDescription.displayName = "CardDescription";
5858

5959
const CardContent = React.forwardRef<
60-
HTMLDivElement,
61-
React.HTMLAttributes<HTMLDivElement>
60+
HTMLDivElement,
61+
React.HTMLAttributes<HTMLDivElement>
6262
>(({ className, ...props }, ref) => (
63-
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
64-
))
65-
CardContent.displayName = "CardContent"
63+
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
64+
));
65+
CardContent.displayName = "CardContent";
6666

6767
const CardFooter = React.forwardRef<
68-
HTMLDivElement,
69-
React.HTMLAttributes<HTMLDivElement>
68+
HTMLDivElement,
69+
React.HTMLAttributes<HTMLDivElement>
7070
>(({ className, ...props }, ref) => (
71-
<div
72-
ref={ref}
73-
className={cn("flex items-center p-6 pt-0", className)}
74-
{...props}
75-
/>
76-
))
77-
CardFooter.displayName = "CardFooter"
71+
<div
72+
ref={ref}
73+
className={cn("flex items-center p-6 pt-0", className)}
74+
{...props}
75+
/>
76+
));
77+
CardFooter.displayName = "CardFooter";
7878

79-
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
79+
export {
80+
Card,
81+
CardHeader,
82+
CardFooter,
83+
CardTitle,
84+
CardDescription,
85+
CardContent,
86+
};

platforms/eVoting/tsconfig.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "ES2017",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -19,9 +23,18 @@
1923
}
2024
],
2125
"paths": {
22-
"@/*": ["./src/*"]
26+
"@/*": [
27+
"./src/*"
28+
]
2329
}
2430
},
25-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26-
"exclude": ["node_modules"]
31+
"include": [
32+
"next-env.d.ts",
33+
"**/*.ts",
34+
"**/*.tsx",
35+
".next/types/**/*.ts"
36+
],
37+
"exclude": [
38+
"node_modules"
39+
]
2740
}

0 commit comments

Comments
 (0)