mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
feat: 改善登录表单的可访问性和自动填充支持
- 为所有表单字段添加 id 和 name 属性 - 添加 autocomplete 属性支持浏览器自动填充 - 使用 for 属性正确关联 label 和 input - 优化代码格式符合 Prettier 规范 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -39,12 +39,17 @@
|
||||
|
||||
<form class="space-y-4 sm:space-y-6" @submit.prevent="handleLogin">
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-semibold text-gray-900 dark:text-gray-100 sm:mb-3"
|
||||
<label
|
||||
class="mb-2 block text-sm font-semibold text-gray-900 dark:text-gray-100 sm:mb-3"
|
||||
for="username"
|
||||
>用户名</label
|
||||
>
|
||||
<input
|
||||
id="username"
|
||||
v-model="loginForm.username"
|
||||
autocomplete="username"
|
||||
class="form-input w-full"
|
||||
name="username"
|
||||
placeholder="请输入用户名"
|
||||
required
|
||||
type="text"
|
||||
@@ -52,12 +57,17 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-semibold text-gray-900 dark:text-gray-100 sm:mb-3"
|
||||
<label
|
||||
class="mb-2 block text-sm font-semibold text-gray-900 dark:text-gray-100 sm:mb-3"
|
||||
for="password"
|
||||
>密码</label
|
||||
>
|
||||
<input
|
||||
id="password"
|
||||
v-model="loginForm.password"
|
||||
autocomplete="current-password"
|
||||
class="form-input w-full"
|
||||
name="password"
|
||||
placeholder="请输入密码"
|
||||
required
|
||||
type="password"
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<input
|
||||
id="username"
|
||||
v-model="form.username"
|
||||
autocomplete="username"
|
||||
class="relative block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 text-gray-900 placeholder-gray-500 focus:z-10 focus:border-blue-500 focus:outline-none focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:ring-blue-400 sm:text-sm"
|
||||
:disabled="loading"
|
||||
name="username"
|
||||
@@ -67,6 +68,7 @@
|
||||
<input
|
||||
id="password"
|
||||
v-model="form.password"
|
||||
autocomplete="current-password"
|
||||
class="relative block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 text-gray-900 placeholder-gray-500 focus:z-10 focus:border-blue-500 focus:outline-none focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:ring-blue-400 sm:text-sm"
|
||||
:disabled="loading"
|
||||
name="password"
|
||||
|
||||
Reference in New Issue
Block a user