This commit is contained in:
2025-12-09 12:50:21 +08:00
parent 14f6a468ef
commit 6a78996b8a
13 changed files with 1064 additions and 488 deletions

View File

@@ -1,37 +1,84 @@
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>登录</title>
<title>登录 - 录播查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
<script src="{{ mix('/js/manifest.js') }}" rel="script"></script>
</head>
<body>
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-100">
@include("common.header")
<form class="w-full lg:w-1/2 border-2 mx-auto my-2" id="webauthn_login_form" action="" method="post" enctype="multipart/form-data">
<div class="block text-lg font-bold ml-4 mt-2">登录</div>
@csrf
<label class="block my-2">
用户名
<input class="form-input border-0 border-b-2 w-full" type="text" name="username" value="{{ old("username") }}" placeholder="用户名或邮箱">
</label>
<label class="block my-2">
密码
<input class="form-input border-0 border-b-2 w-full" type="password" name="password" value="{{ old("password") }}" placeholder="密码">
</label>
<label class="block my-4">
记住密码
<input class="form-checkbox" type="checkbox" name="remember" @if(old("remember") == 1) checked @endif value="1">
</label>
@include("common.form_error")
<div class="block my-2 text-center">
<input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit" value="登录">
<a class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" id="do_webauthn_login" href="javascript: void 0">
免输入登录<sup class="text-xs bg-yellow-600 text-white">Alpha</sup>
</a>
<main class="flex-grow flex items-center justify-center px-4 sm:px-6 lg:px-8 py-12">
<div class="max-w-md w-full space-y-8 bg-white dark:bg-gray-800 p-8 rounded-xl shadow-lg border border-gray-100 dark:border-gray-700">
<div>
<h2 class="mt-2 text-center text-3xl font-extrabold text-gray-900 dark:text-white">
登录账号
</h2>
<p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">
或者
<a href="{{ route('register') }}" class="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300">
注册新账号
</a>
</p>
</div>
<form class="mt-8 space-y-6" id="webauthn_login_form" action="" method="post" enctype="multipart/form-data">
@csrf
<div class="rounded-md shadow-sm -space-y-px">
<div>
<label for="username" class="sr-only">用户名 / 邮箱</label>
<input id="username" name="username" type="text" autocomplete="username" required value="{{ old("username") }}"
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 text-gray-900 dark:text-white dark:bg-gray-700 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
placeholder="用户名或邮箱">
</div>
<div>
<label for="password" class="sr-only">密码</label>
<input id="password" name="password" type="password" autocomplete="current-password" required value="{{ old("password") }}"
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 text-gray-900 dark:text-white dark:bg-gray-700 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
placeholder="密码">
</div>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="remember_me" name="remember" type="checkbox" value="1" @if(old("remember") == 1) checked @endif
class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600">
<label for="remember_me" class="ml-2 block text-sm text-gray-900 dark:text-gray-300">
记住密码
</label>
</div>
<div class="text-sm">
<a href="#" class="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300">
忘记密码?
</a>
</div>
</div>
@include("common.form_error")
<div class="flex flex-col gap-3">
<button type="submit" class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
<svg class="h-5 w-5 text-indigo-500 group-hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd" />
</svg>
</span>
登录
</button>
<button type="button" id="do_webauthn_login" class="group relative w-full flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-600 text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
免输入登录 (Passkey)
<span class="ml-2 inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200">
Alpha
</span>
</button>
</div>
</form>
</div>
</form>
</main>
@include("common.footer")
</body>
<script src="{{ mix('/js/webauthn.js') }}" rel="script"></script>
</html>
</body>
</html>

View File

@@ -1,32 +1,65 @@
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>注册</title>
<title>注册 - 录播查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
</head>
<body>
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-100">
@include("common.header")
<form class="w-full lg:w-1/2 border-2 mx-auto my-2" action="" method="post" enctype="multipart/form-data">
<div class="block text-lg font-bold ml-4 mt-2">注册</div>
@csrf
<label class="block my-2">
用户名
<input class="form-input border-0 border-b-2 w-full" type="text" name="name" value="{{ old("name") }}" placeholder="用户名">
</label>
<label class="block my-2">
邮箱
<input class="form-input border-0 border-b-2 w-full" type="email" name="email" value="{{ old("email") }}" placeholder="邮箱">
</label>
<label class="block my-2">
密码
<input class="form-input border-0 border-b-2 w-full" minlength="5" type="password" name="password" value="{{ old("password") }}" placeholder="密码">
</label>
@include("common.form_error")
<div class="block my-2 text-center">
<input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit" value="注册">
<main class="flex-grow flex items-center justify-center px-4 sm:px-6 lg:px-8 py-12">
<div class="max-w-md w-full space-y-8 bg-white dark:bg-gray-800 p-8 rounded-xl shadow-lg border border-gray-100 dark:border-gray-700">
<div>
<h2 class="mt-2 text-center text-3xl font-extrabold text-gray-900 dark:text-white">
创建新账号
</h2>
<p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">
已有账号?
<a href="{{ route('login') }}" class="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300">
直接登录
</a>
</p>
</div>
<form class="mt-8 space-y-6" action="" method="post" enctype="multipart/form-data">
@csrf
<div class="rounded-md shadow-sm -space-y-px">
<div>
<label for="name" class="sr-only">用户名</label>
<input id="name" name="name" type="text" autocomplete="username" required value="{{ old("name") }}"
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 text-gray-900 dark:text-white dark:bg-gray-700 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
placeholder="用户名">
</div>
<div>
<label for="email" class="sr-only">邮箱</label>
<input id="email" name="email" type="email" autocomplete="email" required value="{{ old("email") }}"
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 text-gray-900 dark:text-white dark:bg-gray-700 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
placeholder="邮箱">
</div>
<div>
<label for="password" class="sr-only">密码</label>
<input id="password" name="password" type="password" autocomplete="new-password" required minlength="5" value="{{ old("password") }}"
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 text-gray-900 dark:text-white dark:bg-gray-700 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
placeholder="密码 (至少5位)">
</div>
</div>
@include("common.form_error")
<div>
<button type="submit" class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
<svg class="h-5 w-5 text-indigo-500 group-hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />
</svg>
</span>
注册
</button>
</div>
</form>
</div>
</form>
</main>
@include("common.footer")
</body>
</html>
</html>