aboutsummaryrefslogtreecommitdiff
path: root/src/pages/sign_ins
diff options
context:
space:
mode:
authorfloppydiskette <floppydisk@hyprcat.net>2024-09-13 12:58:12 +0100
committerfloppydiskette <floppydisk@hyprcat.net>2024-09-13 12:59:16 +0100
commit2c3400fb4f5a22951d42f286975201bf817d7883 (patch)
treea08b06f5f6d5df4f6774da7645d85418609a4cf2 /src/pages/sign_ins
parentd8915dcca4d9752f6f254e86afa39ef7f83617d1 (diff)
wronglucky
Diffstat (limited to 'src/pages/sign_ins')
-rw-r--r--src/pages/sign_ins/new_page.cr23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/pages/sign_ins/new_page.cr b/src/pages/sign_ins/new_page.cr
new file mode 100644
index 0000000..1018813
--- /dev/null
+++ b/src/pages/sign_ins/new_page.cr
@@ -0,0 +1,23 @@
+class SignIns::NewPage < AuthLayout
+ needs operation : SignInUser
+
+ def content
+ h1 "Sign In"
+ render_sign_in_form(@operation)
+ end
+
+ private def render_sign_in_form(op)
+ form_for SignIns::Create do
+ sign_in_fields(op)
+ submit "Sign In", flow_id: "sign-in-button"
+ end
+ link "Reset password", to: PasswordResetRequests::New
+ text " | "
+ link "Sign up", to: SignUps::New
+ end
+
+ private def sign_in_fields(op)
+ mount Shared::Field, attribute: op.email, label_text: "Email", &.email_input(autofocus: "true")
+ mount Shared::Field, attribute: op.password, label_text: "Password", &.password_input
+ end
+end