diff --git a/frontend/src/pages/ManageUsers.tsx b/frontend/src/pages/ManageUsers.tsx index 3dd59ca..ba7937f 100644 --- a/frontend/src/pages/ManageUsers.tsx +++ b/frontend/src/pages/ManageUsers.tsx @@ -117,6 +117,7 @@ export default function ManageUsers() { const [editingUser, setEditingUser] = useState(null) const [filterActive, setFilterActive] = useState(true) const [filterRole, setFilterRole] = useState(null) + const [showPassword, setShowPassword] = useState(false) const [createForm, setCreateForm] = useState({ username: '', @@ -149,12 +150,13 @@ export default function ManageUsers() { const [editingAuthUser, setEditingAuthUser] = useState(null) const [authFilterActive, setAuthFilterActive] = useState(true) const [authFilterRole, setAuthFilterRole] = useState(null) // 'Admin' or 'User' + const [showAuthPassword, setShowAuthPassword] = useState(false) const [authCreateForm, setAuthCreateForm] = useState({ email: '', name: '', password: '', - is_admin: false, + is_admin: true, has_write_access: false, }) @@ -399,6 +401,7 @@ const getDisplayRoleLabel = (user: UserResponse): string => { role: createRole, }) setShowCreateModal(false) + setShowPassword(false) setCreateForm({ username: '', password: '', @@ -469,11 +472,12 @@ const getDisplayRoleLabel = (user: UserResponse): string => { email: trimmedEmail, }) setShowAuthCreateModal(false) + setShowAuthPassword(false) setAuthCreateForm({ email: '', name: '', password: '', - is_admin: false, + is_admin: true, has_write_access: false, }) loadAuthUsers() @@ -838,7 +842,7 @@ const getDisplayRoleLabel = (user: UserResponse): string => { email: '', name: '', password: '', - is_admin: false, + is_admin: true, has_write_access: false, }) setShowAuthCreateModal(true) @@ -1403,16 +1407,26 @@ const getDisplayRoleLabel = (user: UserResponse): string => { - - setCreateForm({ ...createForm, password: e.target.value }) - } - className="w-full px-3 py-2 border border-gray-300 rounded-md" - required - minLength={6} - /> +
+ + setCreateForm({ ...createForm, password: e.target.value }) + } + className="w-full px-3 py-2 pr-10 border border-gray-300 rounded-md" + required + minLength={6} + /> + +