import React, { Fragment } from "react"; import Avatar from "@material-ui/core/Avatar"; import PersonPinIcon from "@material-ui/icons/PersonPin"; import ContactMailIcon from "@material-ui/icons/ContactMail"; import SettingsInputComponentIcon from "@material-ui/icons/SettingsInputComponent"; import { ArrayInput, ArrayField, Datagrid, DateField, Create, Edit, List, Filter, Toolbar, SimpleForm, SimpleFormIterator, TabbedForm, FormTab, BooleanField, BooleanInput, PasswordInput, TextField, TextInput, ReferenceField, SelectInput, BulkDeleteButton, DeleteButton, SaveButton, regex, useTranslate, Pagination, } from "react-admin"; import { ServerNoticeButton, ServerNoticeBulkButton } from "./ServerNotices"; import { makeStyles } from "@material-ui/core/styles"; const useStyles = makeStyles({ small: { height: "40px", width: "40px", }, large: { height: "120px", width: "120px", float: "right", }, }); const UserPagination = props => ( ); const UserFilter = props => ( ); const UserBulkActionButtons = props => { const translate = useTranslate(); return ( ); }; const AvatarField = ({ source, className, record = {} }) => ( ); export const UserList = props => { const classes = useStyles(); return ( } filterDefaultValues={{ guests: true, deactivated: false }} bulkActionButtons={} pagination={} > ); }; // https://matrix.org/docs/spec/appendices#user-identifiers const validateUser = regex( /^@[a-z0-9._=\-/]+:.*/, "synapseadmin.users.invalid_user_id" ); const UserEditToolbar = props => { const translate = useTranslate(); return ( ); }; export const UserCreate = props => ( ); const UserTitle = ({ record }) => { const translate = useTranslate(); return ( {translate("resources.users.name")}{" "} {record ? `"${record.displayname}"` : ""} ); }; export const UserEdit = props => { const classes = useStyles(); return ( }> }> }> } path="threepid" > } path="connections" > ); };