mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-03 04:26:36 +08:00
优化,排查项目问题
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { FormEvent } from 'react'
|
||||
import { Plus, Save } from 'lucide-react'
|
||||
import { Loader2, Plus, Save } from 'lucide-react'
|
||||
|
||||
type AdminUsersFormProps = {
|
||||
usersCount: number
|
||||
maxUsers: number
|
||||
maxUsersDraft: string
|
||||
savingLimit: boolean
|
||||
creating: boolean
|
||||
username: string
|
||||
password: string
|
||||
userLimitReached: boolean
|
||||
@@ -21,6 +22,7 @@ export function AdminUsersForm({
|
||||
maxUsers,
|
||||
maxUsersDraft,
|
||||
savingLimit,
|
||||
creating,
|
||||
username,
|
||||
password,
|
||||
userLimitReached,
|
||||
@@ -91,9 +93,13 @@ export function AdminUsersForm({
|
||||
onChange={(e) => onPasswordChange(e.target.value)}
|
||||
disabled={userLimitReached}
|
||||
/>
|
||||
<button type="submit" className="neon-button inline-flex items-center justify-center gap-2" disabled={userLimitReached}>
|
||||
<Plus size={16} />
|
||||
添加用户
|
||||
<button
|
||||
type="submit"
|
||||
className="neon-button inline-flex items-center justify-center gap-2 disabled:opacity-50"
|
||||
disabled={userLimitReached || creating}
|
||||
>
|
||||
{creating ? <Loader2 size={16} className="animate-spin" /> : <Plus size={16} />}
|
||||
{creating ? '添加中…' : '添加用户'}
|
||||
</button>
|
||||
</form>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user