@seip/bluebird-js 0.1.1 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/extensions.json +7 -0
- package/.vscode/settings.json +10 -0
- package/AGENTS.md +124 -64
- package/README.md +236 -103
- package/app/routes/web.js +47 -55
- package/app/views/about.jsx +98 -0
- package/app/views/components/Header.jsx +42 -0
- package/app/views/components/LiveCounter.jsx +67 -0
- package/app/views/dashboard.jsx +300 -0
- package/app/views/index.jsx +123 -0
- package/app/views/layouts/main/view.jsx +201 -0
- package/app/views/legal/terms.html +29 -19
- package/app/views/login.jsx +141 -0
- package/core/actions.d.ts +4 -0
- package/core/actions.js +329 -0
- package/core/app.js +129 -22
- package/core/auth.js +1 -1
- package/core/cli/doctor.js +3 -4
- package/core/cli/init.js +153 -6
- package/core/cli/migrate.js +418 -145
- package/core/cli/view.js +76 -11
- package/core/config.js +35 -5
- package/core/csrf.js +1 -1
- package/core/database.js +52 -17
- package/core/debug.js +1 -1
- package/core/html.d.ts +54 -42
- package/core/html.js +473 -217
- package/core/index.d.ts +187 -85
- package/core/jsx.d.ts +38 -0
- package/core/jsx.js +1180 -0
- package/core/model.js +282 -61
- package/core/queue.js +7 -4
- package/core/render-cache.js +212 -212
- package/core/render.d.ts +20 -2
- package/core/render.js +320 -43
- package/core/upload.js +7 -1
- package/core/validate.js +1 -1
- package/core/view-loader.js +341 -19
- package/core/vite.js +1 -1
- package/package.json +9 -3
- package/public/js/bluebird-client.js +2313 -1049
- package/public/js/tailwind.js +8 -0
- package/app/views/about.js +0 -63
- package/app/views/dashboard.js +0 -147
- package/app/views/index.js +0 -80
- package/app/views/layouts/main/view.js +0 -81
- package/app/views/login.js +0 -80
- package/public/css/bluebird.min.css +0 -2
- package/public/js/bluebird.min.js +0 -1073
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared application layout for Bluebird.js written in React JSX.
|
|
3
|
+
* Provides the global HTML shell, header navigation, aside menu, and footer.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} context
|
|
6
|
+
* @param {any} context.body - Main content rendered by the view.
|
|
7
|
+
* @param {Object} [context.head={}] - Head metadata (title, description, canonical, etc.).
|
|
8
|
+
* @param {Object} [context.ctx={}] - Request context ({ req, res, user, locals }).
|
|
9
|
+
*/
|
|
10
|
+
export default function MainLayout({ body, head = {}, ctx = {} }) {
|
|
11
|
+
const currentPath = ctx.req?.path || "/";
|
|
12
|
+
const user = ctx.user || ctx.req?.user;
|
|
13
|
+
|
|
14
|
+
const isActive = (path) =>
|
|
15
|
+
currentPath === path
|
|
16
|
+
? "bg-sky-500/15 text-sky-400 border border-sky-500/30 font-semibold"
|
|
17
|
+
: "text-slate-400 hover:text-slate-100 hover:bg-slate-800/60";
|
|
18
|
+
|
|
19
|
+
const tailwindThemeCss = `
|
|
20
|
+
@custom-variant dark (&:where(.dark, .dark *, [data-theme="dark"], [data-theme="dark"] *));
|
|
21
|
+
@theme {
|
|
22
|
+
--font-sans: 'Inter', system-ui, -apple-system, sans-serif;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<html lang="en" className="dark" data-theme="dark">
|
|
28
|
+
<head>
|
|
29
|
+
<meta charSet="UTF-8" />
|
|
30
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
31
|
+
<title>{head.title || "Blue Bird Framework"}</title>
|
|
32
|
+
<link rel="canonical" href={head.canonical || "https://seip25.github.io/bluebird-js/"} />
|
|
33
|
+
<meta
|
|
34
|
+
name="description"
|
|
35
|
+
content={
|
|
36
|
+
head.description ||
|
|
37
|
+
"Blue Bird is a fast, structured, and opinionated Express.js framework for developers who want visual elegance and performance with React SSR and modern JavaScript."
|
|
38
|
+
}
|
|
39
|
+
/>
|
|
40
|
+
<meta
|
|
41
|
+
name="keywords"
|
|
42
|
+
content={
|
|
43
|
+
head.keywords ||
|
|
44
|
+
"Blue Bird, Express.js, Node.js, React SSR, Partial Rendering, Performance, Nginx, Redis"
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
47
|
+
<meta name="author" content="Seip25" />
|
|
48
|
+
<link rel="icon" href="/images/favicon.ico" />
|
|
49
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
50
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
|
|
51
|
+
<link
|
|
52
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
|
|
53
|
+
rel="stylesheet"
|
|
54
|
+
/>
|
|
55
|
+
<script src="/js/tailwind.js"></script>
|
|
56
|
+
<style type="text/tailwindcss">{tailwindThemeCss}</style>
|
|
57
|
+
<script src="/js/bluebird-client.js" defer></script>
|
|
58
|
+
</head>
|
|
59
|
+
<body
|
|
60
|
+
data-layout="main"
|
|
61
|
+
className="min-h-screen flex flex-col bg-slate-950 text-slate-100 font-sans antialiased selection:bg-sky-500/30"
|
|
62
|
+
>
|
|
63
|
+
<header className="border-b border-slate-800/80 bg-slate-950/80 backdrop-blur-md sticky top-0 z-30 px-6 py-4">
|
|
64
|
+
<nav className="flex items-center justify-between max-w-7xl mx-auto">
|
|
65
|
+
<a
|
|
66
|
+
href="/"
|
|
67
|
+
className="flex items-center gap-2.5 text-slate-100 hover:text-sky-400 transition-colors"
|
|
68
|
+
>
|
|
69
|
+
<svg
|
|
70
|
+
width="28"
|
|
71
|
+
height="28"
|
|
72
|
+
viewBox="0 0 24 24"
|
|
73
|
+
fill="none"
|
|
74
|
+
stroke="currentColor"
|
|
75
|
+
strokeWidth="2"
|
|
76
|
+
strokeLinecap="round"
|
|
77
|
+
strokeLinejoin="round"
|
|
78
|
+
className="text-sky-400"
|
|
79
|
+
>
|
|
80
|
+
<path d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" />
|
|
81
|
+
</svg>
|
|
82
|
+
<strong className="text-xl font-bold bg-gradient-to-r from-sky-400 via-blue-500 to-indigo-400 bg-clip-text text-transparent">
|
|
83
|
+
Blue Bird
|
|
84
|
+
</strong>
|
|
85
|
+
</a>
|
|
86
|
+
<div className="flex items-center gap-3">
|
|
87
|
+
<a
|
|
88
|
+
href="https://github.com/seip25/bluebird-js"
|
|
89
|
+
target="_blank"
|
|
90
|
+
className="px-3 py-1.5 rounded-lg border border-slate-700/80 bg-slate-900/60 text-xs font-medium text-slate-300 hover:text-white hover:bg-slate-800 transition-all flex items-center gap-1.5"
|
|
91
|
+
>
|
|
92
|
+
<span>★</span> GitHub
|
|
93
|
+
</a>
|
|
94
|
+
</div>
|
|
95
|
+
</nav>
|
|
96
|
+
</header>
|
|
97
|
+
|
|
98
|
+
<main
|
|
99
|
+
data-bb-outlet="true"
|
|
100
|
+
className="flex-1 max-w-7xl w-full mx-auto px-4 md:px-6 py-8 flex flex-col md:flex-row gap-8"
|
|
101
|
+
>
|
|
102
|
+
<aside className="w-full md:w-60 shrink-0 flex flex-col gap-1.5 p-4 rounded-2xl border border-slate-800/80 bg-slate-900/40 h-fit">
|
|
103
|
+
<h4 className="px-3 py-1 text-xs font-bold uppercase tracking-wider text-slate-400 mb-1">
|
|
104
|
+
Menu
|
|
105
|
+
</h4>
|
|
106
|
+
<a href="/" className={`px-3 py-2 rounded-lg text-sm transition-colors ${isActive("/")}`}>
|
|
107
|
+
Home
|
|
108
|
+
</a>
|
|
109
|
+
<a
|
|
110
|
+
href="/about"
|
|
111
|
+
className={`px-3 py-2 rounded-lg text-sm transition-colors ${isActive("/about")}`}
|
|
112
|
+
>
|
|
113
|
+
About
|
|
114
|
+
</a>
|
|
115
|
+
<a
|
|
116
|
+
href="/login"
|
|
117
|
+
className={`px-3 py-2 rounded-lg text-sm transition-colors ${isActive("/login")}`}
|
|
118
|
+
>
|
|
119
|
+
Login
|
|
120
|
+
</a>
|
|
121
|
+
<a
|
|
122
|
+
href="/dashboard"
|
|
123
|
+
className={`px-3 py-2 rounded-lg text-sm transition-colors ${isActive("/dashboard")}`}
|
|
124
|
+
>
|
|
125
|
+
Dashboard
|
|
126
|
+
</a>
|
|
127
|
+
<div className="my-2 border-t border-slate-800/80"></div>
|
|
128
|
+
<a
|
|
129
|
+
href="https://seip25.github.io/bluebird-js"
|
|
130
|
+
target="_blank"
|
|
131
|
+
className="px-3 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-100 hover:bg-slate-800/60 transition-colors"
|
|
132
|
+
>
|
|
133
|
+
Documentation
|
|
134
|
+
</a>
|
|
135
|
+
<a
|
|
136
|
+
href="https://github.com/seip25/bluebird-js"
|
|
137
|
+
target="_blank"
|
|
138
|
+
className="px-3 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-100 hover:bg-slate-800/60 transition-colors"
|
|
139
|
+
>
|
|
140
|
+
GitHub Repository
|
|
141
|
+
</a>
|
|
142
|
+
{user ? (
|
|
143
|
+
<a
|
|
144
|
+
href="/logout"
|
|
145
|
+
data-no-prefetch="true"
|
|
146
|
+
role="button"
|
|
147
|
+
className="mt-3 px-3 py-2 text-center rounded-lg text-xs font-semibold bg-red-500/15 text-red-400 border border-red-500/30 hover:bg-red-500/25 transition-colors"
|
|
148
|
+
>
|
|
149
|
+
Sign Out
|
|
150
|
+
</a>
|
|
151
|
+
) : (
|
|
152
|
+
<a
|
|
153
|
+
href="https://github.com/seip25/bluebird-js"
|
|
154
|
+
target="_blank"
|
|
155
|
+
role="button"
|
|
156
|
+
className="mt-3 px-3 py-2 text-center rounded-lg text-xs font-semibold bg-slate-800 text-slate-200 border border-slate-700 hover:bg-slate-700 hover:text-white transition-colors"
|
|
157
|
+
>
|
|
158
|
+
Star on GitHub
|
|
159
|
+
</a>
|
|
160
|
+
)}
|
|
161
|
+
</aside>
|
|
162
|
+
|
|
163
|
+
<div className="page-content flex-1 min-w-0">{body}</div>
|
|
164
|
+
</main>
|
|
165
|
+
|
|
166
|
+
<footer className="border-t border-slate-800/80 bg-slate-950 py-8 px-6 mt-auto">
|
|
167
|
+
<div className="max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-4 text-xs text-slate-400">
|
|
168
|
+
<p>
|
|
169
|
+
Powered by{" "}
|
|
170
|
+
<strong className="bg-gradient-to-r from-sky-400 to-indigo-400 bg-clip-text text-transparent font-semibold">
|
|
171
|
+
Blue Bird Framework
|
|
172
|
+
</strong>
|
|
173
|
+
</p>
|
|
174
|
+
<div className="flex items-center gap-4">
|
|
175
|
+
<a href="/" className="hover:text-slate-200 transition-colors">
|
|
176
|
+
Home
|
|
177
|
+
</a>
|
|
178
|
+
<a href="/about" className="hover:text-slate-200 transition-colors">
|
|
179
|
+
About
|
|
180
|
+
</a>
|
|
181
|
+
<a href="/login" className="hover:text-slate-200 transition-colors">
|
|
182
|
+
Login
|
|
183
|
+
</a>
|
|
184
|
+
<a href="/dashboard" className="hover:text-slate-200 transition-colors">
|
|
185
|
+
Dashboard
|
|
186
|
+
</a>
|
|
187
|
+
<a
|
|
188
|
+
href="https://github.com/seip25/bluebird-js"
|
|
189
|
+
target="_blank"
|
|
190
|
+
className="hover:text-sky-400 transition-colors"
|
|
191
|
+
>
|
|
192
|
+
★ GitHub
|
|
193
|
+
</a>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</footer>
|
|
197
|
+
</body>
|
|
198
|
+
</html>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" data-theme="dark">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" class="dark" data-theme="dark">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Terms of Service — Blue Bird</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
10
|
+
<script src="/js/tailwind.js"></script>
|
|
11
|
+
<style type="text/tailwindcss">
|
|
12
|
+
@custom-variant dark (&:where(.dark, .dark *, [data-theme="dark"], [data-theme="dark"] *));
|
|
13
|
+
@theme {
|
|
14
|
+
--font-sans: 'Inter', system-ui, -apple-system, sans-serif;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
<body class="min-h-screen bg-slate-950 text-slate-100 font-sans p-8 max-w-4xl mx-auto">
|
|
19
|
+
<article class="rounded-2xl border border-slate-800 bg-slate-900/60 p-8 shadow-xl">
|
|
20
|
+
<header class="border-b border-slate-800 pb-4 mb-6">
|
|
21
|
+
<h1 class="text-3xl font-extrabold bg-gradient-to-r from-sky-400 to-indigo-400 bg-clip-text text-transparent">Terms of Service</h1>
|
|
22
|
+
<p class="text-sm text-slate-400 mt-1">Served directly as raw, unparsed HTML via Render.html().</p>
|
|
23
|
+
</header>
|
|
24
|
+
<div>
|
|
25
|
+
<p class="text-slate-300 leading-relaxed">This static document demonstrates zero-overhead static HTML serving without template interpolation or server computation.</p>
|
|
26
|
+
</div>
|
|
27
|
+
</article>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { script } from "@seip/bluebird-js/core/html.js";
|
|
2
|
+
|
|
3
|
+
export const route = "/login";
|
|
4
|
+
export const layout = "main";
|
|
5
|
+
export const seo = true;
|
|
6
|
+
|
|
7
|
+
export const head = () => ({
|
|
8
|
+
title: "Sign In — Blue Bird Framework",
|
|
9
|
+
description: "Test native JWT authentication, encrypted cookies, and protected routes.",
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Login page React JSX view module.
|
|
14
|
+
*/
|
|
15
|
+
export default function LoginView() {
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<section className="py-10 md:py-14 border-b border-slate-800/80">
|
|
19
|
+
<h1 className="mt-3 text-3xl md:text-5xl font-extrabold tracking-tight bg-gradient-to-r from-sky-400 via-blue-500 to-indigo-400 bg-clip-text text-transparent">
|
|
20
|
+
Authentication Demo
|
|
21
|
+
</h1>
|
|
22
|
+
<p className="mt-4 text-base md:text-lg text-slate-300 max-w-2xl leading-relaxed">
|
|
23
|
+
Test native AES-256-GCM JWT auth cookies, Auth.protect middleware, and seamless View Transitions.
|
|
24
|
+
</p>
|
|
25
|
+
</section>
|
|
26
|
+
|
|
27
|
+
<div className="mt-8 max-w-2xl">
|
|
28
|
+
<div className="rounded-xl border border-sky-500/30 bg-sky-500/10 p-4 text-sky-200 mb-6">
|
|
29
|
+
<strong className="font-semibold block text-sky-400 mb-1">Interactive Auth Testing</strong>
|
|
30
|
+
<p className="text-sm leading-relaxed text-slate-300">
|
|
31
|
+
Submit credentials below to generate an encrypted JWT session cookie with{" "}
|
|
32
|
+
<code className="text-sky-300 font-mono text-xs px-1.5 py-0.5 rounded bg-slate-900 border border-slate-800">
|
|
33
|
+
Auth.login(res, user)
|
|
34
|
+
</code>
|
|
35
|
+
. Try visiting <strong className="text-white">/dashboard</strong> directly before and after logging in to verify the{" "}
|
|
36
|
+
<code className="text-sky-300 font-mono text-xs px-1.5 py-0.5 rounded bg-slate-900 border border-slate-800">
|
|
37
|
+
Auth.protect({'{'} redirect: "/login" {'}'})
|
|
38
|
+
</code>{" "}
|
|
39
|
+
middleware!
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<article className="rounded-2xl border border-slate-800 bg-slate-900/60 p-6 md:p-8">
|
|
44
|
+
<header className="mb-6">
|
|
45
|
+
<h3 className="text-xl font-bold text-slate-100">Sign In</h3>
|
|
46
|
+
<p className="text-sm text-slate-400 mt-1">
|
|
47
|
+
Enter your test credentials below to start a secure session.
|
|
48
|
+
</p>
|
|
49
|
+
</header>
|
|
50
|
+
|
|
51
|
+
<form action="/login" method="POST" id="loginForm" className="space-y-4">
|
|
52
|
+
<div>
|
|
53
|
+
<label
|
|
54
|
+
htmlFor="email"
|
|
55
|
+
className="block text-xs font-semibold uppercase tracking-wider text-slate-400 mb-1.5"
|
|
56
|
+
>
|
|
57
|
+
Email Address
|
|
58
|
+
</label>
|
|
59
|
+
<input
|
|
60
|
+
type="email"
|
|
61
|
+
id="email"
|
|
62
|
+
name="email"
|
|
63
|
+
value="alex@example.com"
|
|
64
|
+
placeholder="alex@example.com"
|
|
65
|
+
required
|
|
66
|
+
className="w-full rounded-lg border border-slate-700 bg-slate-950 px-3.5 py-2.5 text-sm text-slate-100 placeholder-slate-500 focus:border-sky-500 focus:outline-none focus:ring-2 focus:ring-sky-500/20"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div>
|
|
71
|
+
<label
|
|
72
|
+
htmlFor="password"
|
|
73
|
+
className="block text-xs font-semibold uppercase tracking-wider text-slate-400 mb-1.5"
|
|
74
|
+
>
|
|
75
|
+
Password
|
|
76
|
+
</label>
|
|
77
|
+
<input
|
|
78
|
+
type="password"
|
|
79
|
+
id="password"
|
|
80
|
+
name="password"
|
|
81
|
+
value="password123"
|
|
82
|
+
placeholder="••••••••"
|
|
83
|
+
required
|
|
84
|
+
className="w-full rounded-lg border border-slate-700 bg-slate-950 px-3.5 py-2.5 text-sm text-slate-100 placeholder-slate-500 focus:border-sky-500 focus:outline-none focus:ring-2 focus:ring-sky-500/20"
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div className="flex items-center justify-between gap-4 pt-4">
|
|
89
|
+
<button
|
|
90
|
+
type="submit"
|
|
91
|
+
id="submitBtn"
|
|
92
|
+
className="bg-sky-500 hover:bg-sky-400 text-slate-950 font-semibold px-5 py-2.5 rounded-lg text-sm transition-colors shadow-lg shadow-sky-500/20"
|
|
93
|
+
>
|
|
94
|
+
Sign In →
|
|
95
|
+
</button>
|
|
96
|
+
<a
|
|
97
|
+
href="/dashboard"
|
|
98
|
+
className="px-4 py-2.5 rounded-lg border border-slate-700 bg-slate-900/80 hover:bg-slate-800 text-slate-300 text-sm font-medium transition-colors"
|
|
99
|
+
>
|
|
100
|
+
Try /dashboard (Protected)
|
|
101
|
+
</a>
|
|
102
|
+
</div>
|
|
103
|
+
</form>
|
|
104
|
+
</article>
|
|
105
|
+
|
|
106
|
+
<article className="mt-8 rounded-2xl border border-slate-800 bg-slate-900/40 p-6">
|
|
107
|
+
<header>
|
|
108
|
+
<h4 className="font-bold text-slate-200">What is being tested here?</h4>
|
|
109
|
+
</header>
|
|
110
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
|
|
111
|
+
<div className="rounded-xl border border-slate-800/80 bg-slate-950/60 p-4">
|
|
112
|
+
<h5 className="font-bold text-sm text-slate-200 mb-1">1. Auth.protect Middleware</h5>
|
|
113
|
+
<p className="text-xs text-slate-400 leading-relaxed">
|
|
114
|
+
When an unauthenticated client requests <code className="text-sky-300 font-mono">/dashboard</code>, the server issues a 302 redirect to{" "}
|
|
115
|
+
<code className="text-sky-300 font-mono">/login</code>. The client router automatically follows the transition smoothly.
|
|
116
|
+
</p>
|
|
117
|
+
</div>
|
|
118
|
+
<div className="rounded-xl border border-slate-800/80 bg-slate-950/60 p-4">
|
|
119
|
+
<h5 className="font-bold text-sm text-slate-200 mb-1">2. Encrypted JWT Cookies</h5>
|
|
120
|
+
<p className="text-xs text-slate-400 leading-relaxed">
|
|
121
|
+
Session cookies are encrypted with AES-256-GCM and marked HttpOnly and SameSite=Lax to protect against token exfiltration.
|
|
122
|
+
</p>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</article>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{script(() => {
|
|
129
|
+
const form = document.getElementById("loginForm");
|
|
130
|
+
const btn = document.getElementById("submitBtn");
|
|
131
|
+
form?.addEventListener("submit", () => {
|
|
132
|
+
if (btn) {
|
|
133
|
+
btn.textContent = "Signing In...";
|
|
134
|
+
btn.setAttribute("disabled", "true");
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
})}
|
|
138
|
+
</>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|