1 line
218 KiB
Plaintext
1 line
218 KiB
Plaintext
{"version":3,"sources":["synapse/authProvider.js","synapse/dataProvider.js","components/ServerNotices.js","components/devices.js","components/media.js","components/users.js","components/RoomDirectory.js","components/rooms.js","components/EventReports.js","components/LoginPage.js","components/statistics.js","components/ImportFeature.js","components/RegistrationTokens.js","i18n/de.js","i18n/en.js","App.js","i18n/zh.js","index.js"],"names":["authProvider","login","base_url","username","password","loginToken","process","REACT_APP_SERVER","console","log","options","method","body","JSON","stringify","Object","assign","device_id","localStorage","getItem","initial_device_display_name","type","token","user","replace","setItem","login_api_url","window","decodeURIComponent","fetchUtils","fetchJson","then","json","home_server","user_id","access_token","logout","logout_api_url","authenticated","removeItem","Promise","resolve","checkError","status","reject","checkAuth","getPermissions","jsonClient","url","mxcUrlToHttp","mxcUrl","homeserver","ret","exec","serverName","mediaId","resourceMap","users","path","map","u","id","name","avatar_src","avatar_url","is_guest","admin","deactivated","creation_ts_ms","creation_ts","data","total","create","endpoint","delete","params","erase","rooms","r","room_id","alias","canonical_alias","members","joined_members","is_encrypted","encryption","federatable","public","total_rooms","block","reports","er","devices","d","reference","connections","c","room_members","m","room_state","rs","event_id","state","length","pushers","p","pushkey","joined_rooms","jr","users_media","um","media_id","delete_media","before_ts","size_gt","keep_profiles","protect_media","pm","quarantine_media","qm","servernotices","n","content","msgtype","user_media_statistics","usms","forward_extremities","fe","count","room_directory","rd","guest_access","total_room_count_estimate","visibility","registration_tokens","rt","filterNullValues","key","value","getSearchOrder","order","dataProvider","getList","resource","filter","guests","search_term","valid","pagination","page","perPage","sort","field","from","query","limit","order_by","dir","res","endpoint_url","getOne","getMany","all","ids","responses","getManyReference","ref","headers","update","updateMany","createMany","cre","del","deleteMany","ServerNoticeDialog","open","loading","onClose","onSend","translate","useTranslate","ServerNoticeToolbar","props","Toolbar","SaveButton","label","disabled","pristine","Button","onClick","Dialog","DialogTitle","DialogContent","DialogContentText","SimpleForm","toolbar","submitOnEnter","redirect","save","TextInput","source","fullWidth","multiline","rows","resettable","validate","required","ServerNoticeButton","record","useState","setOpen","notify","useNotify","useCreate","handleDialogClose","values","payload","onSuccess","onFailure","ServerNoticeBulkButton","selectedIds","unselectAll","useUnselectAll","useMutation","error","useStyles","makeStyles","theme","deleteButton","color","palette","main","backgroundColor","alpha","DeviceRemoveButton","classes","refresh","useRefresh","removeDevice","className","classnames","Confirm","isOpen","onConfirm","title","translateOptions","display_name","DeleteMediaDialog","DeleteMediaToolbar","icon","DateTimeInput","defaultValue","parse","v","Date","isNaN","getTime","NumberInput","min","step","BooleanInput","DeleteMediaButton","useDelete","deleteOne","ProtectMediaButton","quarantined_by","Tooltip","_","safe_from_quarantine","arrow","QuarantineMediaButton","pathname","small","height","width","large","float","date_format","year","month","day","hour","minute","second","UserListActions","currentSort","filters","displayedFilters","exporter","filterValues","permanentFilter","basePath","hasCreate","showFilter","onUnselectItems","maxResults","rest","TopToolbar","sanitizeListRestProps","cloneElement","context","CreateButton","ExportButton","component","Link","to","style","transform","fontSize","defaultProps","UserPagination","Pagination","rowsPerPageOptions","UserFilter","Filter","SearchInput","alwaysOn","UserBulkActionButtons","BulkDeleteButton","confirmTitle","mutationMode","AvatarField","Avatar","src","UserList","List","filterDefaultValues","actions","bulkActionButtons","Datagrid","rowClick","sortBy","TextField","BooleanField","DateField","showTime","validateUser","maxLength","regex","validateAddress","generateRandomUser","Array","fill","x","Math","floor","crypto","getRandomValues","Uint32Array","join","UserEditToolbar","DeleteButton","smart_count","UserCreate","Create","autoComplete","PasswordInput","ArrayInput","SimpleFormIterator","disableReordering","SelectInput","choices","UserTitle","displayname","UserEdit","Edit","TabbedForm","FormTab","sortable","helperText","ReferenceManyField","target","addLabel","ReferenceField","link","ArrayField","NumberField","RoomDirectoryPagination","RoomDirectoryDeleteButton","confirmContent","RoomDirectoryBulkDeleteButton","RoomDirectoryBulkSaveButton","RoomDirectorySaveButton","RoomDirectoryBulkActionButtons","RoomDirectoryFilter","Chip","marginBottom","RoomDirectoryList","connect","roomDirectoryFilters","resources","list","dispatch","roomIdFilter","topicFilter","topic","canonicalAliasFilter","helper_forward_extremities","fontFamily","margin","RoomPagination","EncryptionField","emptyText","get","ariaLabel","Typography","variant","htmlColor","RoomTitle","RoomShowActions","roomDirectoryStatus","RoomShow","Show","TabbedShowLayout","Tab","SelectField","RoomBulkActionButtons","RoomFilter","RoomNameField","useRecordContext","RoomList","roomFilters","localMembersFilter","joined_local_members","stateEventsFilter","state_events","versionFilter","version","federateableFilter","ReportPagination","ReportShow","ReportList","display","flexDirection","minHeight","alignItems","justifyContent","background","backgroundRepeat","backgroundSize","card","minWidth","marginTop","avatar","secondary","hint","grey","form","padding","input","serverVersion","marginLeft","LoginPage","useLogin","setLoading","supportPassAuth","setSupportPassAuth","locale","useLocale","setLocale","useSetLocale","cfg_base_url","ssoBaseUrl","setSSOBaseUrl","location","href","ssoToken","history","replaceState","split","baseUrl","auth","catch","alert","message","renderInput","meta","touched","inputProps","handleSSO","ssoFullUrl","encodeURIComponent","UserData","formData","useForm","setServerVersion","useEffect","match","versionUrl","authMethodUrl","supportPass","supportSSO","flows","forEach","f","autoFocus","onBlur","extractHomeServer","wellKnownUrl","change","initialValues","onSubmit","errors","render","handleSubmit","noValidate","Card","Select","onChange","e","MenuItem","FormDataConsumer","formDataProps","CardActions","button","CircularProgress","size","thickness","Notification","ListActions","useListContext","UserMediaStatsPagination","UserMediaStatsFilter","UserMediaStatsList","expectedFields","optionalFields","TranslatableOption","text","ImportFeature","setValues","setError","stats","setStats","dryRun","setDryRun","progress","setProgress","importResults","setImportResults","skippedRecords","setSkippedRecords","conflictMode","setConflictMode","passwordMode","setPasswordMode","useridMode","setUseridMode","useDataProvider","onFileChange","a","file","files","toFixed","parseCsv","header","skipEmptyLines","complete","result","verifyCsv","eF","oF","fields","includes","user_types","default","line","idx","undefined","user_type","is_admin","push","row","runImport","doImport","results","unparseCsv","erroredRecords","succeededRecords","changeStats","toAdmin","toGuest","toRegular","replacedPassword","entriesDone","entriesCount","done","entry","userRecord","overwriteData","retries","submitRecord","recordData","alreadyExists","Error","newRecordData","warn","okToSubmit","totalRecordCount","wasDryRun","onConflictModeChanged","onUseridModeChanged","statsCards","CardHeader","CardContent","NativeSelect","enabled","toString","FormControlLabel","control","Checkbox","checked","conflictCards","errorCards","isArray","uploadCard","resultsCard","element","document","createElement","Blob","URL","createObjectURL","download","appendChild","click","startImportCard","ev","allCards","cardContainer","Title","defaultTitle","validateToken","validateUsesAllowed","number","validateLength","maxValue","dateParser","dateFormatter","pad","getFullYear","getMonth","slice","getDate","getHours","getMinutes","RegistrationTokenFilter","RegistrationTokenList","RegistrationTokenCreate","alwaysEnableSaveButton","RegistrationTokenEdit","format","de","germanMessages","synapseadmin","welcome","server_version","username_error","protocol_error","url_error","sso_sign_in","invalid_user_id","tabs","sso","details","basic","detail","permission","import_users","at_entry","required_field","invalid_value","unreasonably_big","already_in_progress","id_exits","goToPdf","cards","importstats","users_total","guest_count","admin_count","conflicts","mode","stop","skip","all_ids_present","count_ids_present","ignore","passwords","all_passwords_present","count_passwords_present","use_passwords","upload","explanation","startImport","simulate_only","run_import","successful","skipped","download_skipped","with_error","simulated_only","email","msisdn","threepid","show_deactivated","medium","threepids","address","consent_version","auth_provider","helper","deactivate","action","joined_local_devices","creator","join_rules","history_visibility","enums","knock","invite","private","can_join","forbidden","invited","joined","shared","world_readable","unencrypted","received_ts","score","reason","event_json","origin","origin_server_ts","formatted_body","algorithm","last_seen","ip","user_agent","last_seen_ts","last_seen_ip","success","failure","media_length","media_type","upload_name","created_ts","last_access_ts","send","send_success","send_failure","none","app","app_display_name","app_id","device_display_name","kind","lang","profile_tag","media_count","depth","state_group","sender","guest_can_join","uses_allowed","pending","completed","expiry_time","ra","unselect","auth_check_error","toggle_hidden","toggle_visible","notification","logged_out","empty","navigation","skip_nav","en","englishMessages","messages","zh","chineseMessages","i18nProvider","polyglotI18nProvider","resolveBrowserLocale","App","Admin","disableTelemetry","loginPage","customRoutes","Resource","edit","UserIcon","show","RoomI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GAASnU,GAAUmU,GAASF,KAC1DO,eAyDaC,GAtDH,kBACV,gBAACC,EAAA,EAAD,CACEC,kBAAgB,EAChBC,UAAWjV,GACXpc,aAAcA,EACd6I,aAAcA,EACdkoB,aAAcA,GACdO,aAAc,CACZ,eAAC,KAAD,CAAwB5tB,KAAK,gBAAgBqP,UAAWiO,IAA7C,eAPf,UAUE,eAACuQ,EAAA,EAAD,CACEztB,KAAK,QACLyU,KAAMnE,GACN5P,OAAQyR,GACRub,KAAM5a,GACNnH,KAAMgiB,OAER,eAACF,EAAA,EAAD,CAAUztB,KAAK,QAAQyU,KAAM6B,GAAUsX,KAAM/X,GAAUlK,KAAMkiB,MAC7D,eAACJ,EAAA,EAAD,CACEztB,KAAK,wBACLyU,KAAMoI,GACNlR,KAAMmiB,OAER,eAACL,EAAA,EAAD,CACEztB,KAAK,UACLyU,KAAMwC,GACN2W,KAAM5W,GACNrL,KAAMoiB,OAER,eAACN,EAAA,EAAD,CACEztB,KAAK,iBACLyU,KAAMJ,GACN1I,KAAMqiB,OAER,eAACP,EAAA,EAAD,CACEztB,KAAK,sBACLyU,KAAM+P,GACN9jB,OAAQ+jB,GACRiJ,KAAM/I,GACNhZ,KAAMsiB,OAER,eAACR,EAAA,EAAD,CAAUztB,KAAK,gBACf,eAACytB,EAAA,EAAD,CAAUztB,KAAK,YACf,eAACytB,EAAA,EAAD,CAAUztB,KAAK,iBACf,eAACytB,EAAA,EAAD,CAAUztB,KAAK,gBACf,eAACytB,EAAA,EAAD,CAAUztB,KAAK,iBACf,eAACytB,EAAA,EAAD,CAAUztB,KAAK,YACf,eAACytB,EAAA,EAAD,CAAUztB,KAAK,kBACf,eAACytB,EAAA,EAAD,CAAUztB,KAAK,wBACf,eAACytB,EAAA,EAAD,CAAUztB,KAAK,mBErFnBkuB,IAASzS,OAAO,eAAC,GAAD,IAASkH,SAASwL,eAAe,W","file":"static/js/main.e947bb6f.chunk.js","sourcesContent":["import { fetchUtils } from \"react-admin\";\n\nconst authProvider = {\n // called when the user attempts to log in\n login: ({ base_url, username, password, loginToken }) => {\n // force homeserver for protection in case the form is manipulated\n base_url = process.env.REACT_APP_SERVER || base_url;\n\n console.log(\"login \");\n const options = {\n method: \"POST\",\n body: JSON.stringify(\n Object.assign(\n {\n device_id: localStorage.getItem(\"device_id\"),\n initial_device_display_name: \"Synapse Admin\",\n },\n loginToken\n ? {\n type: \"m.login.token\",\n token: loginToken,\n }\n : {\n type: \"m.login.password\",\n user: username,\n password: password,\n }\n )\n ),\n };\n\n // use the base_url from login instead of the well_known entry from the\n // server, since the admin might want to access the admin API via some\n // private address\n base_url = base_url.replace(/\\/+$/g, \"\");\n localStorage.setItem(\"base_url\", base_url);\n\n const decoded_base_url = window.decodeURIComponent(base_url);\n const login_api_url = decoded_base_url + \"/_matrix/client/r0/login\";\n\n return fetchUtils.fetchJson(login_api_url, options).then(({ json }) => {\n localStorage.setItem(\"home_server\", json.home_server);\n localStorage.setItem(\"user_id\", json.user_id);\n localStorage.setItem(\"access_token\", json.access_token);\n localStorage.setItem(\"device_id\", json.device_id);\n });\n },\n // called when the user clicks on the logout button\n logout: () => {\n console.log(\"logout\");\n\n const logout_api_url =\n localStorage.getItem(\"base_url\") + \"/_matrix/client/r0/logout\";\n const access_token = localStorage.getItem(\"access_token\");\n\n const options = {\n method: \"POST\",\n user: {\n authenticated: true,\n token: `Bearer ${access_token}`,\n },\n };\n\n if (typeof access_token === \"string\") {\n fetchUtils.fetchJson(logout_api_url, options).then(({ json }) => {\n localStorage.removeItem(\"access_token\");\n });\n }\n return Promise.resolve();\n },\n // called when the API returns an error\n checkError: ({ status }) => {\n console.log(\"checkError \" + status);\n if (status === 401 || status === 403) {\n return Promise.reject();\n }\n return Promise.resolve();\n },\n // called when the user navigates to a new location, to check for authentication\n checkAuth: () => {\n const access_token = localStorage.getItem(\"access_token\");\n console.log(\"checkAuth \" + access_token);\n return typeof access_token === \"string\"\n ? Promise.resolve()\n : Promise.reject();\n },\n // called when the user navigates to a new location, to check for permissions / roles\n getPermissions: () => Promise.resolve(),\n};\n\nexport default authProvider;\n","import { fetchUtils } from \"react-admin\";\nimport { stringify } from \"query-string\";\n\n// Adds the access token to all requests\nconst jsonClient = (url, options = {}) => {\n const token = localStorage.getItem(\"access_token\");\n console.log(\"httpClient \" + url);\n if (token != null) {\n options.user = {\n authenticated: true,\n token: `Bearer ${token}`,\n };\n }\n return fetchUtils.fetchJson(url, options);\n};\n\nconst mxcUrlToHttp = mxcUrl => {\n const homeserver = localStorage.getItem(\"base_url\");\n const re = /^mxc:\\/\\/([^/]+)\\/(\\w+)/;\n var ret = re.exec(mxcUrl);\n console.log(\"mxcClient \" + ret);\n if (ret == null) return null;\n const serverName = ret[1];\n const mediaId = ret[2];\n return `${homeserver}/_matrix/media/r0/thumbnail/${serverName}/${mediaId}?width=24&height=24&method=scale`;\n};\n\nconst resourceMap = {\n users: {\n path: \"/_synapse/admin/v2/users\",\n map: u => ({\n ...u,\n id: u.name,\n avatar_src: mxcUrlToHttp(u.avatar_url),\n is_guest: !!u.is_guest,\n admin: !!u.admin,\n deactivated: !!u.deactivated,\n // need timestamp in milliseconds\n creation_ts_ms: u.creation_ts * 1000,\n }),\n data: \"users\",\n total: json => json.total,\n create: data => ({\n endpoint: `/_synapse/admin/v2/users/@${data.id}:${localStorage.getItem(\n \"home_server\"\n )}`,\n body: data,\n method: \"PUT\",\n }),\n delete: params => ({\n endpoint: `/_synapse/admin/v1/deactivate/${params.id}`,\n body: { erase: true },\n method: \"POST\",\n }),\n },\n rooms: {\n path: \"/_synapse/admin/v1/rooms\",\n map: r => ({\n ...r,\n id: r.room_id,\n alias: r.canonical_alias,\n members: r.joined_members,\n is_encrypted: !!r.encryption,\n federatable: !!r.federatable,\n public: !!r.public,\n }),\n data: \"rooms\",\n total: json => {\n return json.total_rooms;\n },\n delete: params => ({\n endpoint: `/_synapse/admin/v1/rooms/${params.id}`,\n body: { block: false },\n }),\n },\n reports: {\n path: \"/_synapse/admin/v1/event_reports\",\n map: er => ({\n ...er,\n id: er.id,\n }),\n data: \"event_reports\",\n total: json => json.total,\n },\n devices: {\n map: d => ({\n ...d,\n id: d.device_id,\n }),\n data: \"devices\",\n total: json => {\n return json.total;\n },\n reference: id => ({\n endpoint: `/_synapse/admin/v2/users/${id}/devices`,\n }),\n delete: params => ({\n endpoint: `/_synapse/admin/v2/users/${params.user_id}/devices/${params.id}`,\n }),\n },\n connections: {\n path: \"/_synapse/admin/v1/whois\",\n map: c => ({\n ...c,\n id: c.user_id,\n }),\n data: \"connections\",\n },\n room_members: {\n map: m => ({\n id: m,\n }),\n reference: id => ({\n endpoint: `/_synapse/admin/v1/rooms/${id}/members`,\n }),\n data: \"members\",\n total: json => {\n return json.total;\n },\n },\n room_state: {\n map: rs => ({\n ...rs,\n id: rs.event_id,\n }),\n reference: id => ({\n endpoint: `/_synapse/admin/v1/rooms/${id}/state`,\n }),\n data: \"state\",\n total: json => {\n return json.state.length;\n },\n },\n pushers: {\n map: p => ({\n ...p,\n id: p.pushkey,\n }),\n reference: id => ({\n endpoint: `/_synapse/admin/v1/users/${id}/pushers`,\n }),\n data: \"pushers\",\n total: json => {\n return json.total;\n },\n },\n joined_rooms: {\n map: jr => ({\n id: jr,\n }),\n reference: id => ({\n endpoint: `/_synapse/admin/v1/users/${id}/joined_rooms`,\n }),\n data: \"joined_rooms\",\n total: json => {\n return json.total;\n },\n },\n users_media: {\n map: um => ({\n ...um,\n id: um.media_id,\n }),\n reference: id => ({\n endpoint: `/_synapse/admin/v1/users/${id}/media`,\n }),\n data: \"media\",\n total: json => {\n return json.total;\n },\n delete: params => ({\n endpoint: `/_synapse/admin/v1/media/${localStorage.getItem(\n \"home_server\"\n )}/${params.id}`,\n }),\n },\n delete_media: {\n delete: params => ({\n endpoint: `/_synapse/admin/v1/media/${localStorage.getItem(\n \"home_server\"\n )}/delete?before_ts=${params.before_ts}&size_gt=${\n params.size_gt\n }&keep_profiles=${params.keep_profiles}`,\n method: \"POST\",\n }),\n },\n protect_media: {\n map: pm => ({ id: pm.media_id }),\n create: params => ({\n endpoint: `/_synapse/admin/v1/media/protect/${params.media_id}`,\n method: \"POST\",\n }),\n delete: params => ({\n endpoint: `/_synapse/admin/v1/media/unprotect/${params.media_id}`,\n method: \"POST\",\n }),\n },\n quarantine_media: {\n map: qm => ({ id: qm.media_id }),\n create: params => ({\n endpoint: `/_synapse/admin/v1/media/quarantine/${localStorage.getItem(\n \"home_server\"\n )}/${params.media_id}`,\n method: \"POST\",\n }),\n delete: params => ({\n endpoint: `/_synapse/admin/v1/media/unquarantine/${localStorage.getItem(\n \"home_server\"\n )}/${params.media_id}`,\n method: \"POST\",\n }),\n },\n servernotices: {\n map: n => ({ id: n.event_id }),\n create: data => ({\n endpoint: \"/_synapse/admin/v1/send_server_notice\",\n body: {\n user_id: data.id,\n content: {\n msgtype: \"m.text\",\n body: data.body,\n },\n },\n method: \"POST\",\n }),\n },\n user_media_statistics: {\n path: \"/_synapse/admin/v1/statistics/users/media\",\n map: usms => ({\n ...usms,\n id: usms.user_id,\n }),\n data: \"users\",\n total: json => {\n return json.total;\n },\n },\n forward_extremities: {\n map: fe => ({\n ...fe,\n id: fe.event_id,\n }),\n reference: id => ({\n endpoint: `/_synapse/admin/v1/rooms/${id}/forward_extremities`,\n }),\n data: \"results\",\n total: json => {\n return json.count;\n },\n delete: params => ({\n endpoint: `/_synapse/admin/v1/rooms/${params.id}/forward_extremities`,\n }),\n },\n room_directory: {\n path: \"/_matrix/client/r0/publicRooms\",\n map: rd => ({\n ...rd,\n id: rd.room_id,\n public: !!rd.public,\n guest_access: !!rd.guest_access,\n avatar_src: mxcUrlToHttp(rd.avatar_url),\n }),\n data: \"chunk\",\n total: json => {\n return json.total_room_count_estimate;\n },\n create: params => ({\n endpoint: `/_matrix/client/r0/directory/list/room/${params.id}`,\n body: { visibility: \"public\" },\n method: \"PUT\",\n }),\n delete: params => ({\n endpoint: `/_matrix/client/r0/directory/list/room/${params.id}`,\n body: { visibility: \"private\" },\n method: \"PUT\",\n }),\n },\n registration_tokens: {\n path: \"/_synapse/admin/v1/registration_tokens\",\n map: rt => ({\n ...rt,\n id: rt.token,\n }),\n data: \"registration_tokens\",\n total: json => {\n return json.registration_tokens.length;\n },\n create: params => ({\n endpoint: \"/_synapse/admin/v1/registration_tokens/new\",\n body: params,\n method: \"POST\",\n }),\n delete: params => ({\n endpoint: `/_synapse/admin/v1/registration_tokens/${params.id}`,\n }),\n },\n};\n\nfunction filterNullValues(key, value) {\n // Filtering out null properties\n if (value === null) {\n return undefined;\n }\n return value;\n}\n\nfunction getSearchOrder(order) {\n if (order === \"DESC\") {\n return \"b\";\n } else {\n return \"f\";\n }\n}\n\nconst dataProvider = {\n getList: (resource, params) => {\n console.log(\"getList \" + resource);\n const { user_id, name, guests, deactivated, search_term, valid } =\n params.filter;\n const { page, perPage } = params.pagination;\n const { field, order } = params.sort;\n const from = (page - 1) * perPage;\n const query = {\n from: from,\n limit: perPage,\n user_id: user_id,\n search_term: search_term,\n name: name,\n guests: guests,\n deactivated: deactivated,\n valid: valid,\n order_by: field,\n dir: getSearchOrder(order),\n };\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n\n const endpoint_url = homeserver + res.path;\n const url = `${endpoint_url}?${stringify(query)}`;\n\n return jsonClient(url).then(({ json }) => ({\n data: json[res.data].map(res.map),\n total: res.total(json, from, perPage),\n }));\n },\n\n getOne: (resource, params) => {\n console.log(\"getOne \" + resource);\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n\n const endpoint_url = homeserver + res.path;\n return jsonClient(`${endpoint_url}/${params.id}`).then(({ json }) => ({\n data: res.map(json),\n }));\n },\n\n getMany: (resource, params) => {\n console.log(\"getMany \" + resource);\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n\n const endpoint_url = homeserver + res.path;\n return Promise.all(\n params.ids.map(id => jsonClient(`${endpoint_url}/${id}`))\n ).then(responses => ({\n data: responses.map(({ json }) => res.map(json)),\n total: responses.length,\n }));\n },\n\n getManyReference: (resource, params) => {\n console.log(\"getManyReference \" + resource);\n const { page, perPage } = params.pagination;\n const { field, order } = params.sort;\n const from = (page - 1) * perPage;\n const query = {\n from: from,\n limit: perPage,\n order_by: field,\n dir: getSearchOrder(order),\n };\n\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n\n const ref = res[\"reference\"](params.id);\n const endpoint_url = `${homeserver}${ref.endpoint}?${stringify(query)}`;\n\n return jsonClient(endpoint_url).then(({ headers, json }) => ({\n data: json[res.data].map(res.map),\n total: res.total(json, from, perPage),\n }));\n },\n\n update: (resource, params) => {\n console.log(\"update \" + resource);\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n\n const endpoint_url = homeserver + res.path;\n return jsonClient(`${endpoint_url}/${params.data.id}`, {\n method: \"PUT\",\n body: JSON.stringify(params.data, filterNullValues),\n }).then(({ json }) => ({\n data: res.map(json),\n }));\n },\n\n updateMany: (resource, params) => {\n console.log(\"updateMany \" + resource);\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n\n const endpoint_url = homeserver + res.path;\n return Promise.all(\n params.ids.map(id => jsonClient(`${endpoint_url}/${id}`), {\n method: \"PUT\",\n body: JSON.stringify(params.data, filterNullValues),\n })\n ).then(responses => ({\n data: responses.map(({ json }) => json),\n }));\n },\n\n create: (resource, params) => {\n console.log(\"create \" + resource);\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n if (!(\"create\" in res)) return Promise.reject();\n\n const create = res[\"create\"](params.data);\n const endpoint_url = homeserver + create.endpoint;\n return jsonClient(endpoint_url, {\n method: create.method,\n body: JSON.stringify(create.body, filterNullValues),\n }).then(({ json }) => ({\n data: res.map(json),\n }));\n },\n\n createMany: (resource, params) => {\n console.log(\"createMany \" + resource);\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n if (!(\"create\" in res)) return Promise.reject();\n\n return Promise.all(\n params.ids.map(id => {\n params.data.id = id;\n const cre = res[\"create\"](params.data);\n const endpoint_url = homeserver + cre.endpoint;\n return jsonClient(endpoint_url, {\n method: cre.method,\n body: JSON.stringify(cre.body, filterNullValues),\n });\n })\n ).then(responses => ({\n data: responses.map(({ json }) => json),\n }));\n },\n\n delete: (resource, params) => {\n console.log(\"delete \" + resource);\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n\n if (\"delete\" in res) {\n const del = res[\"delete\"](params);\n const endpoint_url = homeserver + del.endpoint;\n return jsonClient(endpoint_url, {\n method: \"method\" in del ? del.method : \"DELETE\",\n body: \"body\" in del ? JSON.stringify(del.body) : null,\n }).then(({ json }) => ({\n data: json,\n }));\n } else {\n const endpoint_url = homeserver + res.path;\n return jsonClient(`${endpoint_url}/${params.id}`, {\n method: \"DELETE\",\n body: JSON.stringify(params.data, filterNullValues),\n }).then(({ json }) => ({\n data: json,\n }));\n }\n },\n\n deleteMany: (resource, params) => {\n console.log(\"deleteMany \" + resource);\n const homeserver = localStorage.getItem(\"base_url\");\n if (!homeserver || !(resource in resourceMap)) return Promise.reject();\n\n const res = resourceMap[resource];\n\n if (\"delete\" in res) {\n return Promise.all(\n params.ids.map(id => {\n const del = res[\"delete\"]({ ...params, id: id });\n const endpoint_url = homeserver + del.endpoint;\n return jsonClient(endpoint_url, {\n method: \"method\" in del ? del.method : \"DELETE\",\n body: \"body\" in del ? JSON.stringify(del.body) : null,\n });\n })\n ).then(responses => ({\n data: responses.map(({ json }) => json),\n }));\n } else {\n const endpoint_url = homeserver + res.path;\n return Promise.all(\n params.ids.map(id =>\n jsonClient(`${endpoint_url}/${id}`, {\n method: \"DELETE\",\n body: JSON.stringify(params.data, filterNullValues),\n })\n )\n ).then(responses => ({\n data: responses.map(({ json }) => json),\n }));\n }\n },\n};\n\nexport default dataProvider;\n","import React, { Fragment, useState } from \"react\";\nimport {\n Button,\n SaveButton,\n SimpleForm,\n TextInput,\n Toolbar,\n required,\n useCreate,\n useMutation,\n useNotify,\n useTranslate,\n useUnselectAll,\n} from \"react-admin\";\nimport MessageIcon from \"@material-ui/icons/Message\";\nimport IconCancel from \"@material-ui/icons/Cancel\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport DialogContent from \"@material-ui/core/DialogContent\";\nimport DialogContentText from \"@material-ui/core/DialogContentText\";\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\n\nconst ServerNoticeDialog = ({ open, loading, onClose, onSend }) => {\n const translate = useTranslate();\n\n const ServerNoticeToolbar = props => (\n <Toolbar {...props}>\n <SaveButton\n label=\"resources.servernotices.action.send\"\n disabled={props.pristine}\n />\n <Button label=\"ra.action.cancel\" onClick={onClose}>\n <IconCancel />\n </Button>\n </Toolbar>\n );\n\n return (\n <Dialog open={open} onClose={onClose} loading={loading}>\n <DialogTitle>\n {translate(\"resources.servernotices.action.send\")}\n </DialogTitle>\n <DialogContent>\n <DialogContentText>\n {translate(\"resources.servernotices.helper.send\")}\n </DialogContentText>\n <SimpleForm\n toolbar={<ServerNoticeToolbar />}\n submitOnEnter={false}\n redirect={false}\n save={onSend}\n >\n <TextInput\n source=\"body\"\n label=\"resources.servernotices.fields.body\"\n fullWidth\n multiline\n rows=\"4\"\n resettable\n validate={required()}\n />\n </SimpleForm>\n </DialogContent>\n </Dialog>\n );\n};\n\nexport const ServerNoticeButton = ({ record }) => {\n const [open, setOpen] = useState(false);\n const notify = useNotify();\n const [create, { loading }] = useCreate(\"servernotices\");\n\n const handleDialogOpen = () => setOpen(true);\n const handleDialogClose = () => setOpen(false);\n\n const handleSend = values => {\n create(\n { payload: { data: { id: record.id, ...values } } },\n {\n onSuccess: () => {\n notify(\"resources.servernotices.action.send_success\");\n handleDialogClose();\n },\n onFailure: () =>\n notify(\"resources.servernotices.action.send_failure\", \"error\"),\n }\n );\n };\n\n return (\n <Fragment>\n <Button\n label=\"resources.servernotices.send\"\n onClick={handleDialogOpen}\n disabled={loading}\n >\n <MessageIcon />\n </Button>\n <ServerNoticeDialog\n open={open}\n onClose={handleDialogClose}\n onSend={handleSend}\n />\n </Fragment>\n );\n};\n\nexport const ServerNoticeBulkButton = ({ selectedIds }) => {\n const [open, setOpen] = useState(false);\n const notify = useNotify();\n const unselectAll = useUnselectAll();\n const [createMany, { loading }] = useMutation();\n\n const handleDialogOpen = () => setOpen(true);\n const handleDialogClose = () => setOpen(false);\n\n const handleSend = values => {\n createMany(\n {\n type: \"createMany\",\n resource: \"servernotices\",\n payload: { ids: selectedIds, data: values },\n },\n {\n onSuccess: ({ data }) => {\n notify(\"resources.servernotices.action.send_success\");\n unselectAll(\"users\");\n handleDialogClose();\n },\n onFailure: error =>\n notify(\"resources.servernotices.action.send_failure\", \"error\"),\n }\n );\n };\n\n return (\n <Fragment>\n <Button\n label=\"resources.servernotices.send\"\n onClick={handleDialogOpen}\n disabled={loading}\n >\n <MessageIcon />\n </Button>\n <ServerNoticeDialog\n open={open}\n onClose={handleDialogClose}\n onSend={handleSend}\n />\n </Fragment>\n );\n};\n","import React, { Fragment, useState } from \"react\";\nimport {\n Button,\n useMutation,\n useNotify,\n Confirm,\n useRefresh,\n} from \"react-admin\";\nimport ActionDelete from \"@material-ui/icons/Delete\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport { alpha } from \"@material-ui/core/styles/colorManipulator\";\nimport classnames from \"classnames\";\n\nconst useStyles = makeStyles(\n theme => ({\n deleteButton: {\n color: theme.palette.error.main,\n \"&:hover\": {\n backgroundColor: alpha(theme.palette.error.main, 0.12),\n // Reset on mouse devices\n \"@media (hover: none)\": {\n backgroundColor: \"transparent\",\n },\n },\n },\n }),\n { name: \"RaDeleteDeviceButton\" }\n);\n\nexport const DeviceRemoveButton = props => {\n const { record } = props;\n const classes = useStyles(props);\n const [open, setOpen] = useState(false);\n const refresh = useRefresh();\n const notify = useNotify();\n\n const [removeDevice, { loading }] = useMutation();\n\n if (!record) return null;\n\n const handleClick = () => setOpen(true);\n const handleDialogClose = () => setOpen(false);\n\n const handleConfirm = () => {\n removeDevice(\n {\n type: \"delete\",\n resource: \"devices\",\n payload: {\n id: record.id,\n user_id: record.user_id,\n },\n },\n {\n onSuccess: () => {\n notify(\"resources.devices.action.erase.success\");\n refresh();\n },\n onFailure: () =>\n notify(\"resources.devices.action.erase.failure\", \"error\"),\n }\n );\n setOpen(false);\n };\n\n return (\n <Fragment>\n <Button\n label=\"ra.action.remove\"\n onClick={handleClick}\n className={classnames(\"ra-delete-button\", classes.deleteButton)}\n >\n <ActionDelete />\n </Button>\n <Confirm\n isOpen={open}\n loading={loading}\n onConfirm={handleConfirm}\n onClose={handleDialogClose}\n title=\"resources.devices.action.erase.title\"\n content=\"resources.devices.action.erase.content\"\n translateOptions={{\n id: record.id,\n name: record.display_name ? record.display_name : record.id,\n }}\n />\n </Fragment>\n );\n};\n","import React, { Fragment, useState } from \"react\";\nimport classnames from \"classnames\";\nimport { alpha } from \"@material-ui/core/styles/colorManipulator\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport { Tooltip } from \"@material-ui/core\";\nimport {\n BooleanInput,\n Button,\n DateTimeInput,\n NumberInput,\n SaveButton,\n SimpleForm,\n Toolbar,\n useCreate,\n useDelete,\n useNotify,\n useRefresh,\n useTranslate,\n} from \"react-admin\";\nimport BlockIcon from \"@material-ui/icons/Block\";\nimport ClearIcon from \"@material-ui/icons/Clear\";\nimport DeleteSweepIcon from \"@material-ui/icons/DeleteSweep\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport DialogContent from \"@material-ui/core/DialogContent\";\nimport DialogContentText from \"@material-ui/core/DialogContentText\";\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\nimport IconCancel from \"@material-ui/icons/Cancel\";\nimport LockIcon from \"@material-ui/icons/Lock\";\nimport LockOpenIcon from \"@material-ui/icons/LockOpen\";\n\nconst useStyles = makeStyles(\n theme => ({\n deleteButton: {\n color: theme.palette.error.main,\n \"&:hover\": {\n backgroundColor: alpha(theme.palette.error.main, 0.12),\n // Reset on mouse devices\n \"@media (hover: none)\": {\n backgroundColor: \"transparent\",\n },\n },\n },\n }),\n { name: \"RaDeleteDeviceButton\" }\n);\n\nconst DeleteMediaDialog = ({ open, loading, onClose, onSend }) => {\n const translate = useTranslate();\n\n const dateParser = v => {\n const d = new Date(v);\n if (isNaN(d)) return 0;\n return d.getTime();\n };\n\n const DeleteMediaToolbar = props => {\n return (\n <Toolbar {...props}>\n <SaveButton\n label=\"resources.delete_media.action.send\"\n icon={<DeleteSweepIcon />}\n />\n <Button label=\"ra.action.cancel\" onClick={onClose}>\n <IconCancel />\n </Button>\n </Toolbar>\n );\n };\n\n return (\n <Dialog open={open} onClose={onClose} loading={loading}>\n <DialogTitle>\n {translate(\"resources.delete_media.action.send\")}\n </DialogTitle>\n <DialogContent>\n <DialogContentText>\n {translate(\"resources.delete_media.helper.send\")}\n </DialogContentText>\n <SimpleForm\n toolbar={<DeleteMediaToolbar />}\n submitOnEnter={false}\n redirect={false}\n save={onSend}\n >\n <DateTimeInput\n fullWidth\n source=\"before_ts\"\n label=\"resources.delete_media.fields.before_ts\"\n defaultValue={0}\n parse={dateParser}\n />\n <NumberInput\n fullWidth\n source=\"size_gt\"\n label=\"resources.delete_media.fields.size_gt\"\n defaultValue={0}\n min={0}\n step={1024}\n />\n <BooleanInput\n fullWidth\n source=\"keep_profiles\"\n label=\"resources.delete_media.fields.keep_profiles\"\n defaultValue={true}\n />\n </SimpleForm>\n </DialogContent>\n </Dialog>\n );\n};\n\nexport const DeleteMediaButton = props => {\n const classes = useStyles(props);\n const [open, setOpen] = useState(false);\n const notify = useNotify();\n const [deleteOne, { loading }] = useDelete(\"delete_media\");\n\n const handleDialogOpen = () => setOpen(true);\n const handleDialogClose = () => setOpen(false);\n\n const handleSend = values => {\n deleteOne(\n { payload: { ...values } },\n {\n onSuccess: () => {\n notify(\"resources.delete_media.action.send_success\");\n handleDialogClose();\n },\n onFailure: () =>\n notify(\"resources.delete_media.action.send_failure\", \"error\"),\n }\n );\n };\n\n return (\n <Fragment>\n <Button\n label=\"resources.delete_media.action.send\"\n onClick={handleDialogOpen}\n disabled={loading}\n className={classnames(\"ra-delete-button\", classes.deleteButton)}\n >\n <DeleteSweepIcon />\n </Button>\n <DeleteMediaDialog\n open={open}\n onClose={handleDialogClose}\n onSend={handleSend}\n />\n </Fragment>\n );\n};\n\nexport const ProtectMediaButton = props => {\n const { record } = props;\n const translate = useTranslate();\n const refresh = useRefresh();\n const notify = useNotify();\n const [create, { loading }] = useCreate(\"protect_media\");\n const [deleteOne] = useDelete(\"protect_media\");\n\n if (!record) return null;\n\n const handleProtect = () => {\n create(\n { payload: { data: record } },\n {\n onSuccess: () => {\n notify(\"resources.protect_media.action.send_success\");\n refresh();\n },\n onFailure: () =>\n notify(\"resources.protect_media.action.send_failure\", \"error\"),\n }\n );\n };\n\n const handleUnprotect = () => {\n deleteOne(\n { payload: { ...record } },\n {\n onSuccess: () => {\n notify(\"resources.protect_media.action.send_success\");\n refresh();\n },\n onFailure: () =>\n notify(\"resources.protect_media.action.send_failure\", \"error\"),\n }\n );\n };\n\n return (\n /*\n Wrapping Tooltip with <div>\n https://github.com/marmelab/react-admin/issues/4349#issuecomment-578594735\n */\n <Fragment>\n {record.quarantined_by && (\n <Tooltip\n title={translate(\"resources.protect_media.action.none\", {\n _: \"resources.protect_media.action.none\",\n })}\n >\n <div>\n {/*\n Button instead BooleanField for\n consistent appearance and position in the column\n */}\n <Button disabled={true}>\n <ClearIcon />\n </Button>\n </div>\n </Tooltip>\n )}\n {record.safe_from_quarantine && (\n <Tooltip\n title={translate(\"resources.protect_media.action.delete\", {\n _: \"resources.protect_media.action.delete\",\n })}\n arrow\n >\n <div>\n <Button onClick={handleUnprotect} disabled={loading}>\n <LockIcon />\n </Button>\n </div>\n </Tooltip>\n )}\n {!record.safe_from_quarantine && !record.quarantined_by && (\n <Tooltip\n title={translate(\"resources.protect_media.action.create\", {\n _: \"resources.protect_media.action.create\",\n })}\n >\n <div>\n <Button onClick={handleProtect} disabled={loading}>\n <LockOpenIcon />\n </Button>\n </div>\n </Tooltip>\n )}\n </Fragment>\n );\n};\n\nexport const QuarantineMediaButton = props => {\n const { record } = props;\n const translate = useTranslate();\n const refresh = useRefresh();\n const notify = useNotify();\n const [create, { loading }] = useCreate(\"quarantine_media\");\n const [deleteOne] = useDelete(\"quarantine_media\");\n\n if (!record) return null;\n\n const handleQuarantaine = () => {\n create(\n { payload: { data: record } },\n {\n onSuccess: () => {\n notify(\"resources.quarantine_media.action.send_success\");\n refresh();\n },\n onFailure: () =>\n notify(\"resources.quarantine_media.action.send_failure\", \"error\"),\n }\n );\n };\n\n const handleRemoveQuarantaine = () => {\n deleteOne(\n { payload: { ...record } },\n {\n onSuccess: () => {\n notify(\"resources.quarantine_media.action.send_success\");\n refresh();\n },\n onFailure: () =>\n notify(\"resources.quarantine_media.action.send_failure\", \"error\"),\n }\n );\n };\n\n return (\n <Fragment>\n {record.safe_from_quarantine && (\n <Tooltip\n title={translate(\"resources.quarantine_media.action.none\", {\n _: \"resources.quarantine_media.action.none\",\n })}\n >\n <div>\n <Button disabled={true}>\n <ClearIcon />\n </Button>\n </div>\n </Tooltip>\n )}\n {record.quarantined_by && (\n <Tooltip\n title={translate(\"resources.quarantine_media.action.delete\", {\n _: \"resources.quarantine_media.action.delete\",\n })}\n >\n <div>\n <Button onClick={handleRemoveQuarantaine} disabled={loading}>\n <BlockIcon color=\"error\" />\n </Button>\n </div>\n </Tooltip>\n )}\n {!record.safe_from_quarantine && !record.quarantined_by && (\n <Tooltip\n title={translate(\"resources.quarantine_media.action.create\", {\n _: \"resources.quarantine_media.action.create\",\n })}\n >\n <div>\n <Button onClick={handleQuarantaine} disabled={loading}>\n <BlockIcon />\n </Button>\n </div>\n </Tooltip>\n )}\n </Fragment>\n );\n};\n","import React, { cloneElement, Fragment } from \"react\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport AssignmentIndIcon from \"@material-ui/icons/AssignmentInd\";\nimport ContactMailIcon from \"@material-ui/icons/ContactMail\";\nimport DevicesIcon from \"@material-ui/icons/Devices\";\nimport GetAppIcon from \"@material-ui/icons/GetApp\";\nimport NotificationsIcon from \"@material-ui/icons/Notifications\";\nimport PermMediaIcon from \"@material-ui/icons/PermMedia\";\nimport PersonPinIcon from \"@material-ui/icons/PersonPin\";\nimport SettingsInputComponentIcon from \"@material-ui/icons/SettingsInputComponent\";\nimport ViewListIcon from \"@material-ui/icons/ViewList\";\nimport {\n ArrayInput,\n ArrayField,\n Button,\n Datagrid,\n DateField,\n Create,\n Edit,\n List,\n Filter,\n Toolbar,\n SimpleForm,\n SimpleFormIterator,\n TabbedForm,\n FormTab,\n BooleanField,\n BooleanInput,\n PasswordInput,\n TextField,\n TextInput,\n ReferenceField,\n ReferenceManyField,\n SearchInput,\n SelectInput,\n BulkDeleteButton,\n DeleteButton,\n SaveButton,\n maxLength,\n regex,\n required,\n useTranslate,\n Pagination,\n CreateButton,\n ExportButton,\n TopToolbar,\n sanitizeListRestProps,\n NumberField,\n} from \"react-admin\";\nimport { Link } from \"react-router-dom\";\nimport { ServerNoticeButton, ServerNoticeBulkButton } from \"./ServerNotices\";\nimport { DeviceRemoveButton } from \"./devices\";\nimport { ProtectMediaButton, QuarantineMediaButton } from \"./media\";\nimport { makeStyles } from \"@material-ui/core/styles\";\n\nconst redirect = () => {\n return {\n pathname: \"/import_users\",\n };\n};\n\nconst useStyles = makeStyles({\n small: {\n height: \"40px\",\n width: \"40px\",\n },\n large: {\n height: \"120px\",\n width: \"120px\",\n float: \"right\",\n },\n});\n\nconst date_format = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n};\n\nconst UserListActions = ({\n currentSort,\n className,\n resource,\n filters,\n displayedFilters,\n exporter, // you can hide ExportButton if exporter = (null || false)\n filterValues,\n permanentFilter,\n hasCreate, // you can hide CreateButton if hasCreate = false\n basePath,\n selectedIds,\n onUnselectItems,\n showFilter,\n maxResults,\n total,\n ...rest\n}) => {\n return (\n <TopToolbar className={className} {...sanitizeListRestProps(rest)}>\n {filters &&\n cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: \"button\",\n })}\n <CreateButton basePath={basePath} />\n <ExportButton\n disabled={total === 0}\n resource={resource}\n sort={currentSort}\n filter={{ ...filterValues, ...permanentFilter }}\n exporter={exporter}\n maxResults={maxResults}\n />\n {/* Add your custom actions */}\n <Button component={Link} to={redirect} label=\"CSV Import\">\n <GetAppIcon style={{ transform: \"rotate(180deg)\", fontSize: \"20\" }} />\n </Button>\n </TopToolbar>\n );\n};\n\nUserListActions.defaultProps = {\n selectedIds: [],\n onUnselectItems: () => null,\n};\n\nconst UserPagination = props => (\n <Pagination {...props} rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />\n);\n\nconst UserFilter = props => (\n <Filter {...props}>\n <SearchInput source=\"name\" alwaysOn />\n <BooleanInput source=\"guests\" alwaysOn />\n <BooleanInput\n label=\"resources.users.fields.show_deactivated\"\n source=\"deactivated\"\n alwaysOn\n />\n </Filter>\n);\n\nconst UserBulkActionButtons = props => (\n <Fragment>\n <ServerNoticeBulkButton {...props} />\n <BulkDeleteButton\n {...props}\n label=\"resources.users.action.erase\"\n confirmTitle=\"resources.users.helper.erase\"\n mutationMode=\"pessimistic\"\n />\n </Fragment>\n);\n\nconst AvatarField = ({ source, className, record = {} }) => (\n <Avatar src={record[source]} className={className} />\n);\n\nexport const UserList = props => {\n const classes = useStyles();\n return (\n <List\n {...props}\n filters={<UserFilter />}\n filterDefaultValues={{ guests: true, deactivated: false }}\n sort={{ field: \"name\", order: \"ASC\" }}\n actions={<UserListActions maxResults={10000} />}\n bulkActionButtons={<UserBulkActionButtons />}\n pagination={<UserPagination />}\n >\n <Datagrid rowClick=\"edit\">\n <AvatarField\n source=\"avatar_src\"\n className={classes.small}\n sortBy=\"avatar_url\"\n />\n <TextField source=\"id\" sortBy=\"name\" />\n <TextField source=\"displayname\" />\n <BooleanField source=\"is_guest\" />\n <BooleanField source=\"admin\" />\n <BooleanField source=\"deactivated\" />\n <DateField\n source=\"creation_ts\"\n label=\"resources.users.fields.creation_ts_ms\"\n showTime\n options={date_format}\n />\n </Datagrid>\n </List>\n );\n};\n\n// https://matrix.org/docs/spec/appendices#user-identifiers\n// here only local part of user_id\n// maxLength = 255 - \"@\" - \":\" - localStorage.getItem(\"home_server\").length\n// localStorage.getItem(\"home_server\").length is not valid here\nconst validateUser = [\n required(),\n maxLength(253),\n regex(/^[a-z0-9._=\\-/]+$/, \"synapseadmin.users.invalid_user_id\"),\n];\n\nconst validateAddress = [required(), maxLength(255)];\n\nexport function generateRandomUser() {\n const homeserver = localStorage.getItem(\"home_server\");\n const user_id =\n \"@\" +\n Array(8)\n .fill(\"0123456789abcdefghijklmnopqrstuvwxyz\")\n .map(\n x =>\n x[\n Math.floor(\n (crypto.getRandomValues(new Uint32Array(1))[0] /\n (0xffffffff + 1)) *\n x.length\n )\n ]\n )\n .join(\"\") +\n \":\" +\n homeserver;\n\n const password = Array(20)\n .fill(\n \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!@-#$\"\n )\n .map(\n x =>\n x[\n Math.floor(\n (crypto.getRandomValues(new Uint32Array(1))[0] / (0xffffffff + 1)) *\n x.length\n )\n ]\n )\n .join(\"\");\n\n return {\n id: user_id,\n password: password,\n };\n}\n\nconst UserEditToolbar = props => {\n const translate = useTranslate();\n return (\n <Toolbar {...props}>\n <SaveButton submitOnEnter={true} disabled={props.pristine} />\n <DeleteButton\n label=\"resources.users.action.erase\"\n confirmTitle={translate(\"resources.users.helper.erase\", {\n smart_count: 1,\n })}\n mutationMode=\"pessimistic\"\n />\n <ServerNoticeButton />\n </Toolbar>\n );\n};\n\nexport const UserCreate = props => (\n <Create {...props}>\n <SimpleForm>\n <TextInput source=\"id\" autoComplete=\"off\" validate={validateUser} />\n <TextInput source=\"displayname\" validate={maxLength(256)} />\n <PasswordInput\n source=\"password\"\n autoComplete=\"new-password\"\n validate={maxLength(512)}\n />\n <BooleanInput source=\"admin\" />\n <ArrayInput source=\"threepids\">\n <SimpleFormIterator disableReordering>\n <SelectInput\n source=\"medium\"\n choices={[\n { id: \"email\", name: \"resources.users.email\" },\n { id: \"msisdn\", name: \"resources.users.msisdn\" },\n ]}\n validate={required()}\n />\n <TextInput source=\"address\" validate={validateAddress} />\n </SimpleFormIterator>\n </ArrayInput>\n <ArrayInput source=\"external_ids\" label=\"synapseadmin.users.tabs.sso\">\n <SimpleFormIterator disableReordering>\n <TextInput source=\"auth_provider\" validate={required()} />\n <TextInput\n source=\"external_id\"\n label=\"resources.users.fields.id\"\n validate={required()}\n />\n </SimpleFormIterator>\n </ArrayInput>\n </SimpleForm>\n </Create>\n);\n\nconst UserTitle = ({ record }) => {\n const translate = useTranslate();\n return (\n <span>\n {translate(\"resources.users.name\", {\n smart_count: 1,\n })}{\" \"}\n {record ? `\"${record.displayname}\"` : \"\"}\n </span>\n );\n};\nexport const UserEdit = props => {\n const classes = useStyles();\n const translate = useTranslate();\n return (\n <Edit {...props} title={<UserTitle />}>\n <TabbedForm toolbar={<UserEditToolbar />}>\n <FormTab\n label={translate(\"resources.users.name\", { smart_count: 1 })}\n icon={<PersonPinIcon />}\n >\n <AvatarField\n source=\"avatar_src\"\n sortable={false}\n className={classes.large}\n />\n <TextInput source=\"id\" disabled />\n <TextInput source=\"displayname\" />\n <PasswordInput source=\"password\" autoComplete=\"new-password\" />\n <BooleanInput source=\"admin\" />\n <BooleanInput\n source=\"deactivated\"\n helperText=\"resources.users.helper.deactivate\"\n />\n <DateField source=\"creation_ts_ms\" showTime options={date_format} />\n <TextField source=\"consent_version\" />\n </FormTab>\n\n <FormTab\n label=\"resources.users.threepid\"\n icon={<ContactMailIcon />}\n path=\"threepid\"\n >\n <ArrayInput source=\"threepids\">\n <SimpleFormIterator disableReordering>\n <SelectInput\n source=\"medium\"\n choices={[\n { id: \"email\", name: \"resources.users.email\" },\n { id: \"msisdn\", name: \"resources.users.msisdn\" },\n ]}\n />\n <TextInput source=\"address\" />\n </SimpleFormIterator>\n </ArrayInput>\n </FormTab>\n\n <FormTab\n label=\"synapseadmin.users.tabs.sso\"\n icon={<AssignmentIndIcon />}\n path=\"sso\"\n >\n <ArrayInput source=\"external_ids\" label={false}>\n <SimpleFormIterator disableReordering>\n <TextInput source=\"auth_provider\" validate={required()} />\n <TextInput\n source=\"external_id\"\n label=\"resources.users.fields.id\"\n validate={required()}\n />\n </SimpleFormIterator>\n </ArrayInput>\n </FormTab>\n\n <FormTab\n label={translate(\"resources.devices.name\", { smart_count: 2 })}\n icon={<DevicesIcon />}\n path=\"devices\"\n >\n <ReferenceManyField\n reference=\"devices\"\n target=\"user_id\"\n addLabel={false}\n >\n <Datagrid style={{ width: \"100%\" }}>\n <TextField source=\"device_id\" sortable={false} />\n <TextField source=\"display_name\" sortable={false} />\n <TextField source=\"last_seen_ip\" sortable={false} />\n <DateField\n source=\"last_seen_ts\"\n showTime\n options={date_format}\n sortable={false}\n />\n <DeviceRemoveButton />\n </Datagrid>\n </ReferenceManyField>\n </FormTab>\n\n <FormTab\n label=\"resources.connections.name\"\n icon={<SettingsInputComponentIcon />}\n path=\"connections\"\n >\n <ReferenceField\n reference=\"connections\"\n source=\"id\"\n addLabel={false}\n link={false}\n >\n <ArrayField\n source=\"devices[].sessions[0].connections\"\n label=\"resources.connections.name\"\n >\n <Datagrid style={{ width: \"100%\" }}>\n <TextField source=\"ip\" sortable={false} />\n <DateField\n source=\"last_seen\"\n showTime\n options={date_format}\n sortable={false}\n />\n <TextField\n source=\"user_agent\"\n sortable={false}\n style={{ width: \"100%\" }}\n />\n </Datagrid>\n </ArrayField>\n </ReferenceField>\n </FormTab>\n\n <FormTab\n label={translate(\"resources.users_media.name\", { smart_count: 2 })}\n icon={<PermMediaIcon />}\n path=\"media\"\n >\n <ReferenceManyField\n reference=\"users_media\"\n target=\"user_id\"\n addLabel={false}\n pagination={<UserPagination />}\n perPage={50}\n sort={{ field: \"created_ts\", order: \"DESC\" }}\n >\n <Datagrid style={{ width: \"100%\" }}>\n <DateField source=\"created_ts\" showTime options={date_format} />\n <DateField\n source=\"last_access_ts\"\n showTime\n options={date_format}\n />\n <TextField source=\"media_id\" />\n <NumberField source=\"media_length\" />\n <TextField source=\"media_type\" />\n <TextField source=\"upload_name\" />\n <TextField source=\"quarantined_by\" />\n <QuarantineMediaButton label=\"resources.quarantine_media.action.name\" />\n <ProtectMediaButton label=\"resources.users_media.fields.safe_from_quarantine\" />\n <DeleteButton mutationMode=\"pessimistic\" redirect={false} />\n </Datagrid>\n </ReferenceManyField>\n </FormTab>\n\n <FormTab\n label={translate(\"resources.rooms.name\", { smart_count: 2 })}\n icon={<ViewListIcon />}\n path=\"rooms\"\n >\n <ReferenceManyField\n reference=\"joined_rooms\"\n target=\"user_id\"\n addLabel={false}\n >\n <Datagrid\n style={{ width: \"100%\" }}\n rowClick={(id, basePath, record) => \"/rooms/\" + id + \"/show\"}\n >\n <TextField\n source=\"id\"\n sortable={false}\n label=\"resources.rooms.fields.room_id\"\n />\n <ReferenceField\n label=\"resources.rooms.fields.name\"\n source=\"id\"\n reference=\"rooms\"\n sortable={false}\n link=\"\"\n >\n <TextField source=\"name\" sortable={false} />\n </ReferenceField>\n </Datagrid>\n </ReferenceManyField>\n </FormTab>\n\n <FormTab\n label={translate(\"resources.pushers.name\", { smart_count: 2 })}\n icon={<NotificationsIcon />}\n path=\"pushers\"\n >\n <ReferenceManyField\n reference=\"pushers\"\n target=\"user_id\"\n addLabel={false}\n >\n <Datagrid style={{ width: \"100%\" }}>\n <TextField source=\"kind\" sortable={false} />\n <TextField source=\"app_display_name\" sortable={false} />\n <TextField source=\"app_id\" sortable={false} />\n <TextField source=\"data.url\" sortable={false} />\n <TextField source=\"device_display_name\" sortable={false} />\n <TextField source=\"lang\" sortable={false} />\n <TextField source=\"profile_tag\" sortable={false} />\n <TextField source=\"pushkey\" sortable={false} />\n </Datagrid>\n </ReferenceManyField>\n </FormTab>\n </TabbedForm>\n </Edit>\n );\n};\n","import React, { Fragment } from \"react\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport { Chip } from \"@material-ui/core\";\nimport { connect } from \"react-redux\";\nimport FolderSharedIcon from \"@material-ui/icons/FolderShared\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport {\n BooleanField,\n BulkDeleteButton,\n Button,\n Datagrid,\n DeleteButton,\n Filter,\n List,\n NumberField,\n Pagination,\n TextField,\n useCreate,\n useMutation,\n useNotify,\n useTranslate,\n useRefresh,\n useUnselectAll,\n} from \"react-admin\";\n\nconst useStyles = makeStyles({\n small: {\n height: \"40px\",\n width: \"40px\",\n },\n});\n\nconst RoomDirectoryPagination = props => (\n <Pagination {...props} rowsPerPageOptions={[100, 500, 1000, 2000]} />\n);\n\nexport const RoomDirectoryDeleteButton = props => {\n const translate = useTranslate();\n\n return (\n <DeleteButton\n {...props}\n label=\"resources.room_directory.action.erase\"\n redirect={false}\n mutationMode=\"pessimistic\"\n confirmTitle={translate(\"resources.room_directory.action.title\", {\n smart_count: 1,\n })}\n confirmContent={translate(\"resources.room_directory.action.content\", {\n smart_count: 1,\n })}\n resource=\"room_directory\"\n icon={<FolderSharedIcon />}\n />\n );\n};\n\nexport const RoomDirectoryBulkDeleteButton = props => (\n <BulkDeleteButton\n {...props}\n label=\"resources.room_directory.action.erase\"\n mutationMode=\"pessimistic\"\n confirmTitle=\"resources.room_directory.action.title\"\n confirmContent=\"resources.room_directory.action.content\"\n resource=\"room_directory\"\n icon={<FolderSharedIcon />}\n />\n);\n\nexport const RoomDirectoryBulkSaveButton = ({ selectedIds }) => {\n const notify = useNotify();\n const refresh = useRefresh();\n const unselectAll = useUnselectAll();\n const [createMany, { loading }] = useMutation();\n\n const handleSend = values => {\n createMany(\n {\n type: \"createMany\",\n resource: \"room_directory\",\n payload: { ids: selectedIds, data: {} },\n },\n {\n onSuccess: ({ data }) => {\n notify(\"resources.room_directory.action.send_success\");\n unselectAll(\"rooms\");\n refresh();\n },\n onFailure: error =>\n notify(\"resources.room_directory.action.send_failure\", \"error\"),\n }\n );\n };\n\n return (\n <Button\n label=\"resources.room_directory.action.create\"\n onClick={handleSend}\n disabled={loading}\n >\n <FolderSharedIcon />\n </Button>\n );\n};\n\nexport const RoomDirectorySaveButton = ({ record }) => {\n const notify = useNotify();\n const refresh = useRefresh();\n const [create, { loading }] = useCreate(\"room_directory\");\n\n const handleSend = values => {\n create(\n {\n payload: { data: { id: record.id } },\n },\n {\n onSuccess: ({ data }) => {\n notify(\"resources.room_directory.action.send_success\");\n refresh();\n },\n onFailure: error =>\n notify(\"resources.room_directory.action.send_failure\", \"error\"),\n }\n );\n };\n\n return (\n <Button\n label=\"resources.room_directory.action.create\"\n onClick={handleSend}\n disabled={loading}\n >\n <FolderSharedIcon />\n </Button>\n );\n};\n\nconst RoomDirectoryBulkActionButtons = props => (\n <Fragment>\n <RoomDirectoryBulkDeleteButton {...props} />\n </Fragment>\n);\n\nconst AvatarField = ({ source, className, record = {} }) => (\n <Avatar src={record[source]} className={className} />\n);\n\nconst RoomDirectoryFilter = ({ ...props }) => {\n const translate = useTranslate();\n return (\n <Filter {...props}>\n <Chip\n label={translate(\"resources.rooms.fields.room_id\")}\n source=\"room_id\"\n defaultValue={false}\n style={{ marginBottom: 8 }}\n />\n <Chip\n label={translate(\"resources.rooms.fields.topic\")}\n source=\"topic\"\n defaultValue={false}\n style={{ marginBottom: 8 }}\n />\n <Chip\n label={translate(\"resources.rooms.fields.canonical_alias\")}\n source=\"canonical_alias\"\n defaultValue={false}\n style={{ marginBottom: 8 }}\n />\n </Filter>\n );\n};\n\nexport const FilterableRoomDirectoryList = ({\n roomDirectoryFilters,\n dispatch,\n ...props\n}) => {\n const classes = useStyles();\n const translate = useTranslate();\n const filter = roomDirectoryFilters;\n const roomIdFilter = filter && filter.room_id ? true : false;\n const topicFilter = filter && filter.topic ? true : false;\n const canonicalAliasFilter = filter && filter.canonical_alias ? true : false;\n\n return (\n <List\n {...props}\n pagination={<RoomDirectoryPagination />}\n bulkActionButtons={<RoomDirectoryBulkActionButtons />}\n filters={<RoomDirectoryFilter />}\n perPage={100}\n >\n <Datagrid rowClick={(id, basePath, record) => \"/rooms/\" + id + \"/show\"}>\n <AvatarField\n source=\"avatar_src\"\n sortable={false}\n className={classes.small}\n label={translate(\"resources.rooms.fields.avatar\")}\n />\n <TextField\n source=\"name\"\n sortable={false}\n label={translate(\"resources.rooms.fields.name\")}\n />\n {roomIdFilter && (\n <TextField\n source=\"room_id\"\n sortable={false}\n label={translate(\"resources.rooms.fields.room_id\")}\n />\n )}\n {canonicalAliasFilter && (\n <TextField\n source=\"canonical_alias\"\n sortable={false}\n label={translate(\"resources.rooms.fields.canonical_alias\")}\n />\n )}\n {topicFilter && (\n <TextField\n source=\"topic\"\n sortable={false}\n label={translate(\"resources.rooms.fields.topic\")}\n />\n )}\n <NumberField\n source=\"num_joined_members\"\n sortable={false}\n label={translate(\"resources.rooms.fields.joined_members\")}\n />\n <BooleanField\n source=\"world_readable\"\n sortable={false}\n label={translate(\"resources.room_directory.fields.world_readable\")}\n />\n <BooleanField\n source=\"guest_can_join\"\n sortable={false}\n label={translate(\"resources.room_directory.fields.guest_can_join\")}\n />\n </Datagrid>\n </List>\n );\n};\n\nfunction mapStateToProps(state) {\n return {\n roomDirectoryFilters:\n state.admin.resources.room_directory.list.params.displayedFilters,\n };\n}\n\nexport const RoomDirectoryList = connect(mapStateToProps)(\n FilterableRoomDirectoryList\n);\n","import React, { Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n BooleanField,\n BulkDeleteButton,\n DateField,\n Datagrid,\n DeleteButton,\n Filter,\n List,\n NumberField,\n Pagination,\n ReferenceField,\n ReferenceManyField,\n SearchInput,\n SelectField,\n Show,\n Tab,\n TabbedShowLayout,\n TextField,\n TopToolbar,\n useRecordContext,\n useTranslate,\n} from \"react-admin\";\nimport get from \"lodash/get\";\nimport PropTypes from \"prop-types\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport { Tooltip, Typography, Chip } from \"@material-ui/core\";\nimport FastForwardIcon from \"@material-ui/icons/FastForward\";\nimport HttpsIcon from \"@material-ui/icons/Https\";\nimport NoEncryptionIcon from \"@material-ui/icons/NoEncryption\";\nimport PageviewIcon from \"@material-ui/icons/Pageview\";\nimport UserIcon from \"@material-ui/icons/Group\";\nimport ViewListIcon from \"@material-ui/icons/ViewList\";\nimport VisibilityIcon from \"@material-ui/icons/Visibility\";\nimport EventIcon from \"@material-ui/icons/Event\";\nimport {\n RoomDirectoryBulkDeleteButton,\n RoomDirectoryBulkSaveButton,\n RoomDirectoryDeleteButton,\n RoomDirectorySaveButton,\n} from \"./RoomDirectory\";\n\nconst date_format = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n};\n\nconst useStyles = makeStyles(theme => ({\n helper_forward_extremities: {\n fontFamily: \"Roboto, Helvetica, Arial, sans-serif\",\n margin: \"0.5em\",\n },\n}));\n\nconst RoomPagination = props => (\n <Pagination {...props} rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />\n);\n\nconst EncryptionField = ({ source, record = {}, emptyText }) => {\n const translate = useTranslate();\n const value = get(record, source);\n let ariaLabel = value === false ? \"ra.boolean.false\" : \"ra.boolean.true\";\n\n if (value === false || value === true) {\n return (\n <Typography component=\"span\" variant=\"body2\">\n <Tooltip title={translate(ariaLabel, { _: ariaLabel })}>\n {value === true ? (\n <HttpsIcon data-testid=\"true\" htmlColor=\"limegreen\" />\n ) : (\n <NoEncryptionIcon data-testid=\"false\" color=\"error\" />\n )}\n </Tooltip>\n </Typography>\n );\n }\n\n return (\n <Typography component=\"span\" variant=\"body2\">\n {emptyText}\n </Typography>\n );\n};\n\nconst RoomTitle = ({ record }) => {\n const translate = useTranslate();\n var name = \"\";\n if (record) {\n name = record.name !== \"\" ? record.name : record.id;\n }\n\n return (\n <span>\n {translate(\"resources.rooms.name\", 1)} {name}\n </span>\n );\n};\n\nconst RoomShowActions = ({ basePath, data, resource }) => {\n var roomDirectoryStatus = \"\";\n if (data) {\n roomDirectoryStatus = data.public;\n }\n\n return (\n <TopToolbar>\n {roomDirectoryStatus === false && (\n <RoomDirectorySaveButton record={data} />\n )}\n {roomDirectoryStatus === true && (\n <RoomDirectoryDeleteButton record={data} />\n )}\n <DeleteButton\n basePath={basePath}\n record={data}\n resource={resource}\n mutationMode=\"pessimistic\"\n confirmTitle=\"resources.rooms.action.erase.title\"\n confirmContent=\"resources.rooms.action.erase.content\"\n />\n </TopToolbar>\n );\n};\n\nexport const RoomShow = props => {\n const classes = useStyles({ props });\n const translate = useTranslate();\n return (\n <Show {...props} actions={<RoomShowActions />} title={<RoomTitle />}>\n <TabbedShowLayout>\n <Tab label=\"synapseadmin.rooms.tabs.basic\" icon={<ViewListIcon />}>\n <TextField source=\"room_id\" />\n <TextField source=\"name\" />\n <TextField source=\"canonical_alias\" />\n <ReferenceField source=\"creator\" reference=\"users\">\n <TextField source=\"id\" />\n </ReferenceField>\n </Tab>\n\n <Tab\n label=\"synapseadmin.rooms.tabs.detail\"\n icon={<PageviewIcon />}\n path=\"detail\"\n >\n <TextField source=\"joined_members\" />\n <TextField source=\"joined_local_members\" />\n <TextField source=\"joined_local_devices\" />\n <TextField source=\"state_events\" />\n <TextField source=\"version\" />\n <TextField\n source=\"encryption\"\n emptyText={translate(\"resources.rooms.enums.unencrypted\")}\n />\n </Tab>\n\n <Tab label=\"synapseadmin.rooms.tabs.members\" icon={<UserIcon />}>\n <ReferenceManyField\n reference=\"room_members\"\n target=\"room_id\"\n addLabel={false}\n >\n <Datagrid\n style={{ width: \"100%\" }}\n rowClick={(id, basePath, record) => \"/users/\" + id}\n >\n <TextField\n source=\"id\"\n sortable={false}\n label=\"resources.users.fields.id\"\n />\n <ReferenceField\n label=\"resources.users.fields.displayname\"\n source=\"id\"\n reference=\"users\"\n sortable={false}\n link=\"\"\n >\n <TextField source=\"displayname\" sortable={false} />\n </ReferenceField>\n </Datagrid>\n </ReferenceManyField>\n </Tab>\n\n <Tab\n label=\"synapseadmin.rooms.tabs.permission\"\n icon={<VisibilityIcon />}\n path=\"permission\"\n >\n <BooleanField source=\"federatable\" />\n <BooleanField source=\"public\" />\n <SelectField\n source=\"join_rules\"\n choices={[\n { id: \"public\", name: \"resources.rooms.enums.join_rules.public\" },\n { id: \"knock\", name: \"resources.rooms.enums.join_rules.knock\" },\n { id: \"invite\", name: \"resources.rooms.enums.join_rules.invite\" },\n {\n id: \"private\",\n name: \"resources.rooms.enums.join_rules.private\",\n },\n ]}\n />\n <SelectField\n source=\"guest_access\"\n choices={[\n {\n id: \"can_join\",\n name: \"resources.rooms.enums.guest_access.can_join\",\n },\n {\n id: \"forbidden\",\n name: \"resources.rooms.enums.guest_access.forbidden\",\n },\n ]}\n />\n <SelectField\n source=\"history_visibility\"\n choices={[\n {\n id: \"invited\",\n name: \"resources.rooms.enums.history_visibility.invited\",\n },\n {\n id: \"joined\",\n name: \"resources.rooms.enums.history_visibility.joined\",\n },\n {\n id: \"shared\",\n name: \"resources.rooms.enums.history_visibility.shared\",\n },\n {\n id: \"world_readable\",\n name: \"resources.rooms.enums.history_visibility.world_readable\",\n },\n ]}\n />\n </Tab>\n\n <Tab\n label={translate(\"resources.room_state.name\", { smart_count: 2 })}\n icon={<EventIcon />}\n path=\"state\"\n >\n <ReferenceManyField\n reference=\"room_state\"\n target=\"room_id\"\n addLabel={false}\n >\n <Datagrid style={{ width: \"100%\" }}>\n <TextField source=\"type\" sortable={false} />\n <DateField\n source=\"origin_server_ts\"\n showTime\n options={date_format}\n sortable={false}\n />\n <TextField source=\"content\" sortable={false} />\n <ReferenceField\n source=\"sender\"\n reference=\"users\"\n sortable={false}\n >\n <TextField source=\"id\" />\n </ReferenceField>\n </Datagrid>\n </ReferenceManyField>\n </Tab>\n\n <Tab\n label=\"resources.forward_extremities.name\"\n icon={<FastForwardIcon />}\n path=\"forward_extremities\"\n >\n <div className={classes.helper_forward_extremities}>\n {translate(\"resources.rooms.helper.forward_extremities\")}\n </div>\n <ReferenceManyField\n reference=\"forward_extremities\"\n target=\"room_id\"\n addLabel={false}\n >\n <Datagrid style={{ width: \"100%\" }}>\n <TextField source=\"id\" sortable={false} />\n <DateField\n source=\"received_ts\"\n showTime\n options={date_format}\n sortable={false}\n />\n <NumberField source=\"depth\" sortable={false} />\n <TextField source=\"state_group\" sortable={false} />\n </Datagrid>\n </ReferenceManyField>\n </Tab>\n </TabbedShowLayout>\n </Show>\n );\n};\n\nconst RoomBulkActionButtons = props => (\n <Fragment>\n <RoomDirectoryBulkSaveButton {...props} />\n <RoomDirectoryBulkDeleteButton {...props} />\n <BulkDeleteButton\n {...props}\n confirmTitle=\"resources.rooms.action.erase.title\"\n confirmContent=\"resources.rooms.action.erase.content\"\n mutationMode=\"pessimistic\"\n />\n </Fragment>\n);\n\nconst RoomFilter = ({ ...props }) => {\n const translate = useTranslate();\n return (\n <Filter {...props}>\n <SearchInput source=\"search_term\" alwaysOn />\n <Chip\n label={translate(\"resources.rooms.fields.joined_local_members\")}\n source=\"joined_local_members\"\n defaultValue={false}\n style={{ marginBottom: 8 }}\n />\n <Chip\n label={translate(\"resources.rooms.fields.state_events\")}\n source=\"state_events\"\n defaultValue={false}\n style={{ marginBottom: 8 }}\n />\n <Chip\n label={translate(\"resources.rooms.fields.version\")}\n source=\"version\"\n defaultValue={false}\n style={{ marginBottom: 8 }}\n />\n <Chip\n label={translate(\"resources.rooms.fields.federatable\")}\n source=\"federatable\"\n defaultValue={false}\n style={{ marginBottom: 8 }}\n />\n </Filter>\n );\n};\n\nconst RoomNameField = props => {\n const { source } = props;\n const record = useRecordContext(props);\n return (\n <span>{record[source] || record[\"canonical_alias\"] || record[\"id\"]}</span>\n );\n};\n\nRoomNameField.propTypes = {\n label: PropTypes.string,\n record: PropTypes.object,\n source: PropTypes.string.isRequired,\n};\n\nconst FilterableRoomList = ({ roomFilters, dispatch, ...props }) => {\n const filter = roomFilters;\n const localMembersFilter =\n filter && filter.joined_local_members ? true : false;\n const stateEventsFilter = filter && filter.state_events ? true : false;\n const versionFilter = filter && filter.version ? true : false;\n const federateableFilter = filter && filter.federatable ? true : false;\n\n return (\n <List\n {...props}\n pagination={<RoomPagination />}\n sort={{ field: \"name\", order: \"ASC\" }}\n filters={<RoomFilter />}\n bulkActionButtons={<RoomBulkActionButtons />}\n >\n <Datagrid rowClick=\"show\">\n <EncryptionField\n source=\"is_encrypted\"\n sortBy=\"encryption\"\n label={<HttpsIcon />}\n />\n <RoomNameField source=\"name\" />\n <TextField source=\"joined_members\" />\n {localMembersFilter && <TextField source=\"joined_local_members\" />}\n {stateEventsFilter && <TextField source=\"state_events\" />}\n {versionFilter && <TextField source=\"version\" />}\n {federateableFilter && <BooleanField source=\"federatable\" />}\n <BooleanField source=\"public\" />\n </Datagrid>\n </List>\n );\n};\n\nfunction mapStateToProps(state) {\n return {\n roomFilters: state.admin.resources.rooms.list.params.displayedFilters,\n };\n}\n\nexport const RoomList = connect(mapStateToProps)(FilterableRoomList);\n","import React from \"react\";\nimport {\n Datagrid,\n DateField,\n List,\n NumberField,\n Pagination,\n ReferenceField,\n Show,\n Tab,\n TabbedShowLayout,\n TextField,\n useTranslate,\n} from \"react-admin\";\nimport PageviewIcon from \"@material-ui/icons/Pageview\";\nimport ViewListIcon from \"@material-ui/icons/ViewList\";\n\nconst date_format = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n};\n\nconst ReportPagination = props => (\n <Pagination {...props} rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />\n);\n\nexport const ReportShow = props => {\n const translate = useTranslate();\n return (\n <Show {...props}>\n <TabbedShowLayout>\n <Tab\n label={translate(\"synapseadmin.reports.tabs.basic\", {\n smart_count: 1,\n })}\n icon={<ViewListIcon />}\n >\n <DateField\n source=\"received_ts\"\n showTime\n options={date_format}\n sortable={true}\n />\n <ReferenceField source=\"user_id\" reference=\"users\">\n <TextField source=\"id\" />\n </ReferenceField>\n <NumberField source=\"score\" />\n <TextField source=\"reason\" />\n <TextField source=\"name\" />\n <TextField\n source=\"canonical_alias\"\n label=\"resources.rooms.fields.canonical_alias\"\n />\n <ReferenceField\n source=\"room_id\"\n reference=\"rooms\"\n link=\"show\"\n label=\"resources.rooms.fields.room_id\"\n >\n <TextField source=\"id\" />\n </ReferenceField>\n </Tab>\n\n <Tab\n label=\"synapseadmin.reports.tabs.detail\"\n icon={<PageviewIcon />}\n path=\"detail\"\n >\n <DateField\n source=\"event_json.origin_server_ts\"\n showTime\n options={date_format}\n sortable={true}\n />\n <ReferenceField source=\"sender\" reference=\"users\">\n <TextField source=\"id\" />\n </ReferenceField>\n <TextField source=\"event_id\" />\n <TextField source=\"event_json.origin\" />\n <TextField source=\"event_json.type\" />\n <TextField source=\"event_json.content.msgtype\" />\n <TextField source=\"event_json.content.body\" />\n <TextField source=\"event_json.content.format\" />\n <TextField source=\"event_json.content.formatted_body\" />\n <TextField source=\"event_json.content.algorithm\" />\n <TextField\n source=\"event_json.content.device_id\"\n label=\"resources.users.fields.device_id\"\n />\n </Tab>\n </TabbedShowLayout>\n </Show>\n );\n};\n\nexport const ReportList = ({ ...props }) => {\n return (\n <List\n {...props}\n pagination={<ReportPagination />}\n sort={{ field: \"received_ts\", order: \"DESC\" }}\n bulkActionButtons={false}\n >\n <Datagrid rowClick=\"show\">\n <TextField source=\"id\" sortable={false} />\n <DateField\n source=\"received_ts\"\n showTime\n options={date_format}\n sortable={true}\n />\n <TextField sortable={false} source=\"user_id\" />\n <TextField sortable={false} source=\"name\" />\n <TextField sortable={false} source=\"score\" />\n </Datagrid>\n </List>\n );\n};\n","import React, { useState, useEffect } from \"react\";\nimport {\n fetchUtils,\n FormDataConsumer,\n Notification,\n useLogin,\n useNotify,\n useLocale,\n useSetLocale,\n useTranslate,\n PasswordInput,\n TextInput,\n} from \"react-admin\";\nimport { Form, useForm } from \"react-final-form\";\nimport {\n Avatar,\n Button,\n Card,\n CardActions,\n CircularProgress,\n MenuItem,\n Select,\n TextField,\n} from \"@material-ui/core\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport LockIcon from \"@material-ui/icons/Lock\";\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: \"flex\",\n flexDirection: \"column\",\n minHeight: \"calc(100vh - 1em)\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n background: \"url(./images/floating-cogs.svg)\",\n backgroundColor: \"#f9f9f9\",\n backgroundRepeat: \"no-repeat\",\n backgroundSize: \"cover\",\n },\n card: {\n minWidth: \"30em\",\n marginTop: \"6em\",\n marginBottom: \"6em\",\n },\n avatar: {\n margin: \"1em\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n icon: {\n backgroundColor: theme.palette.secondary.main,\n },\n hint: {\n marginTop: \"1em\",\n display: \"flex\",\n justifyContent: \"center\",\n color: theme.palette.grey[500],\n },\n form: {\n padding: \"0 1em 1em 1em\",\n },\n input: {\n marginTop: \"1em\",\n },\n actions: {\n padding: \"0 1em 1em 1em\",\n },\n serverVersion: {\n color: \"#9e9e9e\",\n fontFamily: \"Roboto, Helvetica, Arial, sans-serif\",\n marginBottom: \"1em\",\n marginLeft: \"0.5em\",\n },\n}));\n\nconst LoginPage = ({ theme }) => {\n const classes = useStyles({ theme });\n const login = useLogin();\n const notify = useNotify();\n const [loading, setLoading] = useState(false);\n const [supportPassAuth, setSupportPassAuth] = useState(true);\n var locale = useLocale();\n const setLocale = useSetLocale();\n const translate = useTranslate();\n const base_url = localStorage.getItem(\"base_url\");\n const cfg_base_url = process.env.REACT_APP_SERVER;\n const [ssoBaseUrl, setSSOBaseUrl] = useState(\"\");\n const loginToken = /\\?loginToken=([a-zA-Z0-9_-]+)/.exec(window.location.href);\n\n if (loginToken) {\n const ssoToken = loginToken[1];\n console.log(\"SSO token is\", ssoToken);\n // Prevent further requests\n window.history.replaceState(\n {},\n \"\",\n window.location.href.replace(loginToken[0], \"#\").split(\"#\")[0]\n );\n const baseUrl = localStorage.getItem(\"sso_base_url\");\n localStorage.removeItem(\"sso_base_url\");\n if (baseUrl) {\n const auth = {\n base_url: baseUrl,\n username: null,\n password: null,\n loginToken: ssoToken,\n };\n console.log(\"Base URL is:\", baseUrl);\n console.log(\"SSO Token is:\", ssoToken);\n console.log(\"Let's try token login...\");\n login(auth).catch(error => {\n alert(\n typeof error === \"string\"\n ? error\n : typeof error === \"undefined\" || !error.message\n ? \"ra.auth.sign_in_error\"\n : error.message\n );\n console.error(error);\n });\n }\n }\n\n const renderInput = ({\n meta: { touched, error } = {},\n input: { ...inputProps },\n ...props\n }) => (\n <TextField\n error={!!(touched && error)}\n helperText={touched && error}\n {...inputProps}\n {...props}\n fullWidth\n />\n );\n\n const validate = values => {\n const errors = {};\n if (!values.username) {\n errors.username = translate(\"ra.validation.required\");\n }\n if (!values.password) {\n errors.password = translate(\"ra.validation.required\");\n }\n if (!values.base_url) {\n errors.base_url = translate(\"ra.validation.required\");\n } else {\n if (!values.base_url.match(/^(http|https):\\/\\//)) {\n errors.base_url = translate(\"synapseadmin.auth.protocol_error\");\n } else if (\n !values.base_url.match(\n /^(http|https):\\/\\/[a-zA-Z0-9\\-.]+(:\\d{1,5})?[^?&\\s]*$/\n )\n ) {\n errors.base_url = translate(\"synapseadmin.auth.url_error\");\n }\n }\n return errors;\n };\n\n const handleSubmit = auth => {\n setLoading(true);\n login(auth).catch(error => {\n setLoading(false);\n notify(\n typeof error === \"string\"\n ? error\n : typeof error === \"undefined\" || !error.message\n ? \"ra.auth.sign_in_error\"\n : error.message,\n \"warning\"\n );\n });\n };\n\n const handleSSO = () => {\n localStorage.setItem(\"sso_base_url\", ssoBaseUrl);\n const ssoFullUrl = `${ssoBaseUrl}/_matrix/client/r0/login/sso/redirect?redirectUrl=${encodeURIComponent(\n window.location.href\n )}`;\n window.location.href = ssoFullUrl;\n };\n\n const extractHomeServer = username => {\n const usernameRegex = /@[a-zA-Z0-9._=\\-/]+:([a-zA-Z0-9\\-.]+\\.[a-zA-Z]+)/;\n if (!username) return null;\n const res = username.match(usernameRegex);\n if (res) return res[1];\n return null;\n };\n\n const UserData = ({ formData }) => {\n const form = useForm();\n const [serverVersion, setServerVersion] = useState(\"\");\n\n const handleUsernameChange = _ => {\n if (formData.base_url || cfg_base_url) return;\n // check if username is a full qualified userId then set base_url accordially\n const home_server = extractHomeServer(formData.username);\n const wellKnownUrl = `https://${home_server}/.well-known/matrix/client`;\n if (home_server) {\n // fetch .well-known entry to get base_url\n fetchUtils\n .fetchJson(wellKnownUrl, { method: \"GET\" })\n .then(({ json }) => {\n form.change(\"base_url\", json[\"m.homeserver\"].base_url);\n })\n .catch(_ => {\n // if there is no .well-known entry, try the home server name\n form.change(\"base_url\", `https://${home_server}`);\n });\n }\n };\n\n useEffect(\n _ => {\n if (\n !formData.base_url ||\n !formData.base_url.match(/^(http|https):\\/\\/[a-zA-Z0-9\\-.]+$/)\n )\n return;\n const versionUrl = `${formData.base_url}/_synapse/admin/v1/server_version`;\n fetchUtils\n .fetchJson(versionUrl, { method: \"GET\" })\n .then(({ json }) => {\n setServerVersion(\n `${translate(\"synapseadmin.auth.server_version\")} ${\n json[\"server_version\"]\n }`\n );\n })\n .catch(_ => {\n setServerVersion(\"\");\n });\n\n // Set SSO Url\n const authMethodUrl = `${formData.base_url}/_matrix/client/r0/login`;\n let supportPass = false,\n supportSSO = false;\n fetchUtils\n .fetchJson(authMethodUrl, { method: \"GET\" })\n .then(({ json }) => {\n json.flows.forEach(f => {\n if (f.type === \"m.login.password\") {\n supportPass = true;\n } else if (f.type === \"m.login.sso\") {\n supportSSO = true;\n }\n });\n setSupportPassAuth(supportPass);\n if (supportSSO) {\n setSSOBaseUrl(formData.base_url);\n } else {\n setSSOBaseUrl(\"\");\n }\n })\n .catch(_ => {\n setSSOBaseUrl(\"\");\n });\n },\n [formData.base_url]\n );\n\n return (\n <div>\n <div className={classes.input}>\n <TextInput\n autoFocus\n name=\"username\"\n component={renderInput}\n label={translate(\"ra.auth.username\")}\n disabled={loading || !supportPassAuth}\n onBlur={handleUsernameChange}\n resettable\n fullWidth\n />\n </div>\n <div className={classes.input}>\n <PasswordInput\n name=\"password\"\n component={renderInput}\n label={translate(\"ra.auth.password\")}\n type=\"password\"\n disabled={loading || !supportPassAuth}\n resettable\n fullWidth\n />\n </div>\n <div className={classes.input}>\n <TextInput\n name=\"base_url\"\n component={renderInput}\n label={translate(\"synapseadmin.auth.base_url\")}\n disabled={cfg_base_url || loading}\n resettable\n fullWidth\n />\n </div>\n <div className={classes.serverVersion}>{serverVersion}</div>\n </div>\n );\n };\n\n return (\n <Form\n initialValues={{ base_url: cfg_base_url || base_url }}\n onSubmit={handleSubmit}\n validate={validate}\n render={({ handleSubmit }) => (\n <form onSubmit={handleSubmit} noValidate>\n <div className={classes.main}>\n <Card className={classes.card}>\n <div className={classes.avatar}>\n <Avatar className={classes.icon}>\n <LockIcon />\n </Avatar>\n </div>\n <div className={classes.hint}>\n {translate(\"synapseadmin.auth.welcome\")}\n </div>\n <div className={classes.form}>\n <div className={classes.input}>\n <Select\n value={locale}\n onChange={e => {\n setLocale(e.target.value);\n }}\n fullWidth\n disabled={loading}\n >\n <MenuItem value=\"de\">Deutsch</MenuItem>\n <MenuItem value=\"en\">English</MenuItem>\n <MenuItem value=\"zh\">简体中文</MenuItem>\n </Select>\n </div>\n <FormDataConsumer>\n {formDataProps => <UserData {...formDataProps} />}\n </FormDataConsumer>\n </div>\n <CardActions className={classes.actions}>\n <Button\n variant=\"contained\"\n type=\"submit\"\n color=\"primary\"\n disabled={loading || !supportPassAuth}\n className={classes.button}\n fullWidth\n >\n {loading && <CircularProgress size={25} thickness={2} />}\n {translate(\"ra.auth.sign_in\")}\n </Button>\n <Button\n variant=\"contained\"\n color=\"secondary\"\n onClick={handleSSO}\n disabled={loading || ssoBaseUrl === \"\"}\n className={classes.button}\n fullWidth\n >\n {loading && <CircularProgress size={25} thickness={2} />}\n {translate(\"synapseadmin.auth.sso_sign_in\")}\n </Button>\n </CardActions>\n </Card>\n <Notification />\n </div>\n </form>\n )}\n />\n );\n};\n\nexport default LoginPage;\n","import React from \"react\";\nimport { cloneElement } from \"react\";\nimport {\n Datagrid,\n ExportButton,\n Filter,\n List,\n NumberField,\n Pagination,\n sanitizeListRestProps,\n SearchInput,\n TextField,\n TopToolbar,\n useListContext,\n} from \"react-admin\";\nimport { DeleteMediaButton } from \"./media\";\n\nconst ListActions = props => {\n const { className, exporter, filters, maxResults, ...rest } = props;\n const {\n currentSort,\n resource,\n displayedFilters,\n filterValues,\n showFilter,\n total,\n } = useListContext();\n return (\n <TopToolbar className={className} {...sanitizeListRestProps(rest)}>\n {filters &&\n cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: \"button\",\n })}\n <DeleteMediaButton />\n <ExportButton\n disabled={total === 0}\n resource={resource}\n sort={currentSort}\n filterValues={filterValues}\n maxResults={maxResults}\n />\n </TopToolbar>\n );\n};\n\nconst UserMediaStatsPagination = props => (\n <Pagination {...props} rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />\n);\n\nconst UserMediaStatsFilter = props => (\n <Filter {...props}>\n <SearchInput source=\"search_term\" alwaysOn />\n </Filter>\n);\n\nexport const UserMediaStatsList = props => {\n return (\n <List\n {...props}\n actions={<ListActions />}\n filters={<UserMediaStatsFilter />}\n pagination={<UserMediaStatsPagination />}\n sort={{ field: \"media_length\", order: \"DESC\" }}\n bulkActionButtons={false}\n >\n <Datagrid rowClick={(id, basePath, record) => \"/users/\" + id + \"/media\"}>\n <TextField source=\"user_id\" label=\"resources.users.fields.id\" />\n <TextField\n source=\"displayname\"\n label=\"resources.users.fields.displayname\"\n />\n <NumberField source=\"media_count\" />\n <NumberField source=\"media_length\" />\n </Datagrid>\n </List>\n );\n};\n","import React, { useState } from \"react\";\nimport {\n Button as ReactAdminButton,\n useDataProvider,\n useNotify,\n Title,\n} from \"react-admin\";\nimport { parse as parseCsv, unparse as unparseCsv } from \"papaparse\";\nimport GetAppIcon from \"@material-ui/icons/GetApp\";\nimport {\n Button,\n Card,\n CardActions,\n CardContent,\n CardHeader,\n FormControlLabel,\n Checkbox,\n NativeSelect,\n} from \"@material-ui/core\";\nimport { useTranslate } from \"ra-core\";\nimport Container from \"@material-ui/core/Container/Container\";\nimport { generateRandomUser } from \"./users\";\n\nconst LOGGING = true;\n\nexport const ImportButton = ({ label, variant = \"text\" }) => {\n return (\n <ReactAdminButton\n color=\"primary\"\n component=\"span\"\n variant={variant}\n label={label}\n >\n <GetAppIcon style={{ transform: \"rotate(180deg)\", fontSize: \"20\" }} />\n </ReactAdminButton>\n );\n};\n\nconst expectedFields = [\"id\", \"displayname\"].sort();\nconst optionalFields = [\n \"user_type\",\n \"guest\",\n \"admin\",\n \"deactivated\",\n \"avatar_url\",\n \"password\",\n].sort();\n\nfunction TranslatableOption({ value, text }) {\n const translate = useTranslate();\n return <option value={value}>{translate(text)}</option>;\n}\n\nconst FilePicker = props => {\n const [values, setValues] = useState(null);\n const [error, setError] = useState(null);\n const [stats, setStats] = useState(null);\n const [dryRun, setDryRun] = useState(true);\n\n const [progress, setProgress] = useState(null);\n\n const [importResults, setImportResults] = useState(null);\n const [skippedRecords, setSkippedRecords] = useState(null);\n\n const [conflictMode, setConflictMode] = useState(\"stop\");\n const [passwordMode, setPasswordMode] = useState(true);\n const [useridMode, setUseridMode] = useState(\"ignore\");\n\n const translate = useTranslate();\n const notify = useNotify();\n\n const dataProvider = useDataProvider();\n\n const onFileChange = async e => {\n if (progress !== null) return;\n\n setValues(null);\n setError(null);\n setStats(null);\n setImportResults(null);\n const file = e.target.files ? e.target.files[0] : null;\n /* Let's refuse some unreasonably big files instead of freezing\n * up the browser */\n if (file.size > 100000000) {\n const message = translate(\"import_users.errors.unreasonably_big\", {\n size: (file.size / (1024 * 1024)).toFixed(2),\n });\n notify(message);\n setError(message);\n return;\n }\n try {\n parseCsv(file, {\n header: true,\n skipEmptyLines: true /* especially for a final EOL in the csv file */,\n complete: result => {\n if (result.error) {\n setError(result.error);\n }\n /* Papaparse is very lenient, we may be able to salvage\n * the data in the file. */\n verifyCsv(result, { setValues, setStats, setError });\n },\n });\n } catch {\n setError(true);\n return null;\n }\n };\n\n const verifyCsv = (\n { data, meta, errors },\n { setValues, setStats, setError }\n ) => {\n /* First, verify the presence of required fields */\n let eF = Array.from(expectedFields);\n let oF = Array.from(optionalFields);\n\n meta.fields.forEach(name => {\n if (eF.includes(name)) {\n eF = eF.filter(v => v !== name);\n }\n if (oF.includes(name)) {\n oF = oF.filter(v => v !== name);\n }\n });\n\n if (eF.length !== 0) {\n setError(\n translate(\"import_users.error.required_field\", { field: eF[0] })\n );\n return false;\n }\n\n // XXX after deciding on how \"name\" and friends should be handled below,\n // this place will want changes, too.\n\n /* Collect some stats to prevent sneaky csv files from adding admin\n users or something.\n */\n let stats = {\n user_types: { default: 0 },\n is_guest: 0,\n admin: 0,\n deactivated: 0,\n password: 0,\n avatar_url: 0,\n id: 0,\n\n total: data.length,\n };\n\n data.forEach((line, idx) => {\n if (line.user_type === undefined || line.user_type === \"\") {\n stats.user_types.default++;\n } else {\n stats.user_types[line.user_type] += 1;\n }\n /* XXX correct the csv export that react-admin offers for the users\n * resource so it gives sensible field names and doesn't duplicate\n * id as \"name\"?\n */\n if (meta.fields.includes(\"name\")) {\n delete line.name;\n }\n if (meta.fields.includes(\"user_type\")) {\n delete line.user_type;\n }\n if (meta.fields.includes(\"is_admin\")) {\n line.admin = line.is_admin;\n delete line.is_admin;\n }\n\n [\"is_guest\", \"admin\", \"deactivated\"].forEach(f => {\n if (line[f] === \"true\") {\n stats[f]++;\n line[f] = true; // we need true booleans instead of strings\n } else {\n if (line[f] !== \"false\" && line[f] !== \"\") {\n errors.push(\n translate(\"import_users.error.invalid_value\", {\n field: f,\n row: idx,\n })\n );\n }\n line[f] = false; // default values to false\n }\n });\n\n if (line.password !== undefined && line.password !== \"\") {\n stats.password++;\n }\n\n if (line.avatar_url !== undefined && line.avatar_url !== \"\") {\n stats.avatar_url++;\n }\n\n if (line.id !== undefined && line.id !== \"\") {\n stats.id++;\n }\n });\n\n if (errors.length > 0) {\n setError(errors);\n }\n setStats(stats);\n setValues(data);\n\n return true;\n };\n\n const runImport = async e => {\n if (progress !== null) {\n notify(\"import_users.errors.already_in_progress\");\n return;\n }\n\n const results = await doImport(\n dataProvider,\n values,\n conflictMode,\n passwordMode,\n useridMode,\n dryRun,\n setProgress,\n setError\n );\n setImportResults(results);\n // offer CSV download of skipped or errored records\n // (so that the user doesn't have to filter out successful\n // records manually when fixing stuff in the CSV)\n setSkippedRecords(unparseCsv(results.skippedRecords));\n if (LOGGING) console.log(\"Skipped records:\");\n if (LOGGING) console.log(skippedRecords);\n };\n\n // XXX every single one of the requests will restart the activity indicator\n // which doesn't look very good.\n\n const doImport = async (\n dataProvider,\n data,\n conflictMode,\n passwordMode,\n useridMode,\n dryRun,\n setProgress,\n setError\n ) => {\n let skippedRecords = [];\n let erroredRecords = [];\n let succeededRecords = [];\n let changeStats = {\n toAdmin: 0,\n toGuest: 0,\n toRegular: 0,\n replacedPassword: 0,\n };\n let entriesDone = 0;\n let entriesCount = data.length;\n try {\n setProgress({ done: entriesDone, limit: entriesCount });\n for (const entry of data) {\n let userRecord = {};\n let overwriteData = {};\n // No need to do a bunch of cryptographic random number getting if\n // we are using neither a generated password nor a generated user id.\n if (\n useridMode === \"ignore\" ||\n entry.id === undefined ||\n entry.password === undefined ||\n passwordMode === false\n ) {\n overwriteData = generateRandomUser();\n // Ignoring IDs or the entry lacking an ID means we keep the\n // ID field in the overwrite data.\n if (!(useridMode === \"ignore\" || entry.id === undefined)) {\n delete overwriteData.id;\n }\n\n // Not using passwords from the csv or this entry lacking a password\n // means we keep the password field in the overwrite data.\n if (\n !(\n passwordMode === false ||\n entry.password === undefined ||\n entry.password === \"\"\n )\n ) {\n delete overwriteData.password;\n }\n }\n /* TODO record update stats (especially admin no -> yes, deactivated x -> !x, ... */\n Object.assign(userRecord, entry);\n Object.assign(userRecord, overwriteData);\n\n /* For these modes we will consider the ID that's in the record.\n * If the mode is \"stop\", we will not continue adding more records, and\n * we will offer information on what was already added and what was\n * skipped.\n *\n * If the mode is \"skip\", we record the record for later, but don't\n * send it to the server.\n *\n * If the mode is \"update\", we change fields that are reasonable to\n * update.\n * - If the \"password mode\" is \"true\" (i.e. \"use passwords from csv\"):\n * - if the record has a password\n * - send the password along with the record\n * - if the record has no password\n * - generate a new password\n * - If the \"password mode\" is \"false\"\n * - never generate a new password to update existing users with\n */\n\n /* We just act as if there are no IDs in the CSV, so every user will be\n * created anew.\n * We do a simple retry loop so that an accidental hit on an existing ID\n * doesn't trip us up.\n */\n if (LOGGING)\n console.log(\n \"will check for existence of record \" + JSON.stringify(userRecord)\n );\n let retries = 0;\n const submitRecord = recordData => {\n return dataProvider.getOne(\"users\", { id: recordData.id }).then(\n async alreadyExists => {\n if (LOGGING) console.log(\"already existed\");\n\n if (useridMode === \"update\" || conflictMode === \"skip\") {\n skippedRecords.push(recordData);\n } else if (conflictMode === \"stop\") {\n throw new Error(\n translate(\"import_users.error.id_exits\", {\n id: recordData.id,\n })\n );\n } else {\n const overwriteData = generateRandomUser();\n const newRecordData = Object.assign({}, recordData, {\n id: overwriteData.id,\n });\n retries++;\n if (retries > 512) {\n console.warn(\"retry loop got stuck? pathological situation?\");\n skippedRecords.push(recordData);\n } else {\n await submitRecord(newRecordData);\n }\n }\n },\n async okToSubmit => {\n if (LOGGING)\n console.log(\n \"OK to create record \" +\n recordData.id +\n \" (\" +\n recordData.displayname +\n \").\"\n );\n\n if (!dryRun) {\n await dataProvider.create(\"users\", { data: recordData });\n }\n succeededRecords.push(recordData);\n }\n );\n };\n\n await submitRecord(userRecord);\n entriesDone++;\n setProgress({ done: entriesDone, limit: data.length });\n }\n\n setProgress(null);\n } catch (e) {\n setError(\n translate(\"import_users.error.at_entry\", {\n entry: entriesDone + 1,\n message: e.message,\n })\n );\n setProgress(null);\n }\n return {\n skippedRecords,\n erroredRecords,\n succeededRecords,\n totalRecordCount: entriesCount,\n changeStats,\n wasDryRun: dryRun,\n };\n };\n\n const downloadSkippedRecords = () => {\n const element = document.createElement(\"a\");\n console.log(skippedRecords);\n const file = new Blob([skippedRecords], {\n type: \"text/comma-separated-values\",\n });\n element.href = URL.createObjectURL(file);\n element.download = \"skippedRecords.csv\";\n document.body.appendChild(element); // Required for this to work in FireFox\n element.click();\n };\n\n const onConflictModeChanged = async e => {\n if (progress !== null) {\n return;\n }\n\n const value = e.target.value;\n setConflictMode(value);\n };\n\n const onPasswordModeChange = e => {\n if (progress !== null) {\n return;\n }\n\n setPasswordMode(e.target.checked);\n };\n\n const onUseridModeChanged = async e => {\n if (progress !== null) {\n return;\n }\n\n const value = e.target.value;\n setUseridMode(value);\n };\n\n const onDryRunModeChanged = ev => {\n if (progress !== null) {\n return;\n }\n setDryRun(ev.target.checked);\n };\n\n // render individual small components\n\n const statsCards = stats &&\n !importResults && [\n <Container>\n <CardHeader\n title={translate(\"import_users.cards.importstats.header\")}\n />\n <CardContent>\n <div>\n {translate(\n \"import_users.cards.importstats.users_total\",\n stats.total\n )}\n </div>\n <div>\n {translate(\n \"import_users.cards.importstats.guest_count\",\n stats.is_guest\n )}\n </div>\n <div>\n {translate(\n \"import_users.cards.importstats.admin_count\",\n stats.admin\n )}\n </div>\n </CardContent>\n </Container>,\n <Container>\n <CardHeader title={translate(\"import_users.cards.ids.header\")} />\n <CardContent>\n <div>\n {stats.id === stats.total\n ? translate(\"import_users.cards.ids.all_ids_present\")\n : translate(\"import_users.cards.ids.count_ids_present\", stats.id)}\n </div>\n {stats.id > 0 ? (\n <div>\n <NativeSelect\n onChange={onUseridModeChanged}\n value={useridMode}\n enabled={(progress !== null).toString()}\n >\n <TranslatableOption\n value=\"ignore\"\n text=\"import_users.cards.ids.mode.ignore\"\n />\n <TranslatableOption\n value=\"update\"\n text=\"import_users.cards.ids.mode.update\"\n />\n </NativeSelect>\n </div>\n ) : (\n \"\"\n )}\n </CardContent>\n </Container>,\n <Container>\n <CardHeader title={translate(\"import_users.cards.passwords.header\")} />\n <CardContent>\n <div>\n {stats.password === stats.total\n ? translate(\"import_users.cards.passwords.all_passwords_present\")\n : translate(\n \"import_users.cards.passwords.count_passwords_present\",\n stats.password\n )}\n </div>\n {stats.password > 0 ? (\n <div>\n <FormControlLabel\n control={\n <Checkbox\n checked={passwordMode}\n enabled={(progress !== null).toString()}\n onChange={onPasswordModeChange}\n />\n }\n label={translate(\"import_users.cards.passwords.use_passwords\")}\n />\n </div>\n ) : (\n \"\"\n )}\n </CardContent>\n </Container>,\n ];\n\n let conflictCards = stats && !importResults && (\n <Container>\n <CardHeader title={translate(\"import_users.cards.conflicts.header\")} />\n <CardContent>\n <div>\n <NativeSelect\n onChange={onConflictModeChanged}\n value={conflictMode}\n enabled={(progress !== null).toString()}\n >\n <TranslatableOption\n value=\"stop\"\n text=\"import_users.cards.conflicts.mode.stop\"\n />\n <TranslatableOption\n value=\"skip\"\n text=\"import_users.cards.conflicts.mode.skip\"\n />\n </NativeSelect>\n </div>\n </CardContent>\n </Container>\n );\n\n let errorCards = error && (\n <Container>\n <CardHeader title={translate(\"import_users.error.error\")} />\n <CardContent>\n {(Array.isArray(error) ? error : [error]).map(e => (\n <div>{e}</div>\n ))}\n </CardContent>\n </Container>\n );\n\n let uploadCard = !importResults && (\n <Container>\n <CardHeader title={translate(\"import_users.cards.upload.header\")} />\n <CardContent>\n {translate(\"import_users.cards.upload.explanation\")}\n <a href=\"./data/example.csv\">example.csv</a>\n <br />\n <br />\n <input\n type=\"file\"\n onChange={onFileChange}\n enabled={(progress !== null).toString()}\n />\n </CardContent>\n </Container>\n );\n\n let resultsCard = importResults && (\n <CardContent>\n <CardHeader title={translate(\"import_users.cards.results.header\")} />\n <div>\n {translate(\n \"import_users.cards.results.total\",\n importResults.totalRecordCount\n )}\n <br />\n {translate(\n \"import_users.cards.results.successful\",\n importResults.succeededRecords.length\n )}\n <br />\n {importResults.skippedRecords.length\n ? [\n translate(\n \"import_users.cards.results.skipped\",\n importResults.skippedRecords.length\n ),\n <div>\n <button onClick={downloadSkippedRecords}>\n {translate(\"import_users.cards.results.download_skipped\")}\n </button>\n </div>,\n <br />,\n ]\n : \"\"}\n {importResults.erroredRecords.length\n ? [\n translate(\n \"import_users.cards.results.skipped\",\n importResults.erroredRecords.length\n ),\n <br />,\n ]\n : \"\"}\n <br />\n {importResults.wasDryRun && [\n translate(\"import_users.cards.results.simulated_only\"),\n <br />,\n ]}\n </div>\n </CardContent>\n );\n\n let startImportCard =\n !values || values.length === 0 || importResults ? undefined : (\n <CardActions>\n <FormControlLabel\n control={\n <Checkbox\n checked={dryRun}\n onChange={onDryRunModeChanged}\n enabled={(progress !== null).toString()}\n />\n }\n label={translate(\"import_users.cards.startImport.simulate_only\")}\n />\n <Button\n size=\"large\"\n onClick={runImport}\n enabled={(progress !== null).toString()}\n >\n {translate(\"import_users.cards.startImport.run_import\")}\n </Button>\n {progress !== null ? (\n <div>\n {progress.done} of {progress.limit} done\n </div>\n ) : null}\n </CardActions>\n );\n\n let allCards = [];\n if (uploadCard) allCards.push(uploadCard);\n if (errorCards) allCards.push(errorCards);\n if (conflictCards) allCards.push(conflictCards);\n if (statsCards) allCards.push(...statsCards);\n if (startImportCard) allCards.push(startImportCard);\n if (resultsCard) allCards.push(resultsCard);\n\n let cardContainer = <Card>{allCards}</Card>;\n\n return [\n <Title defaultTitle={translate(\"import_users.title\")} />,\n cardContainer,\n ];\n};\n\nexport const ImportFeature = FilePicker;\n","import React from \"react\";\nimport {\n BooleanInput,\n Create,\n Datagrid,\n DateField,\n DateTimeInput,\n Edit,\n Filter,\n List,\n maxValue,\n number,\n NumberField,\n NumberInput,\n regex,\n SimpleForm,\n TextInput,\n TextField,\n Toolbar,\n} from \"react-admin\";\n\nconst date_format = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n};\n\nconst validateToken = [regex(/^[A-Za-z0-9._~-]{0,64}$/)];\nconst validateUsesAllowed = [number()];\nconst validateLength = [number(), maxValue(64)];\n\nconst dateParser = v => {\n const d = new Date(v);\n if (isNaN(d)) return 0;\n return d.getTime();\n};\n\nconst dateFormatter = v => {\n if (v === undefined || v === null) return;\n const d = new Date(v);\n\n const pad = \"00\";\n const year = d.getFullYear().toString();\n const month = (pad + (d.getMonth() + 1).toString()).slice(-2);\n const day = (pad + d.getDate().toString()).slice(-2);\n const hour = (pad + d.getHours().toString()).slice(-2);\n const minute = (pad + d.getMinutes().toString()).slice(-2);\n\n // target format yyyy-MM-ddThh:mm\n return `${year}-${month}-${day}T${hour}:${minute}`;\n};\n\nconst RegistrationTokenFilter = props => (\n <Filter {...props}>\n <BooleanInput source=\"valid\" alwaysOn />\n </Filter>\n);\n\nexport const RegistrationTokenList = props => {\n return (\n <List\n {...props}\n filters={<RegistrationTokenFilter />}\n filterDefaultValues={{ valid: true }}\n pagination={false}\n perPage={500}\n >\n <Datagrid rowClick=\"edit\">\n <TextField source=\"token\" sortable={false} />\n <NumberField source=\"uses_allowed\" sortable={false} />\n <NumberField source=\"pending\" sortable={false} />\n <NumberField source=\"completed\" sortable={false} />\n <DateField\n source=\"expiry_time\"\n showTime\n options={date_format}\n sortable={false}\n />\n </Datagrid>\n </List>\n );\n};\n\nexport const RegistrationTokenCreate = props => (\n <Create {...props}>\n <SimpleForm redirect=\"list\" toolbar={<Toolbar alwaysEnableSaveButton />}>\n <TextInput\n source=\"token\"\n autoComplete=\"off\"\n validate={validateToken}\n resettable\n />\n <NumberInput\n source=\"length\"\n validate={validateLength}\n helperText=\"resources.registration_tokens.helper.length\"\n step={1}\n />\n <NumberInput\n source=\"uses_allowed\"\n validate={validateUsesAllowed}\n step={1}\n />\n <DateTimeInput source=\"expiry_time\" parse={dateParser} />\n </SimpleForm>\n </Create>\n);\n\nexport const RegistrationTokenEdit = props => {\n return (\n <Edit {...props}>\n <SimpleForm>\n <TextInput source=\"token\" disabled />\n <NumberInput source=\"pending\" disabled />\n <NumberInput source=\"completed\" disabled />\n <NumberInput\n source=\"uses_allowed\"\n validate={validateUsesAllowed}\n step={1}\n />\n <DateTimeInput\n source=\"expiry_time\"\n parse={dateParser}\n format={dateFormatter}\n />\n </SimpleForm>\n </Edit>\n );\n};\n","import germanMessages from \"ra-language-german\";\n\nconst de = {\n ...germanMessages,\n synapseadmin: {\n auth: {\n base_url: \"Heimserver URL\",\n welcome: \"Willkommen bei Synapse-admin\",\n server_version: \"Synapse Version\",\n username_error: \"Bitte vollständigen Nutzernamen angeben: '@user:domain'\",\n protocol_error: \"Die URL muss mit 'http://' oder 'https://' beginnen\",\n url_error: \"Keine gültige Matrix Server URL\",\n sso_sign_in: \"Anmeldung mit SSO\",\n },\n users: {\n invalid_user_id: \"Lokaler Anteil der Matrix Benutzer-ID ohne Homeserver.\",\n tabs: { sso: \"SSO\" },\n },\n rooms: {\n details: \"Raumdetails\",\n tabs: {\n basic: \"Allgemein\",\n members: \"Mitglieder\",\n detail: \"Details\",\n permission: \"Berechtigungen\",\n },\n },\n reports: { tabs: { basic: \"Allgemein\", detail: \"Details\" } },\n },\n import_users: {\n error: {\n at_entry: \"Bei Eintrag %{entry}: %{message}\",\n error: \"Fehler\",\n required_field: \"Pflichtfeld '%{field}' fehlt\",\n invalid_value:\n \"Ungültiger Wert in Zeile %{row}. Feld '%{field}' darf nur die Werte 'true' oder 'false' enthalten\",\n unreasonably_big: \"Datei ist zu groß für den Import (%{size} Megabytes)\",\n already_in_progress: \"Es läuft bereits ein Import\",\n id_exits: \"ID %{id} existiert bereits\",\n },\n title: \"Benutzer aus CSV importieren\",\n goToPdf: \"Gehe zum PDF\",\n cards: {\n importstats: {\n header: \"Benutzer importieren\",\n users_total:\n \"%{smart_count} Benutzer in der CSV Datei |||| %{smart_count} Benutzer in der CSV Datei\",\n guest_count: \"%{smart_count} Gast |||| %{smart_count} Gäste\",\n admin_count:\n \"%{smart_count} Server Administrator |||| %{smart_count} Server Administratoren\",\n },\n conflicts: {\n header: \"Konfliktstrategie\",\n mode: {\n stop: \"Stoppe bei Fehlern\",\n skip: \"Zeige Fehler und überspringe fehlerhafte Einträge\",\n },\n },\n ids: {\n header: \"IDs\",\n all_ids_present: \"IDs in jedem Eintrag vorhanden\",\n count_ids_present:\n \"%{smart_count} Eintrag mit ID |||| %{smart_count} Einträge mit IDs\",\n mode: {\n ignore: \"Ignoriere IDs der CSV-Datei und erstelle neue\",\n update: \"Aktualisiere existierende Benutzer\",\n },\n },\n passwords: {\n header: \"Passwörter\",\n all_passwords_present: \"Passwörter in jedem Eintrag vorhanden\",\n count_passwords_present:\n \"%{smart_count} Eintrag mit Passwort |||| %{smart_count} Einträge mit Passwörtern\",\n use_passwords: \"Verwende Passwörter aus der CSV Datei\",\n },\n upload: {\n header: \"CSV Datei importieren\",\n explanation:\n \"Hier können Sie eine Datei mit kommagetrennten Daten hochladen, die verwendet werden um Benutzer anzulegen oder zu ändern. Die Datei muss mindestens die Felder 'id' und 'displayname' enthalten. Hier können Sie eine Beispieldatei herunterladen und anpassen: \",\n },\n startImport: {\n simulate_only: \"Nur simulieren\",\n run_import: \"Importieren\",\n },\n results: {\n header: \"Ergebnis\",\n total:\n \"%{smart_count} Eintrag insgesamt |||| %{smart_count} Einträge insgesamt\",\n successful: \"%{smart_count} Einträge erfolgreich importiert\",\n skipped: \"%{smart_count} Einträge übersprungen\",\n download_skipped: \"Übersprungene Einträge herunterladen\",\n with_error:\n \"%{smart_count} Eintrag mit Fehlern ||| %{smart_count} Einträge mit Fehlern\",\n simulated_only: \"Import-Vorgang war nur simuliert\",\n },\n },\n },\n resources: {\n users: {\n name: \"Benutzer\",\n email: \"E-Mail\",\n msisdn: \"Telefon\",\n threepid: \"E-Mail / Telefon\",\n fields: {\n avatar: \"Avatar\",\n id: \"Benutzer-ID\",\n name: \"Name\",\n is_guest: \"Gast\",\n admin: \"Server Administrator\",\n deactivated: \"Deaktiviert\",\n guests: \"Zeige Gäste\",\n show_deactivated: \"Zeige deaktivierte Benutzer\",\n user_id: \"Suche Benutzer\",\n displayname: \"Anzeigename\",\n password: \"Passwort\",\n avatar_url: \"Avatar URL\",\n avatar_src: \"Avatar\",\n medium: \"Medium\",\n threepids: \"3PIDs\",\n address: \"Adresse\",\n creation_ts_ms: \"Zeitpunkt der Erstellung\",\n consent_version: \"Zugestimmte Geschäftsbedingungen\",\n auth_provider: \"Provider\",\n },\n helper: {\n deactivate:\n \"Sie müssen ein Passwort angeben, um ein Konto wieder zu aktivieren.\",\n erase: \"DSGVO konformes Löschen der Benutzerdaten\",\n },\n action: {\n erase: \"Lösche Benutzerdaten\",\n },\n },\n rooms: {\n name: \"Raum |||| Räume\",\n fields: {\n room_id: \"Raum-ID\",\n name: \"Name\",\n canonical_alias: \"Alias\",\n joined_members: \"Mitglieder\",\n joined_local_members: \"Lokale Mitglieder\",\n joined_local_devices: \"Lokale Endgeräte\",\n state_events: \"Zustandsereignisse / Komplexität\",\n version: \"Version\",\n is_encrypted: \"Verschlüsselt\",\n encryption: \"Verschlüsselungs-Algorithmus\",\n federatable: \"Föderierbar\",\n public: \"Sichtbar im Raumverzeichnis\",\n creator: \"Ersteller\",\n join_rules: \"Beitrittsregeln\",\n guest_access: \"Gastzugriff\",\n history_visibility: \"Historie-Sichtbarkeit\",\n topic: \"Thema\",\n avatar: \"Avatar\",\n },\n helper: {\n forward_extremities:\n \"Forward extremities are the leaf events at the end of a Directed acyclic graph (DAG) in a room, aka events that have no children. The more exist in a room, the more state resolution that Synapse needs to perform (hint: it's an expensive operation). While Synapse has code to prevent too many of these existing at one time in a room, bugs can sometimes make them crop up again. If a room has >10 forward extremities, it's worth checking which room is the culprit and potentially removing them using the SQL queries mentioned in #1760.\",\n },\n enums: {\n join_rules: {\n public: \"Öffentlich\",\n knock: \"Auf Anfrage\",\n invite: \"Nur auf Einladung\",\n private: \"Privat\",\n },\n guest_access: {\n can_join: \"Gäste können beitreten\",\n forbidden: \"Gäste können nicht beitreten\",\n },\n history_visibility: {\n invited: \"Ab Einladung\",\n joined: \"Ab Beitritt\",\n shared: \"Ab Setzen der Einstellung\",\n world_readable: \"Jeder\",\n },\n unencrypted: \"Nicht verschlüsselt\",\n },\n action: {\n erase: {\n title: \"Raum löschen\",\n content:\n \"Sind Sie sicher dass Sie den Raum löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden. Alle Nachrichten und Medien, die der Raum beinhaltet werden vom Server gelöscht!\",\n },\n },\n },\n reports: {\n name: \"Ereignisbericht |||| Ereignisberichte\",\n fields: {\n id: \"ID\",\n received_ts: \"Meldezeit\",\n user_id: \"Meldender\",\n name: \"Raumname\",\n score: \"Wert\",\n reason: \"Grund\",\n event_id: \"Event-ID\",\n event_json: {\n origin: \"Ursprungsserver\",\n origin_server_ts: \"Sendezeit\",\n type: \"Eventtyp\",\n content: {\n msgtype: \"Inhaltstyp\",\n body: \"Nachrichteninhalt\",\n format: \"Nachrichtenformat\",\n formatted_body: \"Formatierter Nachrichteninhalt\",\n algorithm: \"Verschlüsselungsalgorithmus\",\n },\n },\n },\n },\n connections: {\n name: \"Verbindungen\",\n fields: {\n last_seen: \"Datum\",\n ip: \"IP-Adresse\",\n user_agent: \"User Agent\",\n },\n },\n devices: {\n name: \"Gerät |||| Geräte\",\n fields: {\n device_id: \"Geräte-ID\",\n display_name: \"Gerätename\",\n last_seen_ts: \"Zeitstempel\",\n last_seen_ip: \"IP-Adresse\",\n },\n action: {\n erase: {\n title: \"Entferne %{id}\",\n content: 'Möchten Sie das Gerät \"%{name}\" wirklich entfernen?',\n success: \"Gerät erfolgreich entfernt.\",\n failure: \"Beim Entfernen ist ein Fehler aufgetreten.\",\n },\n },\n },\n users_media: {\n name: \"Medien\",\n fields: {\n media_id: \"Medien ID\",\n media_length: \"Größe\",\n media_type: \"Typ\",\n upload_name: \"Dateiname\",\n quarantined_by: \"Zur Quarantäne hinzugefügt\",\n safe_from_quarantine: \"Schutz vor Quarantäne\",\n created_ts: \"Erstellt\",\n last_access_ts: \"Letzter Zugriff\",\n },\n },\n delete_media: {\n name: \"Medien\",\n fields: {\n before_ts: \"Letzter Zugriff vor\",\n size_gt: \"Größer als (in Bytes)\",\n keep_profiles: \"Behalte Profilbilder\",\n },\n action: {\n send: \"Medien löschen\",\n send_success: \"Anfrage erfolgreich versendet.\",\n send_failure: \"Beim Versenden ist ein Fehler aufgetreten.\",\n },\n helper: {\n send: \"Diese API löscht die lokalen Medien von der Festplatte des eigenen Servers. Dies umfasst alle lokalen Miniaturbilder und Kopien von Medien. Diese API wirkt sich nicht auf Medien aus, die sich in externen Medien-Repositories befinden.\",\n },\n },\n protect_media: {\n action: {\n create: \"Ungeschützt, Schutz erstellen\",\n delete: \"Geschützt, Schutz aufheben\",\n none: \"In Quarantäne\",\n send_success: \"Erfolgreich den Schutz-Status geändert.\",\n send_failure: \"Beim Versenden ist ein Fehler aufgetreten.\",\n },\n },\n quarantine_media: {\n action: {\n name: \"Quarantäne\",\n create: \"Zur Quarantäne hinzufügen\",\n delete: \"In Quarantäne, Quarantäne aufheben\",\n none: \"Geschützt vor Quarantäne\",\n send_success: \"Erfolgreich den Quarantäne-Status geändert.\",\n send_failure: \"Beim Versenden ist ein Fehler aufgetreten.\",\n },\n },\n pushers: {\n name: \"Pusher |||| Pushers\",\n fields: {\n app: \"App\",\n app_display_name: \"App-Anzeigename\",\n app_id: \"App ID\",\n device_display_name: \"Geräte-Anzeigename\",\n kind: \"Art\",\n lang: \"Sprache\",\n profile_tag: \"Profil-Tag\",\n pushkey: \"Pushkey\",\n data: { url: \"URL\" },\n },\n },\n servernotices: {\n name: \"Serverbenachrichtigungen\",\n send: \"Servernachricht versenden\",\n fields: {\n body: \"Nachricht\",\n },\n action: {\n send: \"Sende Nachricht\",\n send_success: \"Nachricht erfolgreich versendet.\",\n send_failure: \"Beim Versenden ist ein Fehler aufgetreten.\",\n },\n helper: {\n send: 'Sendet eine Serverbenachrichtigung an die ausgewählten Nutzer. Hierfür muss das Feature \"Server Notices\" auf dem Server aktiviert sein.',\n },\n },\n user_media_statistics: {\n name: \"Dateien je Benutzer\",\n fields: {\n media_count: \"Anzahl der Dateien\",\n media_length: \"Größe der Dateien\",\n },\n },\n forward_extremities: {\n name: \"Vorderextremitäten\",\n fields: {\n id: \"Event-ID\",\n received_ts: \"Zeitstempel\",\n depth: \"Tiefe\",\n state_group: \"Zustandsgruppe\",\n },\n },\n room_state: {\n name: \"Zustandsereignisse\",\n fields: {\n type: \"Typ\",\n content: \"Inhalt\",\n origin_server_ts: \"Sendezeit\",\n sender: \"Absender\",\n },\n },\n room_directory: {\n name: \"Raumverzeichnis\",\n fields: {\n world_readable: \"Gastbenutzer dürfen ohne Beitritt lesen\",\n guest_can_join: \"Gastbenutzer dürfen beitreten\",\n },\n action: {\n title:\n \"Raum aus Verzeichnis löschen |||| %{smart_count} Räume aus Verzeichnis löschen\",\n content:\n \"Möchten Sie den Raum wirklich aus dem Raumverzeichnis löschen? |||| Möchten Sie die %{smart_count} Räume wirklich aus dem Raumverzeichnis löschen?\",\n erase: \"Lösche aus Verzeichnis\",\n create: \"Eintragen ins Verzeichnis\",\n send_success: \"Raum erfolgreich eingetragen.\",\n send_failure: \"Beim Entfernen ist ein Fehler aufgetreten.\",\n },\n },\n registration_tokens: {\n name: \"Registrierungstoken\",\n fields: {\n token: \"Token\",\n valid: \"Gültige Token\",\n uses_allowed: \"Anzahl\",\n pending: \"Ausstehend\",\n completed: \"Abgeschlossen\",\n expiry_time: \"Ablaufzeit\",\n length: \"Länge\",\n },\n helper: { length: \"Länge des Tokens, wenn kein Token vorgegeben wird.\" },\n },\n },\n ra: {\n ...germanMessages.ra,\n action: {\n ...germanMessages.ra.action,\n unselect: \"Abwählen\",\n },\n auth: {\n ...germanMessages.ra.auth,\n auth_check_error: \"Anmeldung fehlgeschlagen\",\n },\n input: {\n ...germanMessages.ra.input,\n password: {\n ...germanMessages.ra.input.password,\n toggle_hidden: \"Anzeigen\",\n toggle_visible: \"Verstecken\",\n },\n },\n notification: {\n ...germanMessages.ra.notification,\n logged_out: \"Abgemeldet\",\n },\n page: {\n ...germanMessages.ra.page,\n empty: \"Keine Einträge vorhanden\",\n invite: \"\",\n },\n navigation: {\n ...germanMessages.ra.navigation,\n skip_nav: \"Zum Inhalt springen\",\n },\n },\n};\nexport default de;\n","import englishMessages from \"ra-language-english\";\n\nconst en = {\n ...englishMessages,\n synapseadmin: {\n auth: {\n base_url: \"Homeserver URL\",\n welcome: \"Welcome to Synapse-admin\",\n server_version: \"Synapse version\",\n username_error: \"Please enter fully qualified user ID: '@user:domain'\",\n protocol_error: \"URL has to start with 'http://' or 'https://'\",\n url_error: \"Not a valid Matrix server URL\",\n sso_sign_in: \"Sign in with SSO\",\n },\n users: {\n invalid_user_id: \"Localpart of a Matrix user-id without homeserver.\",\n tabs: { sso: \"SSO\" },\n },\n rooms: {\n tabs: {\n basic: \"Basic\",\n members: \"Members\",\n detail: \"Details\",\n permission: \"Permissions\",\n },\n },\n reports: { tabs: { basic: \"Basic\", detail: \"Details\" } },\n },\n import_users: {\n error: {\n at_entry: \"At entry %{entry}: %{message}\",\n error: \"Error\",\n required_field: \"Required field '%{field}' is not present\",\n invalid_value:\n \"Invalid value on line %{row}. '%{field}' field may only be 'true' or 'false'\",\n unreasonably_big:\n \"Refused to load unreasonably big file of %{size} megabytes\",\n already_in_progress: \"An import run is already in progress\",\n id_exits: \"ID %{id} already present\",\n },\n title: \"Import users via CSV\",\n goToPdf: \"Go to PDF\",\n cards: {\n importstats: {\n header: \"Import users\",\n users_total:\n \"%{smart_count} user in CSV file |||| %{smart_count} users in CSV file\",\n guest_count: \"%{smart_count} guest |||| %{smart_count} guests\",\n admin_count: \"%{smart_count} admin |||| %{smart_count} admins\",\n },\n conflicts: {\n header: \"Conflict strategy\",\n mode: {\n stop: \"Stop on conflict\",\n skip: \"Show error and skip on conflict\",\n },\n },\n ids: {\n header: \"IDs\",\n all_ids_present: \"IDs present on every entry\",\n count_ids_present:\n \"%{smart_count} entry with ID |||| %{smart_count} entries with IDs\",\n mode: {\n ignore: \"Ignore IDs in CSV and create new ones\",\n update: \"Update existing records\",\n },\n },\n passwords: {\n header: \"Passwords\",\n all_passwords_present: \"Passwords present on every entry\",\n count_passwords_present:\n \"%{smart_count} entry with password |||| %{smart_count} entries with passwords\",\n use_passwords: \"Use passwords from CSV\",\n },\n upload: {\n header: \"Input CSV file\",\n explanation:\n \"Here you can upload a file with comma separated values that is processed to create or update users. The file must include the fields 'id' and 'displayname'. You can download and adapt an example file here: \",\n },\n startImport: {\n simulate_only: \"Simulate only\",\n run_import: \"Import\",\n },\n results: {\n header: \"Import results\",\n total:\n \"%{smart_count} entry in total |||| %{smart_count} entries in total\",\n successful: \"%{smart_count} entries successfully imported\",\n skipped: \"%{smart_count} entries skipped\",\n download_skipped: \"Download skipped records\",\n with_error:\n \"%{smart_count} entry with errors ||| %{smart_count} entries with errors\",\n simulated_only: \"Run was only simulated\",\n },\n },\n },\n resources: {\n users: {\n name: \"User |||| Users\",\n email: \"Email\",\n msisdn: \"Phone\",\n threepid: \"Email / Phone\",\n fields: {\n avatar: \"Avatar\",\n id: \"User-ID\",\n name: \"Name\",\n is_guest: \"Guest\",\n admin: \"Server Administrator\",\n deactivated: \"Deactivated\",\n guests: \"Show guests\",\n show_deactivated: \"Show deactivated users\",\n user_id: \"Search user\",\n displayname: \"Displayname\",\n password: \"Password\",\n avatar_url: \"Avatar URL\",\n avatar_src: \"Avatar\",\n medium: \"Medium\",\n threepids: \"3PIDs\",\n address: \"Address\",\n creation_ts_ms: \"Creation timestamp\",\n consent_version: \"Consent version\",\n auth_provider: \"Provider\",\n },\n helper: {\n deactivate: \"You must provide a password to re-activate an account.\",\n erase: \"Mark the user as GDPR-erased\",\n },\n action: {\n erase: \"Erase user data\",\n },\n },\n rooms: {\n name: \"Room |||| Rooms\",\n fields: {\n room_id: \"Room-ID\",\n name: \"Name\",\n canonical_alias: \"Alias\",\n joined_members: \"Members\",\n joined_local_members: \"Local members\",\n joined_local_devices: \"Local devices\",\n state_events: \"State events / Complexity\",\n version: \"Version\",\n is_encrypted: \"Encrypted\",\n encryption: \"Encryption\",\n federatable: \"Federatable\",\n public: \"Visible in room directory\",\n creator: \"Creator\",\n join_rules: \"Join rules\",\n guest_access: \"Guest access\",\n history_visibility: \"History visibility\",\n topic: \"Topic\",\n avatar: \"Avatar\",\n },\n helper: {\n forward_extremities:\n \"Forward extremities are the leaf events at the end of a Directed acyclic graph (DAG) in a room, aka events that have no children. The more exist in a room, the more state resolution that Synapse needs to perform (hint: it's an expensive operation). While Synapse has code to prevent too many of these existing at one time in a room, bugs can sometimes make them crop up again. If a room has >10 forward extremities, it's worth checking which room is the culprit and potentially removing them using the SQL queries mentioned in #1760.\",\n },\n enums: {\n join_rules: {\n public: \"Public\",\n knock: \"Knock\",\n invite: \"Invite\",\n private: \"Private\",\n },\n guest_access: {\n can_join: \"Guests can join\",\n forbidden: \"Guests can not join\",\n },\n history_visibility: {\n invited: \"Since invited\",\n joined: \"Since joined\",\n shared: \"Since shared\",\n world_readable: \"Anyone\",\n },\n unencrypted: \"Unencrypted\",\n },\n action: {\n erase: {\n title: \"Delete room\",\n content:\n \"Are you sure you want to delete the room? This cannot be undone. All messages and shared media in the room will be deleted from the server!\",\n },\n },\n },\n reports: {\n name: \"Reported event |||| Reported events\",\n fields: {\n id: \"ID\",\n received_ts: \"report time\",\n user_id: \"announcer\",\n name: \"name of the room\",\n score: \"score\",\n reason: \"reason\",\n event_id: \"event ID\",\n event_json: {\n origin: \"origin server\",\n origin_server_ts: \"time of send\",\n type: \"event typ\",\n content: {\n msgtype: \"content type\",\n body: \"content\",\n format: \"format\",\n formatted_body: \"formatted content\",\n algorithm: \"algorithm\",\n },\n },\n },\n },\n connections: {\n name: \"Connections\",\n fields: {\n last_seen: \"Date\",\n ip: \"IP address\",\n user_agent: \"User agent\",\n },\n },\n devices: {\n name: \"Device |||| Devices\",\n fields: {\n device_id: \"Device-ID\",\n display_name: \"Device name\",\n last_seen_ts: \"Timestamp\",\n last_seen_ip: \"IP address\",\n },\n action: {\n erase: {\n title: \"Removing %{id}\",\n content: 'Are you sure you want to remove the device \"%{name}\"?',\n success: \"Device successfully removed.\",\n failure: \"An error has occurred.\",\n },\n },\n },\n users_media: {\n name: \"Media\",\n fields: {\n media_id: \"Media ID\",\n media_length: \"File Size (in Bytes)\",\n media_type: \"Type\",\n upload_name: \"File name\",\n quarantined_by: \"Quarantined by\",\n safe_from_quarantine: \"Safe from quarantine\",\n created_ts: \"Created\",\n last_access_ts: \"Last access\",\n },\n },\n delete_media: {\n name: \"Media\",\n fields: {\n before_ts: \"last access before\",\n size_gt: \"Larger then (in bytes)\",\n keep_profiles: \"Keep profile images\",\n },\n action: {\n send: \"Delete media\",\n send_success: \"Request successfully sent.\",\n send_failure: \"An error has occurred.\",\n },\n helper: {\n send: \"This API deletes the local media from the disk of your own server. This includes any local thumbnails and copies of media downloaded. This API will not affect media that has been uploaded to external media repositories.\",\n },\n },\n protect_media: {\n action: {\n create: \"Unprotected, create protection\",\n delete: \"Protected, remove protection\",\n none: \"In quarantine\",\n send_success: \"Successfully changed the protection status.\",\n send_failure: \"An error has occurred.\",\n },\n },\n quarantine_media: {\n action: {\n name: \"Quarantine\",\n create: \"Add to quarantine\",\n delete: \"In quarantine, unquarantine\",\n none: \"Protected from quarantine\",\n send_success: \"Successfully changed the quarantine status.\",\n send_failure: \"An error has occurred.\",\n },\n },\n pushers: {\n name: \"Pusher |||| Pushers\",\n fields: {\n app: \"App\",\n app_display_name: \"App display name\",\n app_id: \"App ID\",\n device_display_name: \"Device display name\",\n kind: \"Kind\",\n lang: \"Language\",\n profile_tag: \"Profile tag\",\n pushkey: \"Pushkey\",\n data: { url: \"URL\" },\n },\n },\n servernotices: {\n name: \"Server Notices\",\n send: \"Send server notices\",\n fields: {\n body: \"Message\",\n },\n action: {\n send: \"Send note\",\n send_success: \"Server notice successfully sent.\",\n send_failure: \"An error has occurred.\",\n },\n helper: {\n send: 'Sends a server notice to the selected users. The feature \"Server Notices\" has to be activated at the server.',\n },\n },\n user_media_statistics: {\n name: \"Users' media\",\n fields: {\n media_count: \"Media count\",\n media_length: \"Media length\",\n },\n },\n forward_extremities: {\n name: \"Forward Extremities\",\n fields: {\n id: \"Event ID\",\n received_ts: \"Timestamp\",\n depth: \"Depth\",\n state_group: \"State group\",\n },\n },\n room_state: {\n name: \"State events\",\n fields: {\n type: \"Type\",\n content: \"Content\",\n origin_server_ts: \"time of send\",\n sender: \"Sender\",\n },\n },\n room_directory: {\n name: \"Room directory\",\n fields: {\n world_readable: \"guest users may view without joining\",\n guest_can_join: \"guest users may join\",\n },\n action: {\n title:\n \"Delete room from directory |||| Delete %{smart_count} rooms from directory\",\n content:\n \"Are you sure you want to remove this room from directory? |||| Are you sure you want to remove these %{smart_count} rooms from directory\",\n erase: \"Delete from room directory\",\n create: \"Publish in room directory\",\n send_success: \"Room successfully published.\",\n send_failure: \"An error has occurred.\",\n },\n },\n },\n registration_tokens: {\n name: \"Registration tokens\",\n fields: {\n token: \"Token\",\n valid: \"Valid token\",\n uses_allowed: \"Uses allowed\",\n pending: \"Pending\",\n completed: \"Completed\",\n expiry_time: \"Expiry time\",\n length: \"Length\",\n },\n helper: { length: \"Length of the token if no token is given.\" },\n },\n};\nexport default en;\n","import React from \"react\";\nimport { Admin, Resource, resolveBrowserLocale } from \"react-admin\";\nimport polyglotI18nProvider from \"ra-i18n-polyglot\";\nimport authProvider from \"./synapse/authProvider\";\nimport dataProvider from \"./synapse/dataProvider\";\nimport { UserList, UserCreate, UserEdit } from \"./components/users\";\nimport { RoomList, RoomShow } from \"./components/rooms\";\nimport { ReportList, ReportShow } from \"./components/EventReports\";\nimport LoginPage from \"./components/LoginPage\";\nimport UserIcon from \"@material-ui/icons/Group\";\nimport ConfirmationNumberIcon from \"@material-ui/icons/ConfirmationNumber\";\nimport EqualizerIcon from \"@material-ui/icons/Equalizer\";\nimport { UserMediaStatsList } from \"./components/statistics\";\nimport RoomIcon from \"@material-ui/icons/ViewList\";\nimport ReportIcon from \"@material-ui/icons/Warning\";\nimport FolderSharedIcon from \"@material-ui/icons/FolderShared\";\nimport { ImportFeature } from \"./components/ImportFeature\";\nimport {\n RegistrationTokenCreate,\n RegistrationTokenEdit,\n RegistrationTokenList,\n} from \"./components/RegistrationTokens\";\nimport { RoomDirectoryList } from \"./components/RoomDirectory\";\nimport { Route } from \"react-router-dom\";\nimport germanMessages from \"./i18n/de\";\nimport englishMessages from \"./i18n/en\";\nimport chineseMessages from \"./i18n/zh\";\n\n// TODO: Can we use lazy loading together with browser locale?\nconst messages = {\n de: germanMessages,\n en: englishMessages,\n zh: chineseMessages,\n};\nconst i18nProvider = polyglotI18nProvider(\n locale => (messages[locale] ? messages[locale] : messages.en),\n resolveBrowserLocale()\n);\n\nconst App = () => (\n <Admin\n disableTelemetry\n loginPage={LoginPage}\n authProvider={authProvider}\n dataProvider={dataProvider}\n i18nProvider={i18nProvider}\n customRoutes={[\n <Route key=\"userImport\" path=\"/import_users\" component={ImportFeature} />,\n ]}\n >\n <Resource\n name=\"users\"\n list={UserList}\n create={UserCreate}\n edit={UserEdit}\n icon={UserIcon}\n />\n <Resource name=\"rooms\" list={RoomList} show={RoomShow} icon={RoomIcon} />\n <Resource\n name=\"user_media_statistics\"\n list={UserMediaStatsList}\n icon={EqualizerIcon}\n />\n <Resource\n name=\"reports\"\n list={ReportList}\n show={ReportShow}\n icon={ReportIcon}\n />\n <Resource\n name=\"room_directory\"\n list={RoomDirectoryList}\n icon={FolderSharedIcon}\n />\n <Resource\n name=\"registration_tokens\"\n list={RegistrationTokenList}\n create={RegistrationTokenCreate}\n edit={RegistrationTokenEdit}\n icon={ConfirmationNumberIcon}\n />\n <Resource name=\"connections\" />\n <Resource name=\"devices\" />\n <Resource name=\"room_members\" />\n <Resource name=\"users_media\" />\n <Resource name=\"joined_rooms\" />\n <Resource name=\"pushers\" />\n <Resource name=\"servernotices\" />\n <Resource name=\"forward_extremities\" />\n <Resource name=\"room_state\" />\n </Admin>\n);\n\nexport default App;\n","import chineseMessages from \"ra-language-chinese\";\n\nconst zh = {\n ...chineseMessages,\n synapseadmin: {\n auth: {\n base_url: \"服务器 URL\",\n welcome: \"欢迎来到 Synapse-admin\",\n server_version: \"Synapse 版本\",\n username_error: \"请输入完整有效的用户 ID: '@user:domain'\",\n protocol_error: \"URL 需要以'http://'或'https://'作为起始\",\n url_error: \"不是一个有效的 Matrix 服务器地址\",\n sso_sign_in: \"使用 SSO 登录\",\n },\n users: {\n invalid_user_id:\n \"必须要是一个有效的 Matrix 用户 ID ,例如 @user_id:homeserver\",\n tabs: { sso: \"SSO\" },\n },\n rooms: {\n tabs: {\n basic: \"基本\",\n members: \"成员\",\n detail: \"细节\",\n permission: \"权限\",\n },\n delete: {\n title: \"删除房间\",\n message:\n \"您确定要删除这个房间吗?该操作无法被撤销。这个房间里所有的消息和分享的媒体都将被从服务器上删除!\",\n },\n },\n reports: { tabs: { basic: \"基本\", detail: \"细节\" } },\n },\n import_users: {\n error: {\n at_entry: \"在条目 %{entry}: %{message}\",\n error: \"错误\",\n required_field: \"需要的值 '%{field}' 未被设置。\",\n invalid_value:\n \"第 %{row} 行出现无效值。 '%{field}' 只可以是 'true' 或 'false'。\",\n unreasonably_big: \"拒绝加载过大的文件: %{size} MB\",\n already_in_progress: \"一个导入进程已经在运行中\",\n id_exits: \"ID %{id} 已经存在\",\n },\n title: \"通过 CSV 导入用户\",\n goToPdf: \"转到 PDF\",\n cards: {\n importstats: {\n header: \"导入用户\",\n users_total:\n \"%{smart_count} 用户在 CSV 文件中 |||| %{smart_count} 用户在 CSV 文件中\",\n guest_count: \"%{smart_count} 访客 |||| %{smart_count} 访客\",\n admin_count: \"%{smart_count} 管理员 |||| %{smart_count} 管理员\",\n },\n conflicts: {\n header: \"冲突处理策略\",\n mode: {\n stop: \"在冲突处停止\",\n skip: \"显示错误并跳过冲突\",\n },\n },\n ids: {\n header: \"IDs\",\n all_ids_present: \"每条记录的 ID\",\n count_ids_present:\n \"%{smart_count} 个含 ID 的记录 |||| %{smart_count} 个含 ID 的记录\",\n mode: {\n ignore: \"忽略 CSV 中的 ID 并创建新的\",\n update: \"更新已经存在的记录\",\n },\n },\n passwords: {\n header: \"密码\",\n all_passwords_present: \"每条记录的密码\",\n count_passwords_present:\n \"%{smart_count} 个含密码的记录 |||| %{smart_count} 个含密码的记录\",\n use_passwords: \"使用 CSV 中标记的密码\",\n },\n upload: {\n header: \"导入 CSV 文件\",\n explanation:\n \"在这里,你可以上传一个用逗号分隔的文件,用于创建或更新用户。该文件必须包括 'id' 和 'displayname' 字段。你可以在这里下载并修改一个示例文件:\",\n },\n startImport: {\n simulate_only: \"模拟模式\",\n run_import: \"导入\",\n },\n results: {\n header: \"导入结果\",\n total: \"共计 %{smart_count} 条记录 |||| 共计 %{smart_count} 条记录\",\n successful: \"%{smart_count} 条记录导入成功\",\n skipped: \"跳过 %{smart_count} 条记录\",\n download_skipped: \"下载跳过的记录\",\n with_error:\n \"%{smart_count} 条记录出现错误 ||| %{smart_count} 条记录出现错误\",\n simulated_only: \"只是一次模拟运行\",\n },\n },\n },\n resources: {\n users: {\n name: \"用户\",\n email: \"邮箱\",\n msisdn: \"电话\",\n threepid: \"邮箱 / 电话\",\n fields: {\n avatar: \"邮箱\",\n id: \"用户 ID\",\n name: \"用户名\",\n is_guest: \"访客\",\n admin: \"服务器管理员\",\n deactivated: \"被禁用\",\n guests: \"显示访客\",\n show_deactivated: \"显示被禁用的账户\",\n user_id: \"搜索用户\",\n displayname: \"显示名字\",\n password: \"密码\",\n avatar_url: \"头像 URL\",\n avatar_src: \"头像\",\n medium: \"Medium\",\n threepids: \"3PIDs\",\n address: \"地址\",\n creation_ts_ms: \"创建时间戳\",\n consent_version: \"协议版本\",\n },\n helper: {\n deactivate: \"您必须提供一串密码来激活账户。\",\n erase: \"将用户标记为根据 GDPR 的要求抹除了\",\n },\n action: {\n erase: \"抹除用户信息\",\n },\n },\n rooms: {\n name: \"房间\",\n fields: {\n room_id: \"房间 ID\",\n name: \"房间名\",\n canonical_alias: \"别名\",\n joined_members: \"成员\",\n joined_local_members: \"本地成员\",\n state_events: \"状态事件\",\n version: \"版本\",\n is_encrypted: \"已经加密\",\n encryption: \"加密\",\n federatable: \"可联合的\",\n public: \"公开\",\n creator: \"创建者\",\n join_rules: \"加入规则\",\n guest_access: \"访客访问\",\n history_visibility: \"历史可见性\",\n },\n enums: {\n join_rules: {\n public: \"公开\",\n knock: \"申请\",\n invite: \"邀请\",\n private: \"私有\",\n },\n guest_access: {\n can_join: \"访客可以加入\",\n forbidden: \"访客不可加入\",\n },\n history_visibility: {\n invited: \"自从被邀请\",\n joined: \"自从加入\",\n shared: \"自从分享\",\n world_readable: \"任何人\",\n },\n unencrypted: \"未加密\",\n },\n },\n reports: {\n name: \"报告事件\",\n fields: {\n id: \"ID\",\n received_ts: \"报告时间\",\n user_id: \"报告者\",\n name: \"房间名\",\n score: \"分数\",\n reason: \"原因\",\n event_id: \"事件 ID\",\n event_json: {\n origin: \"原始服务器\",\n origin_server_ts: \"发送时间\",\n type: \"事件类型\",\n content: {\n msgtype: \"内容类型\",\n body: \"内容\",\n format: \"格式\",\n formatted_body: \"格式化的数据\",\n algorithm: \"算法\",\n },\n },\n },\n },\n connections: {\n name: \"连接\",\n fields: {\n last_seen: \"日期\",\n ip: \"IP 地址\",\n user_agent: \"用户代理 (UA)\",\n },\n },\n devices: {\n name: \"设备\",\n fields: {\n device_id: \"设备 ID\",\n display_name: \"设备名\",\n last_seen_ts: \"时间戳\",\n last_seen_ip: \"IP 地址\",\n },\n action: {\n erase: {\n title: \"移除 %{id}\",\n content: '您确定要移除设备 \"%{name}\"?',\n success: \"设备移除成功。\",\n failure: \"出现了一个错误。\",\n },\n },\n },\n users_media: {\n name: \"媒体文件\",\n fields: {\n media_id: \"媒体文件 ID\",\n media_length: \"长度\",\n media_type: \"类型\",\n upload_name: \"文件名\",\n quarantined_by: \"被隔离\",\n safe_from_quarantine: \"取消隔离\",\n created_ts: \"创建\",\n last_access_ts: \"上一次访问\",\n },\n },\n delete_media: {\n name: \"媒体文件\",\n fields: {\n before_ts: \"最后访问时间\",\n size_gt: \"大于 (字节)\",\n keep_profiles: \"保留头像\",\n },\n action: {\n send: \"删除媒体\",\n send_success: \"请求发送成功。\",\n send_failure: \"出现了一个错误。\",\n },\n helper: {\n send: \"这个API会删除您硬盘上的本地媒体。包含了任何的本地缓存和下载的媒体备份。这个API不会影响上传到外部媒体存储库上的媒体文件。\",\n },\n },\n pushers: {\n name: \"发布者\",\n fields: {\n app: \"App\",\n app_display_name: \"App 名称\",\n app_id: \"App ID\",\n device_display_name: \"设备显示名\",\n kind: \"类型\",\n lang: \"语言\",\n profile_tag: \"数据标签\",\n pushkey: \"Pushkey\",\n data: { url: \"URL\" },\n },\n },\n servernotices: {\n name: \"服务器提示\",\n send: \"发送服务器提示\",\n fields: {\n body: \"信息\",\n },\n action: {\n send: \"发送提示\",\n send_success: \"服务器提示发送成功。\",\n send_failure: \"出现了一个错误。\",\n },\n helper: {\n send: '向选中的用户发送服务器提示。服务器配置中的 \"服务器提示(Server Notices)\" 选项需要被设置为启用。',\n },\n },\n user_media_statistics: {\n name: \"用户的媒体文件\",\n fields: {\n media_count: \"媒体文件统计\",\n media_length: \"媒体文件长度\",\n },\n },\n },\n};\nexport default zh;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport App from \"./App\";\n\nReactDOM.render(<App />, document.getElementById(\"root\"));\n"],"sourceRoot":""} |