import Dialog from '~/components/Dialog'; import Input from '~/components/Input'; interface CreateUserProps { isOidc?: boolean; isDisabled?: boolean; } // TODO: Support image upload for user avatars export default function CreateUser({ isOidc, isDisabled }: CreateUserProps) { return ( Add a new user Add a new user Enter a username to create a new user. Usernames can be addressed when managing ACL policies. {isOidc ? ( <> {' '} Manually created users are given administrative access to Headplane unless they become linked to an OIDC user in Headscale. ) : undefined}
{ if (value.trim().length === 0) { return 'Username is required'; } if (value.includes(' ')) { return 'Usernames cannot contain spaces'; } return true; }} />
); }