diff --git a/src/lang/en/users.json b/src/lang/en/users.json index 73991e61c..ef7a9287f 100644 --- a/src/lang/en/users.json +++ b/src/lang/en/users.json @@ -16,6 +16,8 @@ "base_path": "Base path", "role": "Role", "permission": "Permission", + "disabled": "Disabled", + "available": "Available", "update_profile": "Update Profile", "update_profile_success": "Update profile successfully, please re-login.", "change_username": "Change Username", diff --git a/src/pages/manage/users/AddOrEdit.tsx b/src/pages/manage/users/AddOrEdit.tsx index 35c68fbd3..1a469eda5 100644 --- a/src/pages/manage/users/AddOrEdit.tsx +++ b/src/pages/manage/users/AddOrEdit.tsx @@ -52,6 +52,8 @@ const AddOrEdit = () => { base_path: "", role: 0, permission: 0, + disabled: false, + github_id: 0, }) const [userLoading, loadUser] = useFetch( (): PResp => r.get(`/admin/user/get?id=${id}`) @@ -126,6 +128,18 @@ const AddOrEdit = () => { + + setUser("disabled", e.currentTarget.checked)} + color="$neutral10" + fontSize="$sm" + checked={user.disabled} + > + {t(`users.disabled`)} + +