From 11a21e21bc6729395913c31b76c554025e2dab25 Mon Sep 17 00:00:00 2001
From: awesome-michael <37796947+awesome-michael@users.noreply.github.com>
Date: Tue, 22 Mar 2022 18:12:55 +0000
Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Awesome-?=
=?UTF-8?q?Technologies/synapse-admin@5aa90c25f7e9a2ff465e959af7cd521ffd0b?=
=?UTF-8?q?142a=20=F0=9F=9A=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
asset-manifest.json | 6 +++---
index.html | 2 +-
static/js/main.0c533573.chunk.js | 2 ++
static/js/main.0c533573.chunk.js.map | 1 +
static/js/main.6901634e.chunk.js | 2 --
static/js/main.6901634e.chunk.js.map | 1 -
6 files changed, 7 insertions(+), 7 deletions(-)
create mode 100644 static/js/main.0c533573.chunk.js
create mode 100644 static/js/main.0c533573.chunk.js.map
delete mode 100644 static/js/main.6901634e.chunk.js
delete mode 100644 static/js/main.6901634e.chunk.js.map
diff --git a/asset-manifest.json b/asset-manifest.json
index 5aa42a3..ce82f4e 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,7 +1,7 @@
{
"files": {
- "main.js": "./static/js/main.6901634e.chunk.js",
- "main.js.map": "./static/js/main.6901634e.chunk.js.map",
+ "main.js": "./static/js/main.0c533573.chunk.js",
+ "main.js.map": "./static/js/main.0c533573.chunk.js.map",
"runtime-main.js": "./static/js/runtime-main.4b8de4d4.js",
"runtime-main.js.map": "./static/js/runtime-main.4b8de4d4.js.map",
"static/js/2.aed9ef59.chunk.js": "./static/js/2.aed9ef59.chunk.js",
@@ -12,6 +12,6 @@
"entrypoints": [
"static/js/runtime-main.4b8de4d4.js",
"static/js/2.aed9ef59.chunk.js",
- "static/js/main.6901634e.chunk.js"
+ "static/js/main.0c533573.chunk.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index 4df7533..f7ab821 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
\n https://github.com/marmelab/react-admin/issues/4349#issuecomment-578594735\n */\n
\n {record.quarantined_by && (\n \n \n {/*\n Button instead BooleanField for\n consistent appearance and position in the column\n */}\n \n
\n \n )}\n {record.safe_from_quarantine && (\n \n \n \n
\n \n )}\n {!record.safe_from_quarantine && !record.quarantined_by && (\n \n \n \n
\n \n )}\n \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
\n {record.safe_from_quarantine && (\n \n \n \n
\n \n )}\n {record.quarantined_by && (\n \n \n \n
\n \n )}\n {!record.safe_from_quarantine && !record.quarantined_by && (\n \n \n \n
\n \n )}\n \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
\n {filters &&\n cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: \"button\",\n })}\n \n \n {/* Add your custom actions */}\n \n \n );\n};\n\nUserListActions.defaultProps = {\n selectedIds: [],\n onUnselectItems: () => null,\n};\n\nconst UserPagination = props => (\n
\n);\n\nconst UserFilter = props => (\n
\n \n \n \n \n);\n\nconst UserBulkActionButtons = props => (\n
\n \n \n \n);\n\nconst AvatarField = ({ source, className, record = {} }) => (\n
\n);\n\nexport const UserList = props => {\n const classes = useStyles();\n return (\n
}\n filterDefaultValues={{ guests: true, deactivated: false }}\n sort={{ field: \"name\", order: \"ASC\" }}\n actions={
}\n bulkActionButtons={
}\n pagination={
}\n >\n
\n \n \n \n \n \n \n \n \n \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
\n \n \n \n \n );\n};\n\nexport const UserCreate = props => (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nconst UserTitle = ({ record }) => {\n const translate = useTranslate();\n return (\n
\n {translate(\"resources.users.name\", {\n smart_count: 1,\n })}{\" \"}\n {record ? `\"${record.displayname}\"` : \"\"}\n \n );\n};\nexport const UserEdit = props => {\n const classes = useStyles();\n const translate = useTranslate();\n return (\n
}>\n
}>\n
}\n >\n
\n
\n
\n
\n
\n
\n
\n
\n \n\n
}\n path=\"threepid\"\n >\n
\n \n \n \n \n \n \n\n
}\n path=\"sso\"\n >\n
\n \n \n \n \n \n \n\n
}\n path=\"devices\"\n >\n
\n \n \n \n \n \n \n \n \n \n\n
}\n path=\"connections\"\n >\n
\n \n \n \n \n \n \n \n \n \n\n
}\n path=\"media\"\n >\n
}\n perPage={50}\n sort={{ field: \"created_ts\", order: \"DESC\" }}\n >\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
}\n path=\"rooms\"\n >\n
\n \"/rooms/\" + id + \"/show\"}\n >\n \n \n \n \n \n \n \n\n
}\n path=\"pushers\"\n >\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \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
\n);\n\nexport const RoomDirectoryDeleteButton = props => {\n const translate = useTranslate();\n\n return (\n
}\n />\n );\n};\n\nexport const RoomDirectoryBulkDeleteButton = props => (\n
}\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
\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
\n );\n};\n\nconst RoomDirectoryBulkActionButtons = props => (\n
\n \n \n);\n\nconst AvatarField = ({ source, className, record = {} }) => (\n
\n);\n\nconst RoomDirectoryFilter = ({ ...props }) => {\n const translate = useTranslate();\n return (\n
\n \n \n \n \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
}\n bulkActionButtons={
}\n filters={
}\n perPage={100}\n >\n
\"/rooms/\" + id + \"/show\"}>\n \n \n {roomIdFilter && (\n \n )}\n {canonicalAliasFilter && (\n \n )}\n {topicFilter && (\n \n )}\n \n \n \n \n \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
\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
\n \n {value === true ? (\n \n ) : (\n \n )}\n \n \n );\n }\n\n return (\n
\n {emptyText}\n \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
\n {translate(\"resources.rooms.name\", 1)} {name}\n \n );\n};\n\nconst RoomShowActions = ({ basePath, data, resource }) => {\n var roomDirectoryStatus = \"\";\n if (data) {\n roomDirectoryStatus = data.public;\n }\n\n return (\n
\n {roomDirectoryStatus === false && (\n \n )}\n {roomDirectoryStatus === true && (\n \n )}\n \n \n );\n};\n\nexport const RoomShow = props => {\n const classes = useStyles({ props });\n const translate = useTranslate();\n return (\n
} title={
}>\n
\n }>\n \n \n \n \n \n \n \n\n }\n path=\"detail\"\n >\n \n \n \n \n \n \n \n\n }\n path=\"members\"\n >\n \n \"/users/\" + id}\n >\n \n \n \n \n \n \n \n\n }\n path=\"permission\"\n >\n \n \n \n \n \n \n\n }\n path=\"state\"\n >\n \n \n \n \n \n \n \n \n \n \n \n\n }\n path=\"forward_extremities\"\n >\n \n {translate(\"resources.rooms.helper.forward_extremities\")}\n
\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nconst RoomBulkActionButtons = props => (\n
\n \n \n \n \n);\n\nconst RoomFilter = ({ ...props }) => {\n const translate = useTranslate();\n return (\n
\n \n \n \n \n \n \n );\n};\n\nconst RoomNameField = props => {\n const { source } = props;\n const record = useRecordContext(props);\n return (\n
{record[source] || record[\"canonical_alias\"] || record[\"id\"]}\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
}\n sort={{ field: \"name\", order: \"ASC\" }}\n filters={
}\n bulkActionButtons={
}\n >\n
\n }\n />\n \n \n {localMembersFilter && }\n {stateEventsFilter && }\n {versionFilter && }\n {federateableFilter && }\n \n \n \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
\n);\n\nexport const ReportShow = props => {\n const translate = useTranslate();\n return (\n
\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n \n \n\n }\n path=\"detail\"\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const ReportList = ({ ...props }) => {\n return (\n
}\n sort={{ field: \"received_ts\", order: \"DESC\" }}\n bulkActionButtons={false}\n >\n
\n \n \n \n \n \n \n \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
\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
\n
\n \n
\n
\n
\n \n
\n
{serverVersion}
\n
\n );\n };\n\n return (\n
\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
\n {filters &&\n cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: \"button\",\n })}\n \n \n \n );\n};\n\nconst UserMediaStatsPagination = props => (\n
\n);\n\nconst UserMediaStatsFilter = props => (\n
\n \n \n);\n\nexport const UserMediaStatsList = props => {\n return (\n
}\n filters={
}\n pagination={
}\n sort={{ field: \"media_length\", order: \"DESC\" }}\n bulkActionButtons={false}\n >\n
\"/users/\" + id + \"/media\"}>\n \n \n \n \n \n \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
\n \n \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
;\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
\n \n \n \n {translate(\n \"import_users.cards.importstats.users_total\",\n stats.total\n )}\n
\n \n {translate(\n \"import_users.cards.importstats.guest_count\",\n stats.is_guest\n )}\n
\n \n {translate(\n \"import_users.cards.importstats.admin_count\",\n stats.admin\n )}\n
\n \n ,\n
\n \n \n \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
\n {stats.id > 0 ? (\n \n \n \n \n \n
\n ) : (\n \"\"\n )}\n \n ,\n
\n \n \n \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
\n {stats.password > 0 ? (\n \n \n }\n label={translate(\"import_users.cards.passwords.use_passwords\")}\n />\n
\n ) : (\n \"\"\n )}\n \n ,\n ];\n\n let conflictCards = stats && !importResults && (\n
\n \n \n \n \n \n \n \n
\n \n \n );\n\n let errorCards = error && (\n
\n \n \n {(Array.isArray(error) ? error : [error]).map(e => (\n {e}
\n ))}\n \n \n );\n\n let uploadCard = !importResults && (\n
\n \n \n {translate(\"import_users.cards.upload.explanation\")}\n example.csv\n
\n
\n \n \n \n );\n\n let resultsCard = importResults && (\n
\n \n \n {translate(\n \"import_users.cards.results.total\",\n importResults.totalRecordCount\n )}\n
\n {translate(\n \"import_users.cards.results.successful\",\n importResults.succeededRecords.length\n )}\n
\n {importResults.skippedRecords.length\n ? [\n translate(\n \"import_users.cards.results.skipped\",\n importResults.skippedRecords.length\n ),\n
\n \n
,\n
,\n ]\n : \"\"}\n {importResults.erroredRecords.length\n ? [\n translate(\n \"import_users.cards.results.skipped\",\n importResults.erroredRecords.length\n ),\n
,\n ]\n : \"\"}\n
\n {importResults.wasDryRun && [\n translate(\"import_users.cards.results.simulated_only\"),\n
,\n ]}\n
\n \n );\n\n let startImportCard =\n !values || values.length === 0 || importResults ? undefined : (\n
\n \n }\n label={translate(\"import_users.cards.startImport.simulate_only\")}\n />\n \n {progress !== null ? (\n \n {progress.done} of {progress.limit} done\n
\n ) : null}\n \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 =
{allCards};\n\n return [\n
,\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
\n \n \n);\n\nexport const RegistrationTokenList = props => {\n return (\n
}\n filterDefaultValues={{ valid: true }}\n pagination={false}\n perPage={500}\n >\n
\n \n \n \n \n \n \n \n );\n};\n\nexport const RegistrationTokenCreate = props => (\n
\n }>\n \n \n \n \n \n \n);\n\nexport const RegistrationTokenEdit = props => {\n return (\n
\n \n \n \n \n \n \n \n \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
,\n ]}\n >\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \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(
, document.getElementById(\"root\"));\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/static/js/main.6901634e.chunk.js b/static/js/main.6901634e.chunk.js
deleted file mode 100644
index 9f471d2..0000000
--- a/static/js/main.6901634e.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(this["webpackJsonpsynapse-admin"]=this["webpackJsonpsynapse-admin"]||[]).push([[0],{634:function(e,t){},673:function(e,t,r){"use strict";r.r(t);var s=r(0),a=r(23),n=r.n(a),i=r(365),o=r(763),c=r(762),d=r(232),l=r(102),u={login:function(e){var t=e.base_url,r=e.username,s=e.password,a=e.loginToken;t=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERSION:""}).REACT_APP_SERVER||t,console.log("login ");var n={method:"POST",body:JSON.stringify(Object.assign({device_id:localStorage.getItem("device_id"),initial_device_display_name:"Synapse Admin"},a?{type:"m.login.token",token:a}:{type:"m.login.password",user:r,password:s}))};t=t.replace(/\/+$/g,""),localStorage.setItem("base_url",t);var i=window.decodeURIComponent(t)+"/_matrix/client/r0/login";return l.a.fetchJson(i,n).then((function(e){var t=e.json;localStorage.setItem("home_server",t.home_server),localStorage.setItem("user_id",t.user_id),localStorage.setItem("access_token",t.access_token),localStorage.setItem("device_id",t.device_id)}))},logout:function(){console.log("logout");var e=localStorage.getItem("base_url")+"/_matrix/client/r0/logout",t=localStorage.getItem("access_token"),r={method:"POST",user:{authenticated:!0,token:"Bearer ".concat(t)}};return"string"===typeof t&&l.a.fetchJson(e,r).then((function(e){e.json;localStorage.removeItem("access_token")})),Promise.resolve()},checkError:function(e){var t=e.status;return console.log("checkError "+t),401===t||403===t?Promise.reject():Promise.resolve()},checkAuth:function(){var e=localStorage.getItem("access_token");return console.log("checkAuth "+e),"string"===typeof e?Promise.resolve():Promise.reject()},getPermissions:function(){return Promise.resolve()}},m=r(6),j=r(90),b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=localStorage.getItem("access_token");return console.log("httpClient "+e),null!=r&&(t.user={authenticated:!0,token:"Bearer ".concat(r)}),l.a.fetchJson(e,t)},p=function(e){var t=localStorage.getItem("base_url"),r=/^mxc:\/\/([^/]+)\/(\w+)/.exec(e);if(console.log("mxcClient "+r),null==r)return null;var s=r[1],a=r[2];return"".concat(t,"/_matrix/media/r0/thumbnail/").concat(s,"/").concat(a,"?width=24&height=24&method=scale")},_={users:{path:"/_synapse/admin/v2/users",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.name,avatar_src:p(e.avatar_url),is_guest:!!e.is_guest,admin:!!e.admin,deactivated:!!e.deactivated,creation_ts_ms:1e3*e.creation_ts})},data:"users",total:function(e){return e.total},create:function(e){return{endpoint:"/_synapse/admin/v2/users/@".concat(e.id,":").concat(localStorage.getItem("home_server")),body:e,method:"PUT"}},delete:function(e){return{endpoint:"/_synapse/admin/v1/deactivate/".concat(e.id),body:{erase:!0},method:"POST"}}},rooms:{path:"/_synapse/admin/v1/rooms",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.room_id,alias:e.canonical_alias,members:e.joined_members,is_encrypted:!!e.encryption,federatable:!!e.federatable,public:!!e.public})},data:"rooms",total:function(e){return e.total_rooms},delete:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e.id),body:{block:!1}}}},reports:{path:"/_synapse/admin/v1/event_reports",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.id})},data:"event_reports",total:function(e){return e.total}},devices:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.device_id})},data:"devices",total:function(e){return e.total},reference:function(e){return{endpoint:"/_synapse/admin/v2/users/".concat(e,"/devices")}},delete:function(e){return{endpoint:"/_synapse/admin/v2/users/".concat(e.user_id,"/devices/").concat(e.id)}}},connections:{path:"/_synapse/admin/v1/whois",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.user_id})},data:"connections"},room_members:{map:function(e){return{id:e}},reference:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e,"/members")}},data:"members",total:function(e){return e.total}},room_state:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.event_id})},reference:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e,"/state")}},data:"state",total:function(e){return e.state.length}},pushers:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.pushkey})},reference:function(e){return{endpoint:"/_synapse/admin/v1/users/".concat(e,"/pushers")}},data:"pushers",total:function(e){return e.total}},joined_rooms:{map:function(e){return{id:e}},reference:function(e){return{endpoint:"/_synapse/admin/v1/users/".concat(e,"/joined_rooms")}},data:"joined_rooms",total:function(e){return e.total}},users_media:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.media_id})},reference:function(e){return{endpoint:"/_synapse/admin/v1/users/".concat(e,"/media")}},data:"media",total:function(e){return e.total},delete:function(e){return{endpoint:"/_synapse/admin/v1/media/".concat(localStorage.getItem("home_server"),"/").concat(e.id)}}},delete_media:{delete:function(e){return{endpoint:"/_synapse/admin/v1/media/".concat(localStorage.getItem("home_server"),"/delete?before_ts=").concat(e.before_ts,"&size_gt=").concat(e.size_gt,"&keep_profiles=").concat(e.keep_profiles),method:"POST"}}},protect_media:{map:function(e){return{id:e.media_id}},create:function(e){return{endpoint:"/_synapse/admin/v1/media/protect/".concat(e.media_id),method:"POST"}},delete:function(e){return{endpoint:"/_synapse/admin/v1/media/unprotect/".concat(e.media_id),method:"POST"}}},quarantine_media:{map:function(e){return{id:e.media_id}},create:function(e){return{endpoint:"/_synapse/admin/v1/media/quarantine/".concat(localStorage.getItem("home_server"),"/").concat(e.media_id),method:"POST"}},delete:function(e){return{endpoint:"/_synapse/admin/v1/media/unquarantine/".concat(localStorage.getItem("home_server"),"/").concat(e.media_id),method:"POST"}}},servernotices:{map:function(e){return{id:e.event_id}},create:function(e){return{endpoint:"/_synapse/admin/v1/send_server_notice",body:{user_id:e.id,content:{msgtype:"m.text",body:e.body}},method:"POST"}}},user_media_statistics:{path:"/_synapse/admin/v1/statistics/users/media",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.user_id})},data:"users",total:function(e){return e.total}},forward_extremities:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.event_id})},reference:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e,"/forward_extremities")}},data:"results",total:function(e){return e.count},delete:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e.id,"/forward_extremities")}}},room_directory:{path:"/_matrix/client/r0/publicRooms",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.room_id,public:!!e.public,guest_access:!!e.guest_access,avatar_src:p(e.avatar_url)})},data:"chunk",total:function(e){return e.total_room_count_estimate},create:function(e){return{endpoint:"/_matrix/client/r0/directory/list/room/".concat(e.id),body:{visibility:"public"},method:"PUT"}},delete:function(e){return{endpoint:"/_matrix/client/r0/directory/list/room/".concat(e.id),body:{visibility:"private"},method:"PUT"}}},registration_tokens:{path:"/_synapse/admin/v1/registration_tokens",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.token})},data:"registration_tokens",total:function(e){return e.registration_tokens.length},create:function(e){return{endpoint:"/_synapse/admin/v1/registration_tokens/new",body:e,method:"POST"}},delete:function(e){return{endpoint:"/_synapse/admin/v1/registration_tokens/".concat(e.id)}}}};function h(e,t){if(null!==t)return t}function O(e){return"DESC"===e?"b":"f"}var f={getList:function(e,t){console.log("getList "+e);var r=t.filter,s=r.user_id,a=r.name,n=r.guests,i=r.deactivated,o=r.search_term,c=r.valid,d=t.pagination,l=d.page,u=d.perPage,m=t.sort,p=m.field,h=m.order,f=(l-1)*u,g={from:f,limit:u,user_id:s,search_term:o,name:a,guests:n,deactivated:i,valid:c,order_by:p,dir:O(h)},v=localStorage.getItem("base_url");if(!v||!(e in _))return Promise.reject();var x=_[e],y=v+x.path,w="".concat(y,"?").concat(Object(j.stringify)(g));return b(w).then((function(e){var t=e.json;return{data:t[x.data].map(x.map),total:x.total(t,f,u)}}))},getOne:function(e,t){console.log("getOne "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e],a=r+s.path;return b("".concat(a,"/").concat(t.id)).then((function(e){var t=e.json;return{data:s.map(t)}}))},getMany:function(e,t){console.log("getMany "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e],a=r+s.path;return Promise.all(t.ids.map((function(e){return b("".concat(a,"/").concat(e))}))).then((function(e){return{data:e.map((function(e){var t=e.json;return s.map(t)})),total:e.length}}))},getManyReference:function(e,t){console.log("getManyReference "+e);var r=t.pagination,s=r.page,a=r.perPage,n=t.sort,i=n.field,o=n.order,c=(s-1)*a,d={from:c,limit:a,order_by:i,dir:O(o)},l=localStorage.getItem("base_url");if(!l||!(e in _))return Promise.reject();var u=_[e],m=u.reference(t.id),p="".concat(l).concat(m.endpoint,"?").concat(Object(j.stringify)(d));return b(p).then((function(e){e.headers;var t=e.json;return{data:t[u.data].map(u.map),total:u.total(t,c,a)}}))},update:function(e,t){console.log("update "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e],a=r+s.path;return b("".concat(a,"/").concat(t.data.id),{method:"PUT",body:JSON.stringify(t.data,h)}).then((function(e){var t=e.json;return{data:s.map(t)}}))},updateMany:function(e,t){console.log("updateMany "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=r+_[e].path;return Promise.all(t.ids.map((function(e){return b("".concat(s,"/").concat(e))}),{method:"PUT",body:JSON.stringify(t.data,h)})).then((function(e){return{data:e.map((function(e){return e.json}))}}))},create:function(e,t){console.log("create "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e];if(!("create"in s))return Promise.reject();var a=s.create(t.data),n=r+a.endpoint;return b(n,{method:a.method,body:JSON.stringify(a.body,h)}).then((function(e){var t=e.json;return{data:s.map(t)}}))},createMany:function(e,t){console.log("createMany "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e];return"create"in s?Promise.all(t.ids.map((function(e){t.data.id=e;var a=s.create(t.data),n=r+a.endpoint;return b(n,{method:a.method,body:JSON.stringify(a.body,h)})}))).then((function(e){return{data:e.map((function(e){return e.json}))}})):Promise.reject()},delete:function(e,t){console.log("delete "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e];if("delete"in s){var a=s.delete(t),n=r+a.endpoint;return b(n,{method:"method"in a?a.method:"DELETE",body:"body"in a?JSON.stringify(a.body):null}).then((function(e){return{data:e.json}}))}var i=r+s.path;return b("".concat(i,"/").concat(t.id),{method:"DELETE",body:JSON.stringify(t.data,h)}).then((function(e){return{data:e.json}}))},deleteMany:function(e,t){console.log("deleteMany "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e];if("delete"in s)return Promise.all(t.ids.map((function(e){var a=s.delete(Object(m.a)(Object(m.a)({},t),{},{id:e})),n=r+a.endpoint;return b(n,{method:"method"in a?a.method:"DELETE",body:"body"in a?JSON.stringify(a.body):null})}))).then((function(e){return{data:e.map((function(e){return e.json}))}}));var a=r+s.path;return Promise.all(t.ids.map((function(e){return b("".concat(a,"/").concat(e),{method:"DELETE",body:JSON.stringify(t.data,h)})}))).then((function(e){return{data:e.map((function(e){return e.json}))}}))}},g=r(4),v=r(781),x=r(408),y=r.n(x),w=r(407),S=r.n(w),k=r(409),I=r.n(k),P=r(145),D=r.n(P),A=r(414),C=r.n(A),E=r(413),R=r.n(E),T=r(406),z=r.n(T),F=r(410),V=r.n(F),N=r(89),B=r.n(N),M=r(110),L=r(450),q=r(782),U=r(783),G=r(31),W=r(435),Z=r(741),J=r(742),H=r(774),K=r(437),Q=r(770),$=r(764),Y=r(745),X=r(746),ee=r(747),te=r(215),re=r(39),se=r(236),ae=r(722),ne=r(769),ie=r(771),oe=r(778),ce=r(213),de=r(748),le=r(780),ue=r(765),me=r(785),je=r(766),be=r(779),pe=r(776),_e=r(773),he=r(777),Oe=r(752),fe=r(753),ge=r(24),ve=r(20),xe=r(161),ye=r(338),we=r(726),Se=r(87),ke=r(279),Ie=r.n(ke),Pe=r(211),De=r.n(Pe),Ae=r(728),Ce=r(730),Ee=r(731),Re=r(729),Te=r(2),ze=function(e){var t=e.open,r=e.loading,s=e.onClose,a=e.onSend,n=Object(re.a)(),i=function(e){return Object(Te.jsxs)(se.a,Object(m.a)(Object(m.a)({},e),{},{children:[Object(Te.jsx)(ae.a,{label:"resources.servernotices.action.send",disabled:e.pristine}),Object(Te.jsx)(G.a,{label:"ra.action.cancel",onClick:s,children:Object(Te.jsx)(De.a,{})})]}))};return Object(Te.jsxs)(Ae.a,{open:t,onClose:s,loading:r,children:[Object(Te.jsx)(Re.a,{children:n("resources.servernotices.action.send")}),Object(Te.jsxs)(Ce.a,{children:[Object(Te.jsx)(Ee.a,{children:n("resources.servernotices.helper.send")}),Object(Te.jsx)(oe.a,{toolbar:Object(Te.jsx)(i,{}),submitOnEnter:!1,redirect:!1,save:a,children:Object(Te.jsx)(ce.a,{source:"body",label:"resources.servernotices.fields.body",fullWidth:!0,multiline:!0,rows:"4",resettable:!0,validate:Object(te.g)()})})]})]})},Fe=function(e){var t=e.record,r=Object(s.useState)(!1),a=Object(ve.a)(r,2),n=a[0],i=a[1],o=Object(xe.a)(),c=Object(ye.a)("servernotices"),d=Object(ve.a)(c,2),l=d[0],u=d[1].loading,j=function(){return i(!1)};return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(G.a,{label:"resources.servernotices.send",onClick:function(){return i(!0)},disabled:u,children:Object(Te.jsx)(Ie.a,{})}),Object(Te.jsx)(ze,{open:n,onClose:j,onSend:function(e){l({payload:{data:Object(m.a)({id:t.id},e)}},{onSuccess:function(){o("resources.servernotices.action.send_success"),j()},onFailure:function(){return o("resources.servernotices.action.send_failure","error")}})}})]})},Ve=function(e){var t=e.selectedIds,r=Object(s.useState)(!1),a=Object(ve.a)(r,2),n=a[0],i=a[1],o=Object(xe.a)(),c=Object(we.a)(),d=Object(Se.a)(),l=Object(ve.a)(d,2),u=l[0],m=l[1].loading,j=function(){return i(!1)};return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(G.a,{label:"resources.servernotices.send",onClick:function(){return i(!0)},disabled:m,children:Object(Te.jsx)(Ie.a,{})}),Object(Te.jsx)(ze,{open:n,onClose:j,onSend:function(e){u({type:"createMany",resource:"servernotices",payload:{ids:t,data:e}},{onSuccess:function(e){e.data;o("resources.servernotices.action.send_success"),c("users"),j()},onFailure:function(e){return o("resources.servernotices.action.send_failure","error")}})}})]})},Ne=r(680),Be=r(237),Me=r(88),Le=r.n(Me),qe=r(101),Ue=r(46),Ge=r(218),We=r.n(Ge),Ze=Object(qe.a)((function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Object(Ue.alpha)(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),{name:"RaDeleteDeviceButton"}),Je=function(e){var t=e.record,r=Ze(e),a=Object(s.useState)(!1),n=Object(ve.a)(a,2),i=n[0],o=n[1],c=Object(Ne.a)(),d=Object(xe.a)(),l=Object(Se.a)(),u=Object(ve.a)(l,2),m=u[0],j=u[1].loading;if(!t)return null;return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(G.a,{label:"ra.action.remove",onClick:function(){return o(!0)},className:We()("ra-delete-button",r.deleteButton),children:Object(Te.jsx)(Le.a,{})}),Object(Te.jsx)(Be.a,{isOpen:i,loading:j,onConfirm:function(){m({type:"delete",resource:"devices",payload:{id:t.id,user_id:t.user_id}},{onSuccess:function(){d("resources.devices.action.erase.success"),c()},onFailure:function(){return d("resources.devices.action.erase.failure","error")}}),o(!1)},onClose:function(){return o(!1)},title:"resources.devices.action.erase.title",content:"resources.devices.action.erase.content",translateOptions:{id:t.id,name:t.display_name?t.display_name:t.id}})]})},He=r(451),Ke=r(733),Qe=r(734),$e=r(322),Ye=r(281),Xe=r.n(Ye),et=r(116),tt=r.n(et),rt=r(280),st=r.n(rt),at=r(143),nt=r.n(at),it=r(387),ot=r.n(it),ct=Object(qe.a)((function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Object(Ue.alpha)(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),{name:"RaDeleteDeviceButton"}),dt=function(e){var t=e.open,r=e.loading,s=e.onClose,a=e.onSend,n=Object(re.a)(),i=function(e){return Object(Te.jsxs)(se.a,Object(m.a)(Object(m.a)({},e),{},{children:[Object(Te.jsx)(ae.a,{label:"resources.delete_media.action.send",icon:Object(Te.jsx)(st.a,{})}),Object(Te.jsx)(G.a,{label:"ra.action.cancel",onClick:s,children:Object(Te.jsx)(De.a,{})})]}))};return Object(Te.jsxs)(Ae.a,{open:t,onClose:s,loading:r,children:[Object(Te.jsx)(Re.a,{children:n("resources.delete_media.action.send")}),Object(Te.jsxs)(Ce.a,{children:[Object(Te.jsx)(Ee.a,{children:n("resources.delete_media.helper.send")}),Object(Te.jsxs)(oe.a,{toolbar:Object(Te.jsx)(i,{}),submitOnEnter:!1,redirect:!1,save:a,children:[Object(Te.jsx)(Ke.a,{fullWidth:!0,source:"before_ts",label:"resources.delete_media.fields.before_ts",defaultValue:0,parse:function(e){var t=new Date(e);return isNaN(t)?0:t.getTime()}}),Object(Te.jsx)(Qe.a,{fullWidth:!0,source:"size_gt",label:"resources.delete_media.fields.size_gt",defaultValue:0,min:0,step:1024}),Object(Te.jsx)(H.a,{fullWidth:!0,source:"keep_profiles",label:"resources.delete_media.fields.keep_profiles",defaultValue:!0})]})]})]})},lt=function(e){var t=ct(e),r=Object(s.useState)(!1),a=Object(ve.a)(r,2),n=a[0],i=a[1],o=Object(xe.a)(),c=Object($e.a)("delete_media"),d=Object(ve.a)(c,2),l=d[0],u=d[1].loading,j=function(){return i(!1)};return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(G.a,{label:"resources.delete_media.action.send",onClick:function(){return i(!0)},disabled:u,className:We()("ra-delete-button",t.deleteButton),children:Object(Te.jsx)(st.a,{})}),Object(Te.jsx)(dt,{open:n,onClose:j,onSend:function(e){l({payload:Object(m.a)({},e)},{onSuccess:function(){o("resources.delete_media.action.send_success"),j()},onFailure:function(){return o("resources.delete_media.action.send_failure","error")}})}})]})},ut=function(e){var t=e.record,r=Object(re.a)(),a=Object(Ne.a)(),n=Object(xe.a)(),i=Object(ye.a)("protect_media"),o=Object(ve.a)(i,2),c=o[0],d=o[1].loading,l=Object($e.a)("protect_media"),u=Object(ve.a)(l,1)[0];if(!t)return null;return Object(Te.jsxs)(s.Fragment,{children:[t.quarantined_by&&Object(Te.jsx)(He.a,{title:r("resources.protect_media.action.none",{_:"resources.protect_media.action.none"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{disabled:!0,children:Object(Te.jsx)(tt.a,{})})})}),t.safe_from_quarantine&&Object(Te.jsx)(He.a,{title:r("resources.protect_media.action.delete",{_:"resources.protect_media.action.delete"}),arrow:!0,children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{onClick:function(){u({payload:Object(m.a)({},t)},{onSuccess:function(){n("resources.protect_media.action.send_success"),a()},onFailure:function(){return n("resources.protect_media.action.send_failure","error")}})},disabled:d,children:Object(Te.jsx)(nt.a,{})})})}),!t.safe_from_quarantine&&!t.quarantined_by&&Object(Te.jsx)(He.a,{title:r("resources.protect_media.action.create",{_:"resources.protect_media.action.create"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{onClick:function(){c({payload:{data:t}},{onSuccess:function(){n("resources.protect_media.action.send_success"),a()},onFailure:function(){return n("resources.protect_media.action.send_failure","error")}})},disabled:d,children:Object(Te.jsx)(ot.a,{})})})})]})},mt=function(e){var t=e.record,r=Object(re.a)(),a=Object(Ne.a)(),n=Object(xe.a)(),i=Object(ye.a)("quarantine_media"),o=Object(ve.a)(i,2),c=o[0],d=o[1].loading,l=Object($e.a)("quarantine_media"),u=Object(ve.a)(l,1)[0];if(!t)return null;return Object(Te.jsxs)(s.Fragment,{children:[t.safe_from_quarantine&&Object(Te.jsx)(He.a,{title:r("resources.quarantine_media.action.none",{_:"resources.quarantine_media.action.none"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{disabled:!0,children:Object(Te.jsx)(tt.a,{})})})}),t.quarantined_by&&Object(Te.jsx)(He.a,{title:r("resources.quarantine_media.action.delete",{_:"resources.quarantine_media.action.delete"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{onClick:function(){u({payload:Object(m.a)({},t)},{onSuccess:function(){n("resources.quarantine_media.action.send_success"),a()},onFailure:function(){return n("resources.quarantine_media.action.send_failure","error")}})},disabled:d,children:Object(Te.jsx)(Xe.a,{color:"error"})})})}),!t.safe_from_quarantine&&!t.quarantined_by&&Object(Te.jsx)(He.a,{title:r("resources.quarantine_media.action.create",{_:"resources.quarantine_media.action.create"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{onClick:function(){c({payload:{data:t}},{onSuccess:function(){n("resources.quarantine_media.action.send_success"),a()},onFailure:function(){return n("resources.quarantine_media.action.send_failure","error")}})},disabled:d,children:Object(Te.jsx)(Xe.a,{})})})})]})},jt=["currentSort","className","resource","filters","displayedFilters","exporter","filterValues","permanentFilter","hasCreate","basePath","selectedIds","onUnselectItems","showFilter","maxResults","total"],bt=function(){return{pathname:"/import_users"}},pt=Object(qe.a)({small:{height:"40px",width:"40px"},large:{height:"120px",width:"120px",float:"right"}}),_t={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},ht=function(e){var t=e.currentSort,r=e.className,a=e.resource,n=e.filters,i=e.displayedFilters,o=e.exporter,c=e.filterValues,d=e.permanentFilter,l=(e.hasCreate,e.basePath),u=(e.selectedIds,e.onUnselectItems,e.showFilter),j=e.maxResults,b=e.total,p=Object(g.a)(e,jt);return Object(Te.jsxs)(M.a,Object(m.a)(Object(m.a)({className:r},Object(L.c)(p)),{},{children:[n&&Object(s.cloneElement)(n,{resource:a,showFilter:u,displayedFilters:i,filterValues:c,context:"button"}),Object(Te.jsx)(q.a,{basePath:l}),Object(Te.jsx)(U.a,{disabled:0===b,resource:a,sort:t,filter:Object(m.a)(Object(m.a)({},c),d),exporter:o,maxResults:j}),Object(Te.jsx)(G.a,{component:ge.a,to:bt,label:"CSV Import",children:Object(Te.jsx)(D.a,{style:{transform:"rotate(180deg)",fontSize:"20"}})})]}))};ht.defaultProps={selectedIds:[],onUnselectItems:function(){return null}};var Ot=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[10,25,50,100,500,1e3]}))},ft=function(e){return Object(Te.jsxs)(Z.a,Object(m.a)(Object(m.a)({},e),{},{children:[Object(Te.jsx)(J.a,{source:"name",alwaysOn:!0}),Object(Te.jsx)(H.a,{source:"guests",alwaysOn:!0}),Object(Te.jsx)(H.a,{label:"resources.users.fields.show_deactivated",source:"deactivated",alwaysOn:!0})]}))},gt=function(e){return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(Ve,Object(m.a)({},e)),Object(Te.jsx)(K.a,Object(m.a)(Object(m.a)({},e),{},{label:"resources.users.action.erase",confirmTitle:"resources.users.helper.erase",mutationMode:"pessimistic"}))]})},vt=function(e){var t=e.source,r=e.className,s=e.record,a=void 0===s?{}:s;return Object(Te.jsx)(v.a,{src:a[t],className:r})},xt=function(e){var t=pt();return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},e),{},{filters:Object(Te.jsx)(ft,{}),filterDefaultValues:{guests:!0,deactivated:!1},sort:{field:"name",order:"ASC"},actions:Object(Te.jsx)(ht,{maxResults:1e4}),bulkActionButtons:Object(Te.jsx)(gt,{}),pagination:Object(Te.jsx)(Ot,{}),children:Object(Te.jsxs)($.a,{rowClick:"edit",children:[Object(Te.jsx)(vt,{source:"avatar_src",className:t.small,sortBy:"avatar_url"}),Object(Te.jsx)(Y.a,{source:"id",sortBy:"name"}),Object(Te.jsx)(Y.a,{source:"displayname"}),Object(Te.jsx)(X.a,{source:"is_guest"}),Object(Te.jsx)(X.a,{source:"admin"}),Object(Te.jsx)(X.a,{source:"deactivated"}),Object(Te.jsx)(ee.a,{source:"creation_ts",label:"resources.users.fields.creation_ts_ms",showTime:!0,options:_t})]})}))},yt=[Object(te.g)(),Object(te.c)(253),Object(te.f)(/^[a-z0-9._=\-/]+$/,"synapseadmin.users.invalid_user_id")],wt=[Object(te.g)(),Object(te.c)(255)];function St(){var e=localStorage.getItem("home_server");return{id:"@"+Array(8).fill("0123456789abcdefghijklmnopqrstuvwxyz").map((function(e){return e[Math.floor(crypto.getRandomValues(new Uint32Array(1))[0]/4294967296*e.length)]})).join("")+":"+e,password:Array(20).fill("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!@-#$").map((function(e){return e[Math.floor(crypto.getRandomValues(new Uint32Array(1))[0]/4294967296*e.length)]})).join("")}}var kt=function(e){var t=Object(re.a)();return Object(Te.jsxs)(se.a,Object(m.a)(Object(m.a)({},e),{},{children:[Object(Te.jsx)(ae.a,{submitOnEnter:!0,disabled:e.pristine}),Object(Te.jsx)(ne.a,{label:"resources.users.action.erase",confirmTitle:t("resources.users.helper.erase",{smart_count:1}),mutationMode:"pessimistic"}),Object(Te.jsx)(Fe,{})]}))},It=function(e){return Object(Te.jsx)(ie.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsxs)(oe.a,{children:[Object(Te.jsx)(ce.a,{source:"id",autoComplete:"off",validate:yt}),Object(Te.jsx)(ce.a,{source:"displayname",validate:Object(te.c)(256)}),Object(Te.jsx)(de.a,{source:"password",autoComplete:"new-password",validate:Object(te.c)(512)}),Object(Te.jsx)(H.a,{source:"admin"}),Object(Te.jsx)(le.a,{source:"threepids",children:Object(Te.jsxs)(ue.a,{disableReordering:!0,children:[Object(Te.jsx)(me.a,{source:"medium",choices:[{id:"email",name:"resources.users.email"},{id:"msisdn",name:"resources.users.msisdn"}],validate:Object(te.g)()}),Object(Te.jsx)(ce.a,{source:"address",validate:wt})]})}),Object(Te.jsx)(le.a,{source:"external_ids",label:"synapseadmin.users.tabs.sso",children:Object(Te.jsxs)(ue.a,{disableReordering:!0,children:[Object(Te.jsx)(ce.a,{source:"auth_provider",validate:Object(te.g)()}),Object(Te.jsx)(ce.a,{source:"external_id",label:"resources.users.fields.id",validate:Object(te.g)()})]})})]})}))},Pt=function(e){var t=e.record,r=Object(re.a)();return Object(Te.jsxs)("span",{children:[r("resources.users.name",{smart_count:1})," ",t?'"'.concat(t.displayname,'"'):""]})},Dt=function(e){var t=pt(),r=Object(re.a)();return Object(Te.jsx)(je.a,Object(m.a)(Object(m.a)({},e),{},{title:Object(Te.jsx)(Pt,{}),children:Object(Te.jsxs)(be.a,{toolbar:Object(Te.jsx)(kt,{}),children:[Object(Te.jsxs)(pe.a,{label:r("resources.users.name",{smart_count:1}),icon:Object(Te.jsx)(z.a,{}),children:[Object(Te.jsx)(vt,{source:"avatar_src",sortable:!1,className:t.large}),Object(Te.jsx)(ce.a,{source:"id",disabled:!0}),Object(Te.jsx)(ce.a,{source:"displayname"}),Object(Te.jsx)(de.a,{source:"password",autoComplete:"new-password"}),Object(Te.jsx)(H.a,{source:"admin"}),Object(Te.jsx)(H.a,{source:"deactivated",helperText:"resources.users.helper.deactivate"}),Object(Te.jsx)(ee.a,{source:"creation_ts_ms",showTime:!0,options:_t}),Object(Te.jsx)(Y.a,{source:"consent_version"})]}),Object(Te.jsx)(pe.a,{label:"resources.users.threepid",icon:Object(Te.jsx)(S.a,{}),path:"threepid",children:Object(Te.jsx)(le.a,{source:"threepids",children:Object(Te.jsxs)(ue.a,{disableReordering:!0,children:[Object(Te.jsx)(me.a,{source:"medium",choices:[{id:"email",name:"resources.users.email"},{id:"msisdn",name:"resources.users.msisdn"}]}),Object(Te.jsx)(ce.a,{source:"address"})]})})}),Object(Te.jsx)(pe.a,{label:"synapseadmin.users.tabs.sso",icon:Object(Te.jsx)(y.a,{}),path:"sso",children:Object(Te.jsx)(le.a,{source:"external_ids",label:!1,children:Object(Te.jsxs)(ue.a,{disableReordering:!0,children:[Object(Te.jsx)(ce.a,{source:"auth_provider",validate:Object(te.g)()}),Object(Te.jsx)(ce.a,{source:"external_id",label:"resources.users.fields.id",validate:Object(te.g)()})]})})}),Object(Te.jsx)(pe.a,{label:r("resources.devices.name",{smart_count:2}),icon:Object(Te.jsx)(I.a,{}),path:"devices",children:Object(Te.jsx)(_e.a,{reference:"devices",target:"user_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"device_id",sortable:!1}),Object(Te.jsx)(Y.a,{source:"display_name",sortable:!1}),Object(Te.jsx)(Y.a,{source:"last_seen_ip",sortable:!1}),Object(Te.jsx)(ee.a,{source:"last_seen_ts",showTime:!0,options:_t,sortable:!1}),Object(Te.jsx)(Je,{})]})})}),Object(Te.jsx)(pe.a,{label:"resources.connections.name",icon:Object(Te.jsx)(V.a,{}),path:"connections",children:Object(Te.jsx)(he.a,{reference:"connections",source:"id",addLabel:!1,link:!1,children:Object(Te.jsx)(Oe.a,{source:"devices[].sessions[0].connections",label:"resources.connections.name",children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"ip",sortable:!1}),Object(Te.jsx)(ee.a,{source:"last_seen",showTime:!0,options:_t,sortable:!1}),Object(Te.jsx)(Y.a,{source:"user_agent",sortable:!1,style:{width:"100%"}})]})})})}),Object(Te.jsx)(pe.a,{label:r("resources.users_media.name",{smart_count:2}),icon:Object(Te.jsx)(R.a,{}),path:"media",children:Object(Te.jsx)(_e.a,{reference:"users_media",target:"user_id",addLabel:!1,pagination:Object(Te.jsx)(Ot,{}),perPage:50,sort:{field:"created_ts",order:"DESC"},children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(ee.a,{source:"created_ts",showTime:!0,options:_t}),Object(Te.jsx)(ee.a,{source:"last_access_ts",showTime:!0,options:_t}),Object(Te.jsx)(Y.a,{source:"media_id"}),Object(Te.jsx)(fe.a,{source:"media_length"}),Object(Te.jsx)(Y.a,{source:"media_type"}),Object(Te.jsx)(Y.a,{source:"upload_name"}),Object(Te.jsx)(Y.a,{source:"quarantined_by"}),Object(Te.jsx)(mt,{label:"resources.quarantine_media.action.name"}),Object(Te.jsx)(ut,{label:"resources.users_media.fields.safe_from_quarantine"}),Object(Te.jsx)(ne.a,{mutationMode:"pessimistic",redirect:!1})]})})}),Object(Te.jsx)(pe.a,{label:r("resources.rooms.name",{smart_count:2}),icon:Object(Te.jsx)(B.a,{}),path:"rooms",children:Object(Te.jsx)(_e.a,{reference:"joined_rooms",target:"user_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},rowClick:function(e,t,r){return"/rooms/"+e+"/show"},children:[Object(Te.jsx)(Y.a,{source:"id",sortable:!1,label:"resources.rooms.fields.room_id"}),Object(Te.jsx)(he.a,{label:"resources.rooms.fields.name",source:"id",reference:"rooms",sortable:!1,link:"",children:Object(Te.jsx)(Y.a,{source:"name",sortable:!1})})]})})}),Object(Te.jsx)(pe.a,{label:r("resources.pushers.name",{smart_count:2}),icon:Object(Te.jsx)(C.a,{}),path:"pushers",children:Object(Te.jsx)(_e.a,{reference:"pushers",target:"user_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"kind",sortable:!1}),Object(Te.jsx)(Y.a,{source:"app_display_name",sortable:!1}),Object(Te.jsx)(Y.a,{source:"app_id",sortable:!1}),Object(Te.jsx)(Y.a,{source:"data.url",sortable:!1}),Object(Te.jsx)(Y.a,{source:"device_display_name",sortable:!1}),Object(Te.jsx)(Y.a,{source:"lang",sortable:!1}),Object(Te.jsx)(Y.a,{source:"profile_tag",sortable:!1}),Object(Te.jsx)(Y.a,{source:"pushkey",sortable:!1})]})})})]})}))},At=r(10),Ct=r(767),Et=r(787),Rt=r(754),Tt=r(755),zt=r(78),Ft=r(15),Vt=r.n(Ft),Nt=r(36),Bt=r(786),Mt=r(418),Lt=r.n(Mt),qt=r(285),Ut=r.n(qt),Gt=r(415),Wt=r.n(Gt),Zt=r(229),Jt=r.n(Zt),Ht=r(230),Kt=r.n(Ht),Qt=r(227),$t=r.n(Qt),Yt=r(417),Xt=r.n(Yt),er=r(129),tr=r.n(er),rr=["roomDirectoryFilters","dispatch"],sr=Object(qe.a)({small:{height:"40px",width:"40px"}}),ar=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[100,500,1e3,2e3]}))},nr=function(e){var t=Object(re.a)();return Object(Te.jsx)(ne.a,Object(m.a)(Object(m.a)({},e),{},{label:"resources.room_directory.action.erase",redirect:!1,mutationMode:"pessimistic",confirmTitle:t("resources.room_directory.action.title",{smart_count:1}),confirmContent:t("resources.room_directory.action.content",{smart_count:1}),resource:"room_directory",icon:Object(Te.jsx)(tr.a,{})}))},ir=function(e){return Object(Te.jsx)(K.a,Object(m.a)(Object(m.a)({},e),{},{label:"resources.room_directory.action.erase",mutationMode:"pessimistic",confirmTitle:"resources.room_directory.action.title",confirmContent:"resources.room_directory.action.content",resource:"room_directory",icon:Object(Te.jsx)(tr.a,{})}))},or=function(e){var t=e.selectedIds,r=Object(xe.a)(),s=Object(Ne.a)(),a=Object(we.a)(),n=Object(Se.a)(),i=Object(ve.a)(n,2),o=i[0],c=i[1].loading;return Object(Te.jsx)(G.a,{label:"resources.room_directory.action.create",onClick:function(e){o({type:"createMany",resource:"room_directory",payload:{ids:t,data:{}}},{onSuccess:function(e){e.data;r("resources.room_directory.action.send_success"),a("rooms"),s()},onFailure:function(e){return r("resources.room_directory.action.send_failure","error")}})},disabled:c,children:Object(Te.jsx)(tr.a,{})})},cr=function(e){var t=e.record,r=Object(xe.a)(),s=Object(Ne.a)(),a=Object(ye.a)("room_directory"),n=Object(ve.a)(a,2),i=n[0],o=n[1].loading;return Object(Te.jsx)(G.a,{label:"resources.room_directory.action.create",onClick:function(e){i({payload:{data:{id:t.id}}},{onSuccess:function(e){e.data;r("resources.room_directory.action.send_success"),s()},onFailure:function(e){return r("resources.room_directory.action.send_failure","error")}})},disabled:o,children:Object(Te.jsx)(tr.a,{})})},dr=function(e){return Object(Te.jsx)(s.Fragment,{children:Object(Te.jsx)(ir,Object(m.a)({},e))})},lr=function(e){var t=e.source,r=e.className,s=e.record,a=void 0===s?{}:s;return Object(Te.jsx)(v.a,{src:a[t],className:r})},ur=function(e){var t=Object.assign({},e),r=Object(re.a)();return Object(Te.jsxs)(Z.a,Object(m.a)(Object(m.a)({},t),{},{children:[Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.room_id"),source:"room_id",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.topic"),source:"topic",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.canonical_alias"),source:"canonical_alias",defaultValue:!1,style:{marginBottom:8}})]}))};var mr=Object(At.c)((function(e){return{roomDirectoryFilters:e.admin.resources.room_directory.list.params.displayedFilters}}))((function(e){var t=e.roomDirectoryFilters,r=(e.dispatch,Object(g.a)(e,rr)),s=sr(),a=Object(re.a)(),n=t,i=!(!n||!n.room_id),o=!(!n||!n.topic),c=!(!n||!n.canonical_alias);return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},r),{},{pagination:Object(Te.jsx)(ar,{}),bulkActionButtons:Object(Te.jsx)(dr,{}),filters:Object(Te.jsx)(ur,{}),perPage:100,children:Object(Te.jsxs)($.a,{rowClick:function(e,t,r){return"/rooms/"+e+"/show"},children:[Object(Te.jsx)(lr,{source:"avatar_src",sortable:!1,className:s.small,label:a("resources.rooms.fields.avatar")}),Object(Te.jsx)(Y.a,{source:"name",sortable:!1,label:a("resources.rooms.fields.name")}),i&&Object(Te.jsx)(Y.a,{source:"room_id",sortable:!1,label:a("resources.rooms.fields.room_id")}),c&&Object(Te.jsx)(Y.a,{source:"canonical_alias",sortable:!1,label:a("resources.rooms.fields.canonical_alias")}),o&&Object(Te.jsx)(Y.a,{source:"topic",sortable:!1,label:a("resources.rooms.fields.topic")}),Object(Te.jsx)(fe.a,{source:"num_joined_members",sortable:!1,label:a("resources.rooms.fields.joined_members")}),Object(Te.jsx)(X.a,{source:"world_readable",sortable:!1,label:a("resources.room_directory.fields.world_readable")}),Object(Te.jsx)(X.a,{source:"guest_can_join",sortable:!1,label:a("resources.room_directory.fields.guest_can_join")})]})}))})),jr=["roomFilters","dispatch"],br={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},pr=Object(qe.a)((function(e){return{helper_forward_extremities:{fontFamily:"Roboto, Helvetica, Arial, sans-serif",margin:"0.5em"}}})),_r=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[10,25,50,100,500,1e3]}))},hr=function(e){var t=e.source,r=e.record,s=void 0===r?{}:r,a=e.emptyText,n=Object(re.a)(),i=Vt()(s,t),o=!1===i?"ra.boolean.false":"ra.boolean.true";return!1===i||!0===i?Object(Te.jsx)(Nt.a,{component:"span",variant:"body2",children:Object(Te.jsx)(He.a,{title:n(o,{_:o}),children:!0===i?Object(Te.jsx)(Ut.a,{"data-testid":"true",htmlColor:"limegreen"}):Object(Te.jsx)(Wt.a,{"data-testid":"false",color:"error"})})}):Object(Te.jsx)(Nt.a,{component:"span",variant:"body2",children:a})},Or=function(e){var t=e.record,r=Object(re.a)(),s="";return t&&(s=""!==t.name?t.name:t.id),Object(Te.jsxs)("span",{children:[r("resources.rooms.name",1)," ",s]})},fr=function(e){var t=e.basePath,r=e.data,s=e.resource,a="";return r&&(a=r.public),Object(Te.jsxs)(M.a,{children:[!1===a&&Object(Te.jsx)(cr,{record:r}),!0===a&&Object(Te.jsx)(nr,{record:r}),Object(Te.jsx)(ne.a,{basePath:t,record:r,resource:s,mutationMode:"pessimistic",confirmTitle:"resources.rooms.action.erase.title",confirmContent:"resources.rooms.action.erase.content"})]})},gr=function(e){var t=pr({props:e}),r=Object(re.a)();return Object(Te.jsx)(Ct.a,Object(m.a)(Object(m.a)({},e),{},{actions:Object(Te.jsx)(fr,{}),title:Object(Te.jsx)(Or,{}),children:Object(Te.jsxs)(Et.a,{children:[Object(Te.jsxs)(Rt.a,{label:"synapseadmin.rooms.tabs.basic",icon:Object(Te.jsx)(B.a,{}),children:[Object(Te.jsx)(Y.a,{source:"room_id"}),Object(Te.jsx)(Y.a,{source:"name"}),Object(Te.jsx)(Y.a,{source:"canonical_alias"}),Object(Te.jsx)(he.a,{source:"creator",reference:"users",children:Object(Te.jsx)(Y.a,{source:"id"})})]}),Object(Te.jsxs)(Rt.a,{label:"synapseadmin.rooms.tabs.detail",icon:Object(Te.jsx)(Jt.a,{}),path:"detail",children:[Object(Te.jsx)(Y.a,{source:"joined_members"}),Object(Te.jsx)(Y.a,{source:"joined_local_members"}),Object(Te.jsx)(Y.a,{source:"joined_local_devices"}),Object(Te.jsx)(Y.a,{source:"state_events"}),Object(Te.jsx)(Y.a,{source:"version"}),Object(Te.jsx)(Y.a,{source:"encryption",emptyText:r("resources.rooms.enums.unencrypted")})]}),Object(Te.jsx)(Rt.a,{label:"synapseadmin.rooms.tabs.members",icon:Object(Te.jsx)(Kt.a,{}),children:Object(Te.jsx)(_e.a,{reference:"room_members",target:"room_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},rowClick:function(e,t,r){return"/users/"+e},children:[Object(Te.jsx)(Y.a,{source:"id",sortable:!1,label:"resources.users.fields.id"}),Object(Te.jsx)(he.a,{label:"resources.users.fields.displayname",source:"id",reference:"users",sortable:!1,link:"",children:Object(Te.jsx)(Y.a,{source:"displayname",sortable:!1})})]})})}),Object(Te.jsxs)(Rt.a,{label:"synapseadmin.rooms.tabs.permission",icon:Object(Te.jsx)($t.a,{}),path:"permission",children:[Object(Te.jsx)(X.a,{source:"federatable"}),Object(Te.jsx)(X.a,{source:"public"}),Object(Te.jsx)(Tt.a,{source:"join_rules",choices:[{id:"public",name:"resources.rooms.enums.join_rules.public"},{id:"knock",name:"resources.rooms.enums.join_rules.knock"},{id:"invite",name:"resources.rooms.enums.join_rules.invite"},{id:"private",name:"resources.rooms.enums.join_rules.private"}]}),Object(Te.jsx)(Tt.a,{source:"guest_access",choices:[{id:"can_join",name:"resources.rooms.enums.guest_access.can_join"},{id:"forbidden",name:"resources.rooms.enums.guest_access.forbidden"}]}),Object(Te.jsx)(Tt.a,{source:"history_visibility",choices:[{id:"invited",name:"resources.rooms.enums.history_visibility.invited"},{id:"joined",name:"resources.rooms.enums.history_visibility.joined"},{id:"shared",name:"resources.rooms.enums.history_visibility.shared"},{id:"world_readable",name:"resources.rooms.enums.history_visibility.world_readable"}]})]}),Object(Te.jsx)(Rt.a,{label:r("resources.room_state.name",{smart_count:2}),icon:Object(Te.jsx)(Xt.a,{}),path:"state",children:Object(Te.jsx)(_e.a,{reference:"room_state",target:"room_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"type",sortable:!1}),Object(Te.jsx)(ee.a,{source:"origin_server_ts",showTime:!0,options:br,sortable:!1}),Object(Te.jsx)(Y.a,{source:"content",sortable:!1}),Object(Te.jsx)(he.a,{source:"sender",reference:"users",sortable:!1,children:Object(Te.jsx)(Y.a,{source:"id"})})]})})}),Object(Te.jsxs)(Rt.a,{label:"resources.forward_extremities.name",icon:Object(Te.jsx)(Lt.a,{}),path:"forward_extremities",children:[Object(Te.jsx)("div",{className:t.helper_forward_extremities,children:r("resources.rooms.helper.forward_extremities")}),Object(Te.jsx)(_e.a,{reference:"forward_extremities",target:"room_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"id",sortable:!1}),Object(Te.jsx)(ee.a,{source:"received_ts",showTime:!0,options:br,sortable:!1}),Object(Te.jsx)(fe.a,{source:"depth",sortable:!1}),Object(Te.jsx)(Y.a,{source:"state_group",sortable:!1})]})})]})]})}))},vr=function(e){return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(or,Object(m.a)({},e)),Object(Te.jsx)(ir,Object(m.a)({},e)),Object(Te.jsx)(K.a,Object(m.a)(Object(m.a)({},e),{},{confirmTitle:"resources.rooms.action.erase.title",confirmContent:"resources.rooms.action.erase.content",mutationMode:"pessimistic"}))]})},xr=function(e){var t=Object.assign({},e),r=Object(re.a)();return Object(Te.jsxs)(Z.a,Object(m.a)(Object(m.a)({},t),{},{children:[Object(Te.jsx)(J.a,{source:"search_term",alwaysOn:!0}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.joined_local_members"),source:"joined_local_members",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.state_events"),source:"state_events",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.version"),source:"version",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.federatable"),source:"federatable",defaultValue:!1,style:{marginBottom:8}})]}))},yr=function(e){var t=e.source,r=Object(zt.b)(e);return Object(Te.jsx)("span",{children:r[t]||r.canonical_alias||r.id})};var wr=Object(At.c)((function(e){return{roomFilters:e.admin.resources.rooms.list.params.displayedFilters}}))((function(e){var t=e.roomFilters,r=(e.dispatch,Object(g.a)(e,jr)),s=t,a=!(!s||!s.joined_local_members),n=!(!s||!s.state_events),i=!(!s||!s.version),o=!(!s||!s.federatable);return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},r),{},{pagination:Object(Te.jsx)(_r,{}),sort:{field:"name",order:"ASC"},filters:Object(Te.jsx)(xr,{}),bulkActionButtons:Object(Te.jsx)(vr,{}),children:Object(Te.jsxs)($.a,{rowClick:"show",children:[Object(Te.jsx)(hr,{source:"is_encrypted",sortBy:"encryption",label:Object(Te.jsx)(Ut.a,{})}),Object(Te.jsx)(yr,{source:"name"}),Object(Te.jsx)(Y.a,{source:"joined_members"}),a&&Object(Te.jsx)(Y.a,{source:"joined_local_members"}),n&&Object(Te.jsx)(Y.a,{source:"state_events"}),i&&Object(Te.jsx)(Y.a,{source:"version"}),o&&Object(Te.jsx)(X.a,{source:"federatable"}),Object(Te.jsx)(X.a,{source:"public"})]})}))})),Sr={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},kr=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[10,25,50,100,500,1e3]}))},Ir=function(e){var t=Object(re.a)();return Object(Te.jsx)(Ct.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsxs)(Et.a,{children:[Object(Te.jsxs)(Rt.a,{label:t("synapseadmin.reports.tabs.basic",{smart_count:1}),icon:Object(Te.jsx)(B.a,{}),children:[Object(Te.jsx)(ee.a,{source:"received_ts",showTime:!0,options:Sr,sortable:!0}),Object(Te.jsx)(he.a,{source:"user_id",reference:"users",children:Object(Te.jsx)(Y.a,{source:"id"})}),Object(Te.jsx)(fe.a,{source:"score"}),Object(Te.jsx)(Y.a,{source:"reason"}),Object(Te.jsx)(Y.a,{source:"name"}),Object(Te.jsx)(Y.a,{source:"canonical_alias",label:"resources.rooms.fields.canonical_alias"}),Object(Te.jsx)(he.a,{source:"room_id",reference:"rooms",link:"show",label:"resources.rooms.fields.room_id",children:Object(Te.jsx)(Y.a,{source:"id"})})]}),Object(Te.jsxs)(Rt.a,{label:"synapseadmin.reports.tabs.detail",icon:Object(Te.jsx)(Jt.a,{}),path:"detail",children:[Object(Te.jsx)(ee.a,{source:"event_json.origin_server_ts",showTime:!0,options:Sr,sortable:!0}),Object(Te.jsx)(he.a,{source:"sender",reference:"users",children:Object(Te.jsx)(Y.a,{source:"id"})}),Object(Te.jsx)(Y.a,{source:"event_id"}),Object(Te.jsx)(Y.a,{source:"event_json.origin"}),Object(Te.jsx)(Y.a,{source:"event_json.type"}),Object(Te.jsx)(Y.a,{source:"event_json.content.msgtype"}),Object(Te.jsx)(Y.a,{source:"event_json.content.body"}),Object(Te.jsx)(Y.a,{source:"event_json.content.format"}),Object(Te.jsx)(Y.a,{source:"event_json.content.formatted_body"}),Object(Te.jsx)(Y.a,{source:"event_json.content.algorithm"}),Object(Te.jsx)(Y.a,{source:"event_json.content.device_id",label:"resources.users.fields.device_id"})]})]})}))},Pr=function(e){var t=Object.assign({},e);return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},t),{},{pagination:Object(Te.jsx)(kr,{}),sort:{field:"received_ts",order:"DESC"},bulkActionButtons:!1,children:Object(Te.jsxs)($.a,{rowClick:"show",children:[Object(Te.jsx)(Y.a,{source:"id",sortable:!1}),Object(Te.jsx)(ee.a,{source:"received_ts",showTime:!0,options:Sr,sortable:!0}),Object(Te.jsx)(Y.a,{sortable:!1,source:"user_id"}),Object(Te.jsx)(Y.a,{sortable:!1,source:"name"}),Object(Te.jsx)(Y.a,{sortable:!1,source:"score"})]})}))},Dr=r(756),Ar=r(196),Cr=r(373),Er=r(757),Rr=r(235),Tr=r(28),zr=r(288),Fr=r(744),Vr=r(691),Nr=r(784),Br=r(758),Mr=r(442),Lr=r(679),qr=["meta","input"],Ur=Object(qe.a)((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"calc(100vh - 1em)",alignItems:"center",justifyContent:"flex-start",background:"url(./images/floating-cogs.svg)",backgroundColor:"#f9f9f9",backgroundRepeat:"no-repeat",backgroundSize:"cover"},card:{minWidth:"30em",marginTop:"6em",marginBottom:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},icon:{backgroundColor:e.palette.secondary.main},hint:{marginTop:"1em",display:"flex",justifyContent:"center",color:e.palette.grey[500]},form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},actions:{padding:"0 1em 1em 1em"},serverVersion:{color:"#9e9e9e",fontFamily:"Roboto, Helvetica, Arial, sans-serif",marginBottom:"1em",marginLeft:"0.5em"}}})),Gr=function(e){var t=e.theme,r=Ur({theme:t}),a=Object(Dr.a)(),n=Object(xe.a)(),i=Object(s.useState)(!1),o=Object(ve.a)(i,2),c=o[0],d=o[1],u=Object(s.useState)(!0),j=Object(ve.a)(u,2),b=j[0],p=j[1],_=Object(Ar.a)(),h=Object(Cr.a)(),O=Object(re.a)(),f=localStorage.getItem("base_url"),x=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERSION:""}).REACT_APP_SERVER,y=Object(s.useState)(""),w=Object(ve.a)(y,2),S=w[0],k=w[1],I=/\?loginToken=([a-zA-Z0-9_-]+)/.exec(window.location.href);if(I){var P=I[1];console.log("SSO token is",P),window.history.replaceState({},"",window.location.href.replace(I[0],"#").split("#")[0]);var D=localStorage.getItem("sso_base_url");if(localStorage.removeItem("sso_base_url"),D){var A={base_url:D,username:null,password:null,loginToken:P};console.log("Base URL is:",D),console.log("SSO Token is:",P),console.log("Let's try token login..."),a(A).catch((function(e){alert("string"===typeof e?e:"undefined"!==typeof e&&e.message?e.message:"ra.auth.sign_in_error"),console.error(e)}))}}var C=function(e){var t=e.meta,r=(t=void 0===t?{}:t).touched,s=t.error,a=Object.assign({},e.input),n=Object(g.a)(e,qr);return Object(Te.jsx)(zr.a,Object(m.a)(Object(m.a)(Object(m.a)({error:!(!r||!s),helperText:r&&s},a),n),{},{fullWidth:!0}))},E=function(){localStorage.setItem("sso_base_url",S);var e="".concat(S,"/_matrix/client/r0/login/sso/redirect?redirectUrl=").concat(encodeURIComponent(window.location.href));window.location.href=e},R=function(e){var t=e.formData,a=Object(Tr.e)(),n=Object(s.useState)(""),i=Object(ve.a)(n,2),o=i[0],d=i[1];return Object(s.useEffect)((function(e){if(t.base_url&&t.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+$/)){var r="".concat(t.base_url,"/_synapse/admin/v1/server_version");l.a.fetchJson(r,{method:"GET"}).then((function(e){var t=e.json;d("".concat(O("synapseadmin.auth.server_version")," ").concat(t.server_version))})).catch((function(e){d("")}));var s="".concat(t.base_url,"/_matrix/client/r0/login"),a=!1,n=!1;l.a.fetchJson(s,{method:"GET"}).then((function(e){e.json.flows.forEach((function(e){"m.login.password"===e.type?a=!0:"m.login.sso"===e.type&&(n=!0)})),p(a),k(n?t.base_url:"")})).catch((function(e){k("")}))}}),[t.base_url]),Object(Te.jsxs)("div",{children:[Object(Te.jsx)("div",{className:r.input,children:Object(Te.jsx)(ce.a,{autoFocus:!0,name:"username",component:C,label:O("ra.auth.username"),disabled:c||!b,onBlur:function(e){if(!t.base_url&&!x){var r=function(e){if(!e)return null;var t=e.match(/@[a-zA-Z0-9._=\-/]+:([a-zA-Z0-9\-.]+\.[a-zA-Z]+)/);return t?t[1]:null}(t.username),s="https://".concat(r,"/.well-known/matrix/client");r&&l.a.fetchJson(s,{method:"GET"}).then((function(e){var t=e.json;a.change("base_url",t["m.homeserver"].base_url)})).catch((function(e){a.change("base_url","https://".concat(r))}))}},resettable:!0,fullWidth:!0})}),Object(Te.jsx)("div",{className:r.input,children:Object(Te.jsx)(de.a,{name:"password",component:C,label:O("ra.auth.password"),type:"password",disabled:c||!b,resettable:!0,fullWidth:!0})}),Object(Te.jsx)("div",{className:r.input,children:Object(Te.jsx)(ce.a,{name:"base_url",component:C,label:O("synapseadmin.auth.base_url"),disabled:x||c,resettable:!0,fullWidth:!0})}),Object(Te.jsx)("div",{className:r.serverVersion,children:o})]})};return Object(Te.jsx)(Tr.b,{initialValues:{base_url:x||f},onSubmit:function(e){d(!0),a(e).catch((function(e){d(!1),n("string"===typeof e?e:"undefined"!==typeof e&&e.message?e.message:"ra.auth.sign_in_error","warning")}))},validate:function(e){var t={};return e.username||(t.username=O("ra.validation.required")),e.password||(t.password=O("ra.validation.required")),e.base_url?e.base_url.match(/^(http|https):\/\//)?e.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+(:\d{1,5})?[^?&\s]*$/)||(t.base_url=O("synapseadmin.auth.url_error")):t.base_url=O("synapseadmin.auth.protocol_error"):t.base_url=O("ra.validation.required"),t},render:function(e){var t=e.handleSubmit;return Object(Te.jsx)("form",{onSubmit:t,noValidate:!0,children:Object(Te.jsxs)("div",{className:r.main,children:[Object(Te.jsxs)(Fr.a,{className:r.card,children:[Object(Te.jsx)("div",{className:r.avatar,children:Object(Te.jsx)(v.a,{className:r.icon,children:Object(Te.jsx)(nt.a,{})})}),Object(Te.jsx)("div",{className:r.hint,children:O("synapseadmin.auth.welcome")}),Object(Te.jsxs)("div",{className:r.form,children:[Object(Te.jsx)("div",{className:r.input,children:Object(Te.jsxs)(Vr.a,{value:_,onChange:function(e){h(e.target.value)},fullWidth:!0,disabled:c,children:[Object(Te.jsx)(Nr.a,{value:"de",children:"Deutsch"}),Object(Te.jsx)(Nr.a,{value:"en",children:"English"}),Object(Te.jsx)(Nr.a,{value:"zh",children:"\u7b80\u4f53\u4e2d\u6587"})]})}),Object(Te.jsx)(Er.a,{children:function(e){return Object(Te.jsx)(R,Object(m.a)({},e))}})]}),Object(Te.jsxs)(Br.a,{className:r.actions,children:[Object(Te.jsxs)(Mr.a,{variant:"contained",type:"submit",color:"primary",disabled:c||!b,className:r.button,fullWidth:!0,children:[c&&Object(Te.jsx)(Lr.a,{size:25,thickness:2}),O("ra.auth.sign_in")]}),Object(Te.jsxs)(Mr.a,{variant:"contained",color:"secondary",onClick:E,disabled:c||""===S,className:r.button,fullWidth:!0,children:[c&&Object(Te.jsx)(Lr.a,{size:25,thickness:2}),O("synapseadmin.auth.sso_sign_in")]})]})]}),Object(Te.jsx)(Rr.a,{})]})})}})},Wr=r(433),Zr=r.n(Wr),Jr=r(431),Hr=r.n(Jr),Kr=r(685),Qr=["className","exporter","filters","maxResults"],$r=function(e){var t=e.className,r=(e.exporter,e.filters),a=e.maxResults,n=Object(g.a)(e,Qr),i=Object(Kr.a)(),o=i.currentSort,c=i.resource,d=i.displayedFilters,l=i.filterValues,u=i.showFilter,j=i.total;return Object(Te.jsxs)(M.a,Object(m.a)(Object(m.a)({className:t},Object(L.c)(n)),{},{children:[r&&Object(s.cloneElement)(r,{resource:c,showFilter:u,displayedFilters:d,filterValues:l,context:"button"}),Object(Te.jsx)(lt,{}),Object(Te.jsx)(U.a,{disabled:0===j,resource:c,sort:o,filterValues:l,maxResults:a})]}))},Yr=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[10,25,50,100,500,1e3]}))},Xr=function(e){return Object(Te.jsx)(Z.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsx)(J.a,{source:"search_term",alwaysOn:!0})}))},es=function(e){return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},e),{},{actions:Object(Te.jsx)($r,{}),filters:Object(Te.jsx)(Xr,{}),pagination:Object(Te.jsx)(Yr,{}),sort:{field:"media_length",order:"DESC"},bulkActionButtons:!1,children:Object(Te.jsxs)($.a,{rowClick:function(e,t,r){return"/users/"+e+"/media"},children:[Object(Te.jsx)(Y.a,{source:"user_id",label:"resources.users.fields.id"}),Object(Te.jsx)(Y.a,{source:"displayname",label:"resources.users.fields.displayname"}),Object(Te.jsx)(fe.a,{source:"media_count"}),Object(Te.jsx)(fe.a,{source:"media_length"})]})}))},ts=r(432),rs=r.n(ts),ss=r(75),as=r(419),ns=r(118),is=r(49),os=r.n(is),cs=r(86),ds=r(67),ls=r(286),us=r(761),ms=r(732),js=r(386),bs=r(735),ps=r(775),_s=r(131),hs=r.n(_s),Os=["id","displayname"].sort(),fs=["user_type","guest","admin","deactivated","avatar_url","password"].sort();function gs(e){var t=e.value,r=e.text,s=Object(re.a)();return Object(Te.jsx)("option",{value:t,children:s(r)})}var vs=function(e){var t=Object(s.useState)(null),r=Object(ve.a)(t,2),a=r[0],n=r[1],i=Object(s.useState)(null),o=Object(ve.a)(i,2),c=o[0],d=o[1],l=Object(s.useState)(null),u=Object(ve.a)(l,2),m=u[0],j=u[1],b=Object(s.useState)(!0),p=Object(ve.a)(b,2),_=p[0],h=p[1],O=Object(s.useState)(null),f=Object(ve.a)(O,2),g=f[0],v=f[1],x=Object(s.useState)(null),y=Object(ve.a)(x,2),w=y[0],S=y[1],k=Object(s.useState)(null),I=Object(ve.a)(k,2),P=I[0],D=I[1],A=Object(s.useState)("stop"),C=Object(ve.a)(A,2),E=C[0],R=C[1],T=Object(s.useState)(!0),z=Object(ve.a)(T,2),F=z[0],V=z[1],N=Object(s.useState)("ignore"),B=Object(ve.a)(N,2),M=B[0],L=B[1],q=Object(re.a)(),U=Object(xe.a)(),G=Object(cs.a)(),W=function(){var e=Object(ns.a)(os.a.mark((function e(t){var r,s;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g){e.next=2;break}return e.abrupt("return");case 2:if(n(null),d(null),j(null),S(null),!((r=t.target.files?t.target.files[0]:null).size>1e8)){e.next=12;break}return s=q("import_users.errors.unreasonably_big",{size:(r.size/1048576).toFixed(2)}),U(s),d(s),e.abrupt("return");case 12:e.prev=12,Object(ls.parse)(r,{header:!0,skipEmptyLines:!0,complete:function(e){e.error&&d(e.error),Z(e,{setValues:n,setStats:j,setError:d})}}),e.next=20;break;case 16:return e.prev=16,e.t0=e.catch(12),d(!0),e.abrupt("return",null);case 20:case"end":return e.stop()}}),e,null,[[12,16]])})));return function(t){return e.apply(this,arguments)}}(),Z=function(e,t){var r=e.data,s=e.meta,a=e.errors,n=t.setValues,i=t.setStats,o=t.setError,c=Array.from(Os),d=Array.from(fs);if(s.fields.forEach((function(e){c.includes(e)&&(c=c.filter((function(t){return t!==e}))),d.includes(e)&&(d=d.filter((function(t){return t!==e})))})),0!==c.length)return o(q("import_users.error.required_field",{field:c[0]})),!1;var l={user_types:{default:0},is_guest:0,admin:0,deactivated:0,password:0,avatar_url:0,id:0,total:r.length};return r.forEach((function(e,t){void 0===e.user_type||""===e.user_type?l.user_types.default++:l.user_types[e.user_type]+=1,s.fields.includes("name")&&delete e.name,s.fields.includes("user_type")&&delete e.user_type,s.fields.includes("is_admin")&&(e.admin=e.is_admin,delete e.is_admin),["is_guest","admin","deactivated"].forEach((function(r){"true"===e[r]?(l[r]++,e[r]=!0):("false"!==e[r]&&""!==e[r]&&a.push(q("import_users.error.invalid_value",{field:r,row:t})),e[r]=!1)})),void 0!==e.password&&""!==e.password&&l.password++,void 0!==e.avatar_url&&""!==e.avatar_url&&l.avatar_url++,void 0!==e.id&&""!==e.id&&l.id++})),a.length>0&&o(a),i(l),n(r),!0},J=function(){var e=Object(ns.a)(os.a.mark((function e(t){var r;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g){e.next=3;break}return U("import_users.errors.already_in_progress"),e.abrupt("return");case 3:return e.next=5,H(G,a,E,F,M,_,v,d);case 5:r=e.sent,S(r),D(Object(ls.unparse)(r.skippedRecords)),console.log("Skipped records:"),console.log(P);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=function(){var e=Object(ns.a)(os.a.mark((function e(t,r,s,a,n,i,o,c){var d,l,u,m,j,b,p,_,h;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d=[],l=[],u=[],m={toAdmin:0,toGuest:0,toRegular:0,replacedPassword:0},j=0,b=r.length,e.prev=6,o({done:j,limit:b}),p=Object(as.a)(r),e.prev=9,h=os.a.mark((function e(){var c,l,m,b,p;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=_.value,l={},m={},"ignore"!==n&&void 0!==c.id&&void 0!==c.password&&!1!==a||(m=St(),"ignore"!==n&&void 0!==c.id&&delete m.id,!1!==a&&void 0!==c.password&&""!==c.password&&delete m.password),Object.assign(l,c),Object.assign(l,m),console.log("will check for existence of record "+JSON.stringify(l)),b=0,p=function e(r){return t.getOne("users",{id:r.id}).then(function(){var t=Object(ns.a)(os.a.mark((function t(a){var i,o;return os.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("already existed"),"update"!==n&&"skip"!==s){t.next=5;break}d.push(r),t.next=19;break;case 5:if("stop"!==s){t.next=9;break}throw new Error(q("import_users.error.id_exits",{id:r.id}));case 9:if(i=St(),o=Object.assign({},r,{id:i.id}),!(++b>512)){t.next=17;break}console.warn("retry loop got stuck? pathological situation?"),d.push(r),t.next=19;break;case 17:return t.next=19,e(o);case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var e=Object(ns.a)(os.a.mark((function e(s){return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("OK to create record "+r.id+" ("+r.displayname+")."),i){e.next=4;break}return e.next=4,t.create("users",{data:r});case 4:u.push(r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},e.next=11,p(l);case 11:j++,o({done:j,limit:r.length});case 13:case"end":return e.stop()}}),e)})),p.s();case 12:if((_=p.n()).done){e.next=16;break}return e.delegateYield(h(),"t0",14);case 14:e.next=12;break;case 16:e.next=21;break;case 18:e.prev=18,e.t1=e.catch(9),p.e(e.t1);case 21:return e.prev=21,p.f(),e.finish(21);case 24:o(null),e.next=31;break;case 27:e.prev=27,e.t2=e.catch(6),c(q("import_users.error.at_entry",{entry:j+1,message:e.t2.message})),o(null);case 31:return e.abrupt("return",{skippedRecords:d,erroredRecords:l,succeededRecords:u,totalRecordCount:b,changeStats:m,wasDryRun:i});case 32:case"end":return e.stop()}}),e,null,[[6,27],[9,18,21,24]])})));return function(t,r,s,a,n,i,o,c){return e.apply(this,arguments)}}(),K=function(){var e=Object(ns.a)(os.a.mark((function e(t){var r;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g){e.next=2;break}return e.abrupt("return");case 2:r=t.target.value,R(r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=Object(ns.a)(os.a.mark((function e(t){var r;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g){e.next=2;break}return e.abrupt("return");case 2:r=t.target.value,L(r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=m&&!w&&[Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.importstats.header")}),Object(Te.jsxs)(ms.a,{children:[Object(Te.jsx)("div",{children:q("import_users.cards.importstats.users_total",m.total)}),Object(Te.jsx)("div",{children:q("import_users.cards.importstats.guest_count",m.is_guest)}),Object(Te.jsx)("div",{children:q("import_users.cards.importstats.admin_count",m.admin)})]})]}),Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.ids.header")}),Object(Te.jsxs)(ms.a,{children:[Object(Te.jsx)("div",{children:m.id===m.total?q("import_users.cards.ids.all_ids_present"):q("import_users.cards.ids.count_ids_present",m.id)}),m.id>0?Object(Te.jsx)("div",{children:Object(Te.jsxs)(js.a,{onChange:Q,value:M,enabled:(null!==g).toString(),children:[Object(Te.jsx)(gs,{value:"ignore",text:"import_users.cards.ids.mode.ignore"}),Object(Te.jsx)(gs,{value:"update",text:"import_users.cards.ids.mode.update"})]})}):""]})]}),Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.passwords.header")}),Object(Te.jsxs)(ms.a,{children:[Object(Te.jsx)("div",{children:m.password===m.total?q("import_users.cards.passwords.all_passwords_present"):q("import_users.cards.passwords.count_passwords_present",m.password)}),m.password>0?Object(Te.jsx)("div",{children:Object(Te.jsx)(bs.a,{control:Object(Te.jsx)(ps.a,{checked:F,enabled:(null!==g).toString(),onChange:function(e){null===g&&V(e.target.checked)}}),label:q("import_users.cards.passwords.use_passwords")})}):""]})]})],Y=m&&!w&&Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.conflicts.header")}),Object(Te.jsx)(ms.a,{children:Object(Te.jsx)("div",{children:Object(Te.jsxs)(js.a,{onChange:K,value:E,enabled:(null!==g).toString(),children:[Object(Te.jsx)(gs,{value:"stop",text:"import_users.cards.conflicts.mode.stop"}),Object(Te.jsx)(gs,{value:"skip",text:"import_users.cards.conflicts.mode.skip"})]})})})]}),X=c&&Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.error.error")}),Object(Te.jsx)(ms.a,{children:(Array.isArray(c)?c:[c]).map((function(e){return Object(Te.jsx)("div",{children:e})}))})]}),ee=!w&&Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.upload.header")}),Object(Te.jsxs)(ms.a,{children:[q("import_users.cards.upload.explanation"),Object(Te.jsx)("a",{href:"./data/example.csv",children:"example.csv"}),Object(Te.jsx)("br",{}),Object(Te.jsx)("br",{}),Object(Te.jsx)("input",{type:"file",onChange:W,enabled:(null!==g).toString()})]})]}),te=w&&Object(Te.jsxs)(ms.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.results.header")}),Object(Te.jsxs)("div",{children:[q("import_users.cards.results.total",w.totalRecordCount),Object(Te.jsx)("br",{}),q("import_users.cards.results.successful",w.succeededRecords.length),Object(Te.jsx)("br",{}),w.skippedRecords.length?[q("import_users.cards.results.skipped",w.skippedRecords.length),Object(Te.jsx)("div",{children:Object(Te.jsx)("button",{onClick:function(){var e=document.createElement("a");console.log(P);var t=new Blob([P],{type:"text/comma-separated-values"});e.href=URL.createObjectURL(t),e.download="skippedRecords.csv",document.body.appendChild(e),e.click()},children:q("import_users.cards.results.download_skipped")})}),Object(Te.jsx)("br",{})]:"",w.erroredRecords.length?[q("import_users.cards.results.skipped",w.erroredRecords.length),Object(Te.jsx)("br",{})]:"",Object(Te.jsx)("br",{}),w.wasDryRun&&[q("import_users.cards.results.simulated_only"),Object(Te.jsx)("br",{})]]})]}),se=!a||0===a.length||w?void 0:Object(Te.jsxs)(Br.a,{children:[Object(Te.jsx)(bs.a,{control:Object(Te.jsx)(ps.a,{checked:_,onChange:function(e){null===g&&h(e.target.checked)},enabled:(null!==g).toString()}),label:q("import_users.cards.startImport.simulate_only")}),Object(Te.jsx)(Mr.a,{size:"large",onClick:J,enabled:(null!==g).toString(),children:q("import_users.cards.startImport.run_import")}),null!==g?Object(Te.jsxs)("div",{children:[g.done," of ",g.limit," done"]}):null]}),ae=[];ee&&ae.push(ee),X&&ae.push(X),Y&&ae.push(Y),$&&ae.push.apply(ae,Object(ss.a)($)),se&&ae.push(se),te&&ae.push(te);var ne=Object(Te.jsx)(Fr.a,{children:ae});return[Object(Te.jsx)(ds.b,{defaultTitle:q("import_users.title")}),ne]},xs={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},ys=[Object(te.f)(/^[A-Za-z0-9._~-]{0,64}$/)],ws=[Object(te.e)()],Ss=[Object(te.e)(),Object(te.d)(64)],ks=function(e){var t=new Date(e);return isNaN(t)?0:t.getTime()},Is=function(e){if(void 0!==e&&null!==e){var t=new Date(e),r="00",s=t.getFullYear().toString(),a=(r+(t.getMonth()+1).toString()).slice(-2),n=(r+t.getDate().toString()).slice(-2),i=(r+t.getHours().toString()).slice(-2),o=(r+t.getMinutes().toString()).slice(-2);return"".concat(s,"-").concat(a,"-").concat(n,"T").concat(i,":").concat(o)}},Ps=function(e){return Object(Te.jsx)(Z.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsx)(H.a,{source:"valid",alwaysOn:!0})}))},Ds=function(e){return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},e),{},{filters:Object(Te.jsx)(Ps,{}),filterDefaultValues:{valid:!0},pagination:!1,perPage:500,children:Object(Te.jsxs)($.a,{rowClick:"edit",children:[Object(Te.jsx)(Y.a,{source:"token",sortable:!1}),Object(Te.jsx)(fe.a,{source:"uses_allowed",sortable:!1}),Object(Te.jsx)(fe.a,{source:"pending",sortable:!1}),Object(Te.jsx)(fe.a,{source:"completed",sortable:!1}),Object(Te.jsx)(ee.a,{source:"expiry_time",showTime:!0,options:xs,sortable:!1})]})}))},As=function(e){return Object(Te.jsx)(ie.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsxs)(oe.a,{redirect:"list",toolbar:Object(Te.jsx)(se.a,{alwaysEnableSaveButton:!0}),children:[Object(Te.jsx)(ce.a,{source:"token",autoComplete:"off",validate:ys,resettable:!0}),Object(Te.jsx)(Qe.a,{source:"length",validate:Ss,helperText:"resources.registration_tokens.helper.length",step:1}),Object(Te.jsx)(Qe.a,{source:"uses_allowed",validate:ws,step:1}),Object(Te.jsx)(Ke.a,{source:"expiry_time",parse:ks})]})}))},Cs=function(e){return Object(Te.jsx)(je.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsxs)(oe.a,{children:[Object(Te.jsx)(ce.a,{source:"token",disabled:!0}),Object(Te.jsx)(Qe.a,{source:"pending",disabled:!0}),Object(Te.jsx)(Qe.a,{source:"completed",disabled:!0}),Object(Te.jsx)(Qe.a,{source:"uses_allowed",validate:ws,step:1}),Object(Te.jsx)(Ke.a,{source:"expiry_time",parse:ks,format:Is})]})}))},Es=r(22),Rs=r(95),Ts=r.n(Rs),zs=Object(m.a)(Object(m.a)({},Ts.a),{},{synapseadmin:{auth:{base_url:"Heimserver URL",welcome:"Willkommen bei Synapse-admin",server_version:"Synapse Version",username_error:"Bitte vollst\xe4ndigen Nutzernamen angeben: '@user:domain'",protocol_error:"Die URL muss mit 'http://' oder 'https://' beginnen",url_error:"Keine g\xfcltige Matrix Server URL",sso_sign_in:"Anmeldung mit SSO"},users:{invalid_user_id:"Lokaler Anteil der Matrix Benutzer-ID ohne Homeserver.",tabs:{sso:"SSO"}},rooms:{details:"Raumdetails",tabs:{basic:"Allgemein",members:"Mitglieder",detail:"Details",permission:"Berechtigungen"}},reports:{tabs:{basic:"Allgemein",detail:"Details"}}},import_users:{error:{at_entry:"Bei Eintrag %{entry}: %{message}",error:"Fehler",required_field:"Pflichtfeld '%{field}' fehlt",invalid_value:"Ung\xfcltiger Wert in Zeile %{row}. Feld '%{field}' darf nur die Werte 'true' oder 'false' enthalten",unreasonably_big:"Datei ist zu gro\xdf f\xfcr den Import (%{size} Megabytes)",already_in_progress:"Es l\xe4uft bereits ein Import",id_exits:"ID %{id} existiert bereits"},title:"Benutzer aus CSV importieren",goToPdf:"Gehe zum PDF",cards:{importstats:{header:"Benutzer importieren",users_total:"%{smart_count} Benutzer in der CSV Datei |||| %{smart_count} Benutzer in der CSV Datei",guest_count:"%{smart_count} Gast |||| %{smart_count} G\xe4ste",admin_count:"%{smart_count} Server Administrator |||| %{smart_count} Server Administratoren"},conflicts:{header:"Konfliktstrategie",mode:{stop:"Stoppe bei Fehlern",skip:"Zeige Fehler und \xfcberspringe fehlerhafte Eintr\xe4ge"}},ids:{header:"IDs",all_ids_present:"IDs in jedem Eintrag vorhanden",count_ids_present:"%{smart_count} Eintrag mit ID |||| %{smart_count} Eintr\xe4ge mit IDs",mode:{ignore:"Ignoriere IDs der CSV-Datei und erstelle neue",update:"Aktualisiere existierende Benutzer"}},passwords:{header:"Passw\xf6rter",all_passwords_present:"Passw\xf6rter in jedem Eintrag vorhanden",count_passwords_present:"%{smart_count} Eintrag mit Passwort |||| %{smart_count} Eintr\xe4ge mit Passw\xf6rtern",use_passwords:"Verwende Passw\xf6rter aus der CSV Datei"},upload:{header:"CSV Datei importieren",explanation:"Hier k\xf6nnen Sie eine Datei mit kommagetrennten Daten hochladen, die verwendet werden um Benutzer anzulegen oder zu \xe4ndern. Die Datei muss mindestens die Felder 'id' und 'displayname' enthalten. Hier k\xf6nnen Sie eine Beispieldatei herunterladen und anpassen: "},startImport:{simulate_only:"Nur simulieren",run_import:"Importieren"},results:{header:"Ergebnis",total:"%{smart_count} Eintrag insgesamt |||| %{smart_count} Eintr\xe4ge insgesamt",successful:"%{smart_count} Eintr\xe4ge erfolgreich importiert",skipped:"%{smart_count} Eintr\xe4ge \xfcbersprungen",download_skipped:"\xdcbersprungene Eintr\xe4ge herunterladen",with_error:"%{smart_count} Eintrag mit Fehlern ||| %{smart_count} Eintr\xe4ge mit Fehlern",simulated_only:"Import-Vorgang war nur simuliert"}}},resources:{users:{name:"Benutzer",email:"E-Mail",msisdn:"Telefon",threepid:"E-Mail / Telefon",fields:{avatar:"Avatar",id:"Benutzer-ID",name:"Name",is_guest:"Gast",admin:"Server Administrator",deactivated:"Deaktiviert",guests:"Zeige G\xe4ste",show_deactivated:"Zeige deaktivierte Benutzer",user_id:"Suche Benutzer",displayname:"Anzeigename",password:"Passwort",avatar_url:"Avatar URL",avatar_src:"Avatar",medium:"Medium",threepids:"3PIDs",address:"Adresse",creation_ts_ms:"Zeitpunkt der Erstellung",consent_version:"Zugestimmte Gesch\xe4ftsbedingungen",auth_provider:"Provider"},helper:{deactivate:"Sie m\xfcssen ein Passwort angeben, um ein Konto wieder zu aktivieren.",erase:"DSGVO konformes L\xf6schen der Benutzerdaten"},action:{erase:"L\xf6sche Benutzerdaten"}},rooms:{name:"Raum |||| R\xe4ume",fields:{room_id:"Raum-ID",name:"Name",canonical_alias:"Alias",joined_members:"Mitglieder",joined_local_members:"Lokale Mitglieder",joined_local_devices:"Lokale Endger\xe4te",state_events:"Zustandsereignisse / Komplexit\xe4t",version:"Version",is_encrypted:"Verschl\xfcsselt",encryption:"Verschl\xfcsselungs-Algorithmus",federatable:"F\xf6\xadde\xadrierbar",public:"Sichtbar im Raumverzeichnis",creator:"Ersteller",join_rules:"Beitrittsregeln",guest_access:"Gastzugriff",history_visibility:"Historie-Sichtbarkeit",topic:"Thema",avatar:"Avatar"},helper:{forward_extremities:"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."},enums:{join_rules:{public:"\xd6ffentlich",knock:"Auf Anfrage",invite:"Nur auf Einladung",private:"Privat"},guest_access:{can_join:"G\xe4ste k\xf6nnen beitreten",forbidden:"G\xe4ste k\xf6nnen nicht beitreten"},history_visibility:{invited:"Ab Einladung",joined:"Ab Beitritt",shared:"Ab Setzen der Einstellung",world_readable:"Jeder"},unencrypted:"Nicht verschl\xfcsselt"},action:{erase:{title:"Raum l\xf6schen",content:"Sind Sie sicher dass Sie den Raum l\xf6schen m\xf6chten? Diese Aktion kann nicht r\xfcckg\xe4ngig gemacht werden. Alle Nachrichten und Medien, die der Raum beinhaltet werden vom Server gel\xf6scht!"}}},reports:{name:"Ereignisbericht |||| Ereignisberichte",fields:{id:"ID",received_ts:"Meldezeit",user_id:"Meldender",name:"Raumname",score:"Wert",reason:"Grund",event_id:"Event-ID",event_json:{origin:"Ursprungsserver",origin_server_ts:"Sendezeit",type:"Eventtyp",content:{msgtype:"Inhaltstyp",body:"Nachrichteninhalt",format:"Nachrichtenformat",formatted_body:"Formatierter Nachrichteninhalt",algorithm:"Verschl\xfcsselungsalgorithmus"}}}},connections:{name:"Verbindungen",fields:{last_seen:"Datum",ip:"IP-Adresse",user_agent:"User Agent"}},devices:{name:"Ger\xe4t |||| Ger\xe4te",fields:{device_id:"Ger\xe4te-ID",display_name:"Ger\xe4tename",last_seen_ts:"Zeitstempel",last_seen_ip:"IP-Adresse"},action:{erase:{title:"Entferne %{id}",content:'M\xf6chten Sie das Ger\xe4t "%{name}" wirklich entfernen?',success:"Ger\xe4t erfolgreich entfernt.",failure:"Beim Entfernen ist ein Fehler aufgetreten."}}},users_media:{name:"Medien",fields:{media_id:"Medien ID",media_length:"Gr\xf6\xdfe",media_type:"Typ",upload_name:"Dateiname",quarantined_by:"Zur Quarant\xe4ne hinzugef\xfcgt",safe_from_quarantine:"Schutz vor Quarant\xe4ne",created_ts:"Erstellt",last_access_ts:"Letzter Zugriff"}},delete_media:{name:"Medien",fields:{before_ts:"Letzter Zugriff vor",size_gt:"Gr\xf6\xdfer als (in Bytes)",keep_profiles:"Behalte Profilbilder"},action:{send:"Medien l\xf6schen",send_success:"Anfrage erfolgreich versendet.",send_failure:"Beim Versenden ist ein Fehler aufgetreten."},helper:{send:"Diese API l\xf6scht 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."}},protect_media:{action:{create:"Ungesch\xfctzt, Schutz erstellen",delete:"Gesch\xfctzt, Schutz aufheben",none:"In Quarant\xe4ne",send_success:"Erfolgreich den Schutz-Status ge\xe4ndert.",send_failure:"Beim Versenden ist ein Fehler aufgetreten."}},quarantine_media:{action:{name:"Quarant\xe4ne",create:"Zur Quarant\xe4ne hinzuf\xfcgen",delete:"In Quarant\xe4ne, Quarant\xe4ne aufheben",none:"Gesch\xfctzt vor Quarant\xe4ne",send_success:"Erfolgreich den Quarant\xe4ne-Status ge\xe4ndert.",send_failure:"Beim Versenden ist ein Fehler aufgetreten."}},pushers:{name:"Pusher |||| Pushers",fields:{app:"App",app_display_name:"App-Anzeigename",app_id:"App ID",device_display_name:"Ger\xe4te-Anzeigename",kind:"Art",lang:"Sprache",profile_tag:"Profil-Tag",pushkey:"Pushkey",data:{url:"URL"}}},servernotices:{name:"Serverbenachrichtigungen",send:"Servernachricht versenden",fields:{body:"Nachricht"},action:{send:"Sende Nachricht",send_success:"Nachricht erfolgreich versendet.",send_failure:"Beim Versenden ist ein Fehler aufgetreten."},helper:{send:'Sendet eine Serverbenachrichtigung an die ausgew\xe4hlten Nutzer. Hierf\xfcr muss das Feature "Server Notices" auf dem Server aktiviert sein.'}},user_media_statistics:{name:"Dateien je Benutzer",fields:{media_count:"Anzahl der Dateien",media_length:"Gr\xf6\xdfe der Dateien"}},forward_extremities:{name:"Vorderextremit\xe4ten",fields:{id:"Event-ID",received_ts:"Zeitstempel",depth:"Tiefe",state_group:"Zustandsgruppe"}},room_state:{name:"Zustandsereignisse",fields:{type:"Typ",content:"Inhalt",origin_server_ts:"Sendezeit",sender:"Absender"}},room_directory:{name:"Raumverzeichnis",fields:{world_readable:"Gastbenutzer d\xfcrfen ohne Beitritt lesen",guest_can_join:"Gastbenutzer d\xfcrfen beitreten"},action:{title:"Raum aus Verzeichnis l\xf6schen |||| %{smart_count} R\xe4ume aus Verzeichnis l\xf6schen",content:"M\xf6chten Sie den Raum wirklich aus dem Raumverzeichnis l\xf6schen? |||| M\xf6chten Sie die %{smart_count} R\xe4ume wirklich aus dem Raumverzeichnis l\xf6schen?",erase:"L\xf6sche aus Verzeichnis",create:"Eintragen ins Verzeichnis",send_success:"Raum erfolgreich eingetragen.",send_failure:"Beim Entfernen ist ein Fehler aufgetreten."}},registration_tokens:{name:"Registrierungstoken",fields:{token:"Token",valid:"G\xfcltige Token",uses_allowed:"Anzahl",pending:"Ausstehend",completed:"Abgeschlossen",expiry_time:"Ablaufzeit",length:"L\xe4nge"},helper:{length:"L\xe4nge des Tokens, wenn kein Token vorgegeben wird."}}},ra:Object(m.a)(Object(m.a)({},Ts.a.ra),{},{action:Object(m.a)(Object(m.a)({},Ts.a.ra.action),{},{unselect:"Abw\xe4hlen"}),auth:Object(m.a)(Object(m.a)({},Ts.a.ra.auth),{},{auth_check_error:"Anmeldung fehlgeschlagen"}),input:Object(m.a)(Object(m.a)({},Ts.a.ra.input),{},{password:Object(m.a)(Object(m.a)({},Ts.a.ra.input.password),{},{toggle_hidden:"Anzeigen",toggle_visible:"Verstecken"})}),notification:Object(m.a)(Object(m.a)({},Ts.a.ra.notification),{},{logged_out:"Abgemeldet"}),page:Object(m.a)(Object(m.a)({},Ts.a.ra.page),{},{empty:"Keine Eintr\xe4ge vorhanden",invite:""}),navigation:Object(m.a)(Object(m.a)({},Ts.a.ra.navigation),{},{skip_nav:"Zum Inhalt springen"})})}),Fs=r(231),Vs=Object(m.a)(Object(m.a)({},Fs.a),{},{synapseadmin:{auth:{base_url:"Homeserver URL",welcome:"Welcome to Synapse-admin",server_version:"Synapse version",username_error:"Please enter fully qualified user ID: '@user:domain'",protocol_error:"URL has to start with 'http://' or 'https://'",url_error:"Not a valid Matrix server URL",sso_sign_in:"Sign in with SSO"},users:{invalid_user_id:"Localpart of a Matrix user-id without homeserver.",tabs:{sso:"SSO"}},rooms:{tabs:{basic:"Basic",members:"Members",detail:"Details",permission:"Permissions"}},reports:{tabs:{basic:"Basic",detail:"Details"}}},import_users:{error:{at_entry:"At entry %{entry}: %{message}",error:"Error",required_field:"Required field '%{field}' is not present",invalid_value:"Invalid value on line %{row}. '%{field}' field may only be 'true' or 'false'",unreasonably_big:"Refused to load unreasonably big file of %{size} megabytes",already_in_progress:"An import run is already in progress",id_exits:"ID %{id} already present"},title:"Import users via CSV",goToPdf:"Go to PDF",cards:{importstats:{header:"Import users",users_total:"%{smart_count} user in CSV file |||| %{smart_count} users in CSV file",guest_count:"%{smart_count} guest |||| %{smart_count} guests",admin_count:"%{smart_count} admin |||| %{smart_count} admins"},conflicts:{header:"Conflict strategy",mode:{stop:"Stop on conflict",skip:"Show error and skip on conflict"}},ids:{header:"IDs",all_ids_present:"IDs present on every entry",count_ids_present:"%{smart_count} entry with ID |||| %{smart_count} entries with IDs",mode:{ignore:"Ignore IDs in CSV and create new ones",update:"Update existing records"}},passwords:{header:"Passwords",all_passwords_present:"Passwords present on every entry",count_passwords_present:"%{smart_count} entry with password |||| %{smart_count} entries with passwords",use_passwords:"Use passwords from CSV"},upload:{header:"Input CSV file",explanation:"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: "},startImport:{simulate_only:"Simulate only",run_import:"Import"},results:{header:"Import results",total:"%{smart_count} entry in total |||| %{smart_count} entries in total",successful:"%{smart_count} entries successfully imported",skipped:"%{smart_count} entries skipped",download_skipped:"Download skipped records",with_error:"%{smart_count} entry with errors ||| %{smart_count} entries with errors",simulated_only:"Run was only simulated"}}},resources:{users:{name:"User |||| Users",email:"Email",msisdn:"Phone",threepid:"Email / Phone",fields:{avatar:"Avatar",id:"User-ID",name:"Name",is_guest:"Guest",admin:"Server Administrator",deactivated:"Deactivated",guests:"Show guests",show_deactivated:"Show deactivated users",user_id:"Search user",displayname:"Displayname",password:"Password",avatar_url:"Avatar URL",avatar_src:"Avatar",medium:"Medium",threepids:"3PIDs",address:"Address",creation_ts_ms:"Creation timestamp",consent_version:"Consent version",auth_provider:"Provider"},helper:{deactivate:"You must provide a password to re-activate an account.",erase:"Mark the user as GDPR-erased"},action:{erase:"Erase user data"}},rooms:{name:"Room |||| Rooms",fields:{room_id:"Room-ID",name:"Name",canonical_alias:"Alias",joined_members:"Members",joined_local_members:"Local members",joined_local_devices:"Local devices",state_events:"State events / Complexity",version:"Version",is_encrypted:"Encrypted",encryption:"Encryption",federatable:"Federatable",public:"Visible in room directory",creator:"Creator",join_rules:"Join rules",guest_access:"Guest access",history_visibility:"History visibility",topic:"Topic",avatar:"Avatar"},helper:{forward_extremities:"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."},enums:{join_rules:{public:"Public",knock:"Knock",invite:"Invite",private:"Private"},guest_access:{can_join:"Guests can join",forbidden:"Guests can not join"},history_visibility:{invited:"Since invited",joined:"Since joined",shared:"Since shared",world_readable:"Anyone"},unencrypted:"Unencrypted"},action:{erase:{title:"Delete room",content:"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!"}}},reports:{name:"Reported event |||| Reported events",fields:{id:"ID",received_ts:"report time",user_id:"announcer",name:"name of the room",score:"score",reason:"reason",event_id:"event ID",event_json:{origin:"origin server",origin_server_ts:"time of send",type:"event typ",content:{msgtype:"content type",body:"content",format:"format",formatted_body:"formatted content",algorithm:"algorithm"}}}},connections:{name:"Connections",fields:{last_seen:"Date",ip:"IP address",user_agent:"User agent"}},devices:{name:"Device |||| Devices",fields:{device_id:"Device-ID",display_name:"Device name",last_seen_ts:"Timestamp",last_seen_ip:"IP address"},action:{erase:{title:"Removing %{id}",content:'Are you sure you want to remove the device "%{name}"?',success:"Device successfully removed.",failure:"An error has occurred."}}},users_media:{name:"Media",fields:{media_id:"Media ID",media_length:"File Size (in Bytes)",media_type:"Type",upload_name:"File name",quarantined_by:"Quarantined by",safe_from_quarantine:"Safe from quarantine",created_ts:"Created",last_access_ts:"Last access"}},delete_media:{name:"Media",fields:{before_ts:"last access before",size_gt:"Larger then (in bytes)",keep_profiles:"Keep profile images"},action:{send:"Delete media",send_success:"Request successfully sent.",send_failure:"An error has occurred."},helper:{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."}},protect_media:{action:{create:"Unprotected, create protection",delete:"Protected, remove protection",none:"In quarantine",send_success:"Successfully changed the protection status.",send_failure:"An error has occurred."}},quarantine_media:{action:{name:"Quarantine",create:"Add to quarantine",delete:"In quarantine, unquarantine",none:"Protected from quarantine",send_success:"Successfully changed the quarantine status.",send_failure:"An error has occurred."}},pushers:{name:"Pusher |||| Pushers",fields:{app:"App",app_display_name:"App display name",app_id:"App ID",device_display_name:"Device display name",kind:"Kind",lang:"Language",profile_tag:"Profile tag",pushkey:"Pushkey",data:{url:"URL"}}},servernotices:{name:"Server Notices",send:"Send server notices",fields:{body:"Message"},action:{send:"Send note",send_success:"Server notice successfully sent.",send_failure:"An error has occurred."},helper:{send:'Sends a server notice to the selected users. The feature "Server Notices" has to be activated at the server.'}},user_media_statistics:{name:"Users' media",fields:{media_count:"Media count",media_length:"Media length"}},forward_extremities:{name:"Forward Extremities",fields:{id:"Event ID",received_ts:"Timestamp",depth:"Depth",state_group:"State group"}},room_state:{name:"State events",fields:{type:"Type",content:"Content",origin_server_ts:"time of send",sender:"Sender"}},room_directory:{name:"Room directory",fields:{world_readable:"guest users may view without joining",guest_can_join:"guest users may join"},action:{title:"Delete room from directory |||| Delete %{smart_count} rooms from directory",content:"Are you sure you want to remove this room from directory? |||| Are you sure you want to remove these %{smart_count} rooms from directory",erase:"Delete from room directory",create:"Publish in room directory",send_success:"Room successfully published.",send_failure:"An error has occurred."}}},registration_tokens:{name:"Registration tokens",fields:{token:"Token",valid:"Valid token",uses_allowed:"Uses allowed",pending:"Pending",completed:"Completed",expiry_time:"Expiry time",length:"Length"},helper:{length:"Length of the token if no token is given."}}}),Ns=r(420),Bs=r.n(Ns),Ms={de:zs,en:Vs,zh:Object(m.a)(Object(m.a)({},Bs.a),{},{synapseadmin:{auth:{base_url:"\u670d\u52a1\u5668 URL",welcome:"\u6b22\u8fce\u6765\u5230 Synapse-admin",server_version:"Synapse \u7248\u672c",username_error:"\u8bf7\u8f93\u5165\u5b8c\u6574\u6709\u6548\u7684\u7528\u6237 ID: '@user:domain'",protocol_error:"URL \u9700\u8981\u4ee5'http://'\u6216'https://'\u4f5c\u4e3a\u8d77\u59cb",url_error:"\u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u7684 Matrix \u670d\u52a1\u5668\u5730\u5740",sso_sign_in:"\u4f7f\u7528 SSO \u767b\u5f55"},users:{invalid_user_id:"\u5fc5\u987b\u8981\u662f\u4e00\u4e2a\u6709\u6548\u7684 Matrix \u7528\u6237 ID \uff0c\u4f8b\u5982 @user_id:homeserver",tabs:{sso:"SSO"}},rooms:{tabs:{basic:"\u57fa\u672c",members:"\u6210\u5458",detail:"\u7ec6\u8282",permission:"\u6743\u9650"},delete:{title:"\u5220\u9664\u623f\u95f4",message:"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u8fd9\u4e2a\u623f\u95f4\u5417\uff1f\u8be5\u64cd\u4f5c\u65e0\u6cd5\u88ab\u64a4\u9500\u3002\u8fd9\u4e2a\u623f\u95f4\u91cc\u6240\u6709\u7684\u6d88\u606f\u548c\u5206\u4eab\u7684\u5a92\u4f53\u90fd\u5c06\u88ab\u4ece\u670d\u52a1\u5668\u4e0a\u5220\u9664\uff01"}},reports:{tabs:{basic:"\u57fa\u672c",detail:"\u7ec6\u8282"}}},import_users:{error:{at_entry:"\u5728\u6761\u76ee %{entry}: %{message}",error:"\u9519\u8bef",required_field:"\u9700\u8981\u7684\u503c '%{field}' \u672a\u88ab\u8bbe\u7f6e\u3002",invalid_value:"\u7b2c %{row} \u884c\u51fa\u73b0\u65e0\u6548\u503c\u3002 '%{field}' \u53ea\u53ef\u4ee5\u662f 'true' \u6216 'false'\u3002",unreasonably_big:"\u62d2\u7edd\u52a0\u8f7d\u8fc7\u5927\u7684\u6587\u4ef6\uff1a %{size} MB",already_in_progress:"\u4e00\u4e2a\u5bfc\u5165\u8fdb\u7a0b\u5df2\u7ecf\u5728\u8fd0\u884c\u4e2d",id_exits:"ID %{id} \u5df2\u7ecf\u5b58\u5728"},title:"\u901a\u8fc7 CSV \u5bfc\u5165\u7528\u6237",goToPdf:"\u8f6c\u5230 PDF",cards:{importstats:{header:"\u5bfc\u5165\u7528\u6237",users_total:"%{smart_count} \u7528\u6237\u5728 CSV \u6587\u4ef6\u4e2d |||| %{smart_count} \u7528\u6237\u5728 CSV \u6587\u4ef6\u4e2d",guest_count:"%{smart_count} \u8bbf\u5ba2 |||| %{smart_count} \u8bbf\u5ba2",admin_count:"%{smart_count} \u7ba1\u7406\u5458 |||| %{smart_count} \u7ba1\u7406\u5458"},conflicts:{header:"\u51b2\u7a81\u5904\u7406\u7b56\u7565",mode:{stop:"\u5728\u51b2\u7a81\u5904\u505c\u6b62",skip:"\u663e\u793a\u9519\u8bef\u5e76\u8df3\u8fc7\u51b2\u7a81"}},ids:{header:"IDs",all_ids_present:"\u6bcf\u6761\u8bb0\u5f55\u7684 ID",count_ids_present:"%{smart_count} \u4e2a\u542b ID \u7684\u8bb0\u5f55 |||| %{smart_count} \u4e2a\u542b ID \u7684\u8bb0\u5f55",mode:{ignore:"\u5ffd\u7565 CSV \u4e2d\u7684 ID \u5e76\u521b\u5efa\u65b0\u7684",update:"\u66f4\u65b0\u5df2\u7ecf\u5b58\u5728\u7684\u8bb0\u5f55"}},passwords:{header:"\u5bc6\u7801",all_passwords_present:"\u6bcf\u6761\u8bb0\u5f55\u7684\u5bc6\u7801",count_passwords_present:"%{smart_count} \u4e2a\u542b\u5bc6\u7801\u7684\u8bb0\u5f55 |||| %{smart_count} \u4e2a\u542b\u5bc6\u7801\u7684\u8bb0\u5f55",use_passwords:"\u4f7f\u7528 CSV \u4e2d\u6807\u8bb0\u7684\u5bc6\u7801"},upload:{header:"\u5bfc\u5165 CSV \u6587\u4ef6",explanation:"\u5728\u8fd9\u91cc\uff0c\u4f60\u53ef\u4ee5\u4e0a\u4f20\u4e00\u4e2a\u7528\u9017\u53f7\u5206\u9694\u7684\u6587\u4ef6\uff0c\u7528\u4e8e\u521b\u5efa\u6216\u66f4\u65b0\u7528\u6237\u3002\u8be5\u6587\u4ef6\u5fc5\u987b\u5305\u62ec 'id' \u548c 'displayname' \u5b57\u6bb5\u3002\u4f60\u53ef\u4ee5\u5728\u8fd9\u91cc\u4e0b\u8f7d\u5e76\u4fee\u6539\u4e00\u4e2a\u793a\u4f8b\u6587\u4ef6\uff1a"},startImport:{simulate_only:"\u6a21\u62df\u6a21\u5f0f",run_import:"\u5bfc\u5165"},results:{header:"\u5bfc\u5165\u7ed3\u679c",total:"\u5171\u8ba1 %{smart_count} \u6761\u8bb0\u5f55 |||| \u5171\u8ba1 %{smart_count} \u6761\u8bb0\u5f55",successful:"%{smart_count} \u6761\u8bb0\u5f55\u5bfc\u5165\u6210\u529f",skipped:"\u8df3\u8fc7 %{smart_count} \u6761\u8bb0\u5f55",download_skipped:"\u4e0b\u8f7d\u8df3\u8fc7\u7684\u8bb0\u5f55",with_error:"%{smart_count} \u6761\u8bb0\u5f55\u51fa\u73b0\u9519\u8bef ||| %{smart_count} \u6761\u8bb0\u5f55\u51fa\u73b0\u9519\u8bef",simulated_only:"\u53ea\u662f\u4e00\u6b21\u6a21\u62df\u8fd0\u884c"}}},resources:{users:{name:"\u7528\u6237",email:"\u90ae\u7bb1",msisdn:"\u7535\u8bdd",threepid:"\u90ae\u7bb1 / \u7535\u8bdd",fields:{avatar:"\u90ae\u7bb1",id:"\u7528\u6237 ID",name:"\u7528\u6237\u540d",is_guest:"\u8bbf\u5ba2",admin:"\u670d\u52a1\u5668\u7ba1\u7406\u5458",deactivated:"\u88ab\u7981\u7528",guests:"\u663e\u793a\u8bbf\u5ba2",show_deactivated:"\u663e\u793a\u88ab\u7981\u7528\u7684\u8d26\u6237",user_id:"\u641c\u7d22\u7528\u6237",displayname:"\u663e\u793a\u540d\u5b57",password:"\u5bc6\u7801",avatar_url:"\u5934\u50cf URL",avatar_src:"\u5934\u50cf",medium:"Medium",threepids:"3PIDs",address:"\u5730\u5740",creation_ts_ms:"\u521b\u5efa\u65f6\u95f4\u6233",consent_version:"\u534f\u8bae\u7248\u672c"},helper:{deactivate:"\u60a8\u5fc5\u987b\u63d0\u4f9b\u4e00\u4e32\u5bc6\u7801\u6765\u6fc0\u6d3b\u8d26\u6237\u3002",erase:"\u5c06\u7528\u6237\u6807\u8bb0\u4e3a\u6839\u636e GDPR \u7684\u8981\u6c42\u62b9\u9664\u4e86"},action:{erase:"\u62b9\u9664\u7528\u6237\u4fe1\u606f"}},rooms:{name:"\u623f\u95f4",fields:{room_id:"\u623f\u95f4 ID",name:"\u623f\u95f4\u540d",canonical_alias:"\u522b\u540d",joined_members:"\u6210\u5458",joined_local_members:"\u672c\u5730\u6210\u5458",state_events:"\u72b6\u6001\u4e8b\u4ef6",version:"\u7248\u672c",is_encrypted:"\u5df2\u7ecf\u52a0\u5bc6",encryption:"\u52a0\u5bc6",federatable:"\u53ef\u8054\u5408\u7684",public:"\u516c\u5f00",creator:"\u521b\u5efa\u8005",join_rules:"\u52a0\u5165\u89c4\u5219",guest_access:"\u8bbf\u5ba2\u8bbf\u95ee",history_visibility:"\u5386\u53f2\u53ef\u89c1\u6027"},enums:{join_rules:{public:"\u516c\u5f00",knock:"\u7533\u8bf7",invite:"\u9080\u8bf7",private:"\u79c1\u6709"},guest_access:{can_join:"\u8bbf\u5ba2\u53ef\u4ee5\u52a0\u5165",forbidden:"\u8bbf\u5ba2\u4e0d\u53ef\u52a0\u5165"},history_visibility:{invited:"\u81ea\u4ece\u88ab\u9080\u8bf7",joined:"\u81ea\u4ece\u52a0\u5165",shared:"\u81ea\u4ece\u5206\u4eab",world_readable:"\u4efb\u4f55\u4eba"},unencrypted:"\u672a\u52a0\u5bc6"}},reports:{name:"\u62a5\u544a\u4e8b\u4ef6",fields:{id:"ID",received_ts:"\u62a5\u544a\u65f6\u95f4",user_id:"\u62a5\u544a\u8005",name:"\u623f\u95f4\u540d",score:"\u5206\u6570",reason:"\u539f\u56e0",event_id:"\u4e8b\u4ef6 ID",event_json:{origin:"\u539f\u59cb\u670d\u52a1\u5668",origin_server_ts:"\u53d1\u9001\u65f6\u95f4",type:"\u4e8b\u4ef6\u7c7b\u578b",content:{msgtype:"\u5185\u5bb9\u7c7b\u578b",body:"\u5185\u5bb9",format:"\u683c\u5f0f",formatted_body:"\u683c\u5f0f\u5316\u7684\u6570\u636e",algorithm:"\u7b97\u6cd5"}}}},connections:{name:"\u8fde\u63a5",fields:{last_seen:"\u65e5\u671f",ip:"IP \u5730\u5740",user_agent:"\u7528\u6237\u4ee3\u7406 (UA)"}},devices:{name:"\u8bbe\u5907",fields:{device_id:"\u8bbe\u5907 ID",display_name:"\u8bbe\u5907\u540d",last_seen_ts:"\u65f6\u95f4\u6233",last_seen_ip:"IP \u5730\u5740"},action:{erase:{title:"\u79fb\u9664 %{id}",content:'\u60a8\u786e\u5b9a\u8981\u79fb\u9664\u8bbe\u5907 "%{name}"?',success:"\u8bbe\u5907\u79fb\u9664\u6210\u529f\u3002",failure:"\u51fa\u73b0\u4e86\u4e00\u4e2a\u9519\u8bef\u3002"}}},users_media:{name:"\u5a92\u4f53\u6587\u4ef6",fields:{media_id:"\u5a92\u4f53\u6587\u4ef6 ID",media_length:"\u957f\u5ea6",media_type:"\u7c7b\u578b",upload_name:"\u6587\u4ef6\u540d",quarantined_by:"\u88ab\u9694\u79bb",safe_from_quarantine:"\u53d6\u6d88\u9694\u79bb",created_ts:"\u521b\u5efa",last_access_ts:"\u4e0a\u4e00\u6b21\u8bbf\u95ee"}},delete_media:{name:"\u5a92\u4f53\u6587\u4ef6",fields:{before_ts:"\u6700\u540e\u8bbf\u95ee\u65f6\u95f4",size_gt:"\u5927\u4e8e (\u5b57\u8282)",keep_profiles:"\u4fdd\u7559\u5934\u50cf"},action:{send:"\u5220\u9664\u5a92\u4f53",send_success:"\u8bf7\u6c42\u53d1\u9001\u6210\u529f\u3002",send_failure:"\u51fa\u73b0\u4e86\u4e00\u4e2a\u9519\u8bef\u3002"},helper:{send:"\u8fd9\u4e2aAPI\u4f1a\u5220\u9664\u60a8\u786c\u76d8\u4e0a\u7684\u672c\u5730\u5a92\u4f53\u3002\u5305\u542b\u4e86\u4efb\u4f55\u7684\u672c\u5730\u7f13\u5b58\u548c\u4e0b\u8f7d\u7684\u5a92\u4f53\u5907\u4efd\u3002\u8fd9\u4e2aAPI\u4e0d\u4f1a\u5f71\u54cd\u4e0a\u4f20\u5230\u5916\u90e8\u5a92\u4f53\u5b58\u50a8\u5e93\u4e0a\u7684\u5a92\u4f53\u6587\u4ef6\u3002"}},pushers:{name:"\u53d1\u5e03\u8005",fields:{app:"App",app_display_name:"App \u540d\u79f0",app_id:"App ID",device_display_name:"\u8bbe\u5907\u663e\u793a\u540d",kind:"\u7c7b\u578b",lang:"\u8bed\u8a00",profile_tag:"\u6570\u636e\u6807\u7b7e",pushkey:"Pushkey",data:{url:"URL"}}},servernotices:{name:"\u670d\u52a1\u5668\u63d0\u793a",send:"\u53d1\u9001\u670d\u52a1\u5668\u63d0\u793a",fields:{body:"\u4fe1\u606f"},action:{send:"\u53d1\u9001\u63d0\u793a",send_success:"\u670d\u52a1\u5668\u63d0\u793a\u53d1\u9001\u6210\u529f\u3002",send_failure:"\u51fa\u73b0\u4e86\u4e00\u4e2a\u9519\u8bef\u3002"},helper:{send:'\u5411\u9009\u4e2d\u7684\u7528\u6237\u53d1\u9001\u670d\u52a1\u5668\u63d0\u793a\u3002\u670d\u52a1\u5668\u914d\u7f6e\u4e2d\u7684 "\u670d\u52a1\u5668\u63d0\u793a(Server Notices)" \u9009\u9879\u9700\u8981\u88ab\u8bbe\u7f6e\u4e3a\u542f\u7528\u3002'}},user_media_statistics:{name:"\u7528\u6237\u7684\u5a92\u4f53\u6587\u4ef6",fields:{media_count:"\u5a92\u4f53\u6587\u4ef6\u7edf\u8ba1",media_length:"\u5a92\u4f53\u6587\u4ef6\u957f\u5ea6"}}}})},Ls=Object(d.a)((function(e){return Ms[e]?Ms[e]:Ms.en}),Object(i.a)()),qs=function(){return Object(Te.jsxs)(o.a,{disableTelemetry:!0,loginPage:Gr,authProvider:u,dataProvider:f,i18nProvider:Ls,customRoutes:[Object(Te.jsx)(Es.b,{path:"/import_users",component:vs},"userImport")],children:[Object(Te.jsx)(c.a,{name:"users",list:xt,create:It,edit:Dt,icon:Kt.a}),Object(Te.jsx)(c.a,{name:"rooms",list:wr,show:gr,icon:B.a}),Object(Te.jsx)(c.a,{name:"user_media_statistics",list:es,icon:Hr.a}),Object(Te.jsx)(c.a,{name:"reports",list:Pr,show:Ir,icon:rs.a}),Object(Te.jsx)(c.a,{name:"room_directory",list:mr,icon:tr.a}),Object(Te.jsx)(c.a,{name:"registration_tokens",list:Ds,create:As,edit:Cs,icon:Zr.a}),Object(Te.jsx)(c.a,{name:"connections"}),Object(Te.jsx)(c.a,{name:"devices"}),Object(Te.jsx)(c.a,{name:"room_members"}),Object(Te.jsx)(c.a,{name:"users_media"}),Object(Te.jsx)(c.a,{name:"joined_rooms"}),Object(Te.jsx)(c.a,{name:"pushers"}),Object(Te.jsx)(c.a,{name:"servernotices"}),Object(Te.jsx)(c.a,{name:"forward_extremities"}),Object(Te.jsx)(c.a,{name:"room_state"})]})};n.a.render(Object(Te.jsx)(qs,{}),document.getElementById("root"))}},[[673,1,2]]]);
-//# sourceMappingURL=main.6901634e.chunk.js.map
\ No newline at end of file
diff --git a/static/js/main.6901634e.chunk.js.map b/static/js/main.6901634e.chunk.js.map
deleted file mode 100644
index bc5983e..0000000
--- a/static/js/main.6901634e.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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","RoomIcon","EqualizerIcon","ReportIcon","FolderSharedIcon","ConfirmationNumberIcon","ReactDOM","getElementById"],"mappings":"0NA0FeA,EAxFM,CAEnBC,MAAO,YAAmD,IAAhDC,EAA+C,EAA/CA,SAAUC,EAAqC,EAArCA,SAAUC,EAA2B,EAA3BA,SAAUC,EAAiB,EAAjBA,WAEtCH,EAAWI,yJAAYC,kBAAoBL,EAE3CM,QAAQC,IAAI,UACZ,IAAMC,EAAU,CACdC,OAAQ,OACRC,KAAMC,KAAKC,UACTC,OAAO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giB,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.6901634e.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
\n \n \n \n );\n\n return (\n
\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
\n \n \n \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
\n \n \n \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
\n \n \n \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
\n }\n />\n \n \n );\n };\n\n return (\n
\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
\n \n \n \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
\n https://github.com/marmelab/react-admin/issues/4349#issuecomment-578594735\n */\n
\n {record.quarantined_by && (\n \n \n {/*\n Button instead BooleanField for\n consistent appearance and position in the column\n */}\n \n
\n \n )}\n {record.safe_from_quarantine && (\n \n \n \n
\n \n )}\n {!record.safe_from_quarantine && !record.quarantined_by && (\n \n \n \n
\n \n )}\n \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
\n {record.safe_from_quarantine && (\n \n \n \n
\n \n )}\n {record.quarantined_by && (\n \n \n \n
\n \n )}\n {!record.safe_from_quarantine && !record.quarantined_by && (\n \n \n \n
\n \n )}\n \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
\n {filters &&\n cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: \"button\",\n })}\n \n \n {/* Add your custom actions */}\n \n \n );\n};\n\nUserListActions.defaultProps = {\n selectedIds: [],\n onUnselectItems: () => null,\n};\n\nconst UserPagination = props => (\n
\n);\n\nconst UserFilter = props => (\n
\n \n \n \n \n);\n\nconst UserBulkActionButtons = props => (\n
\n \n \n \n);\n\nconst AvatarField = ({ source, className, record = {} }) => (\n
\n);\n\nexport const UserList = props => {\n const classes = useStyles();\n return (\n
}\n filterDefaultValues={{ guests: true, deactivated: false }}\n sort={{ field: \"name\", order: \"ASC\" }}\n actions={
}\n bulkActionButtons={
}\n pagination={
}\n >\n
\n \n \n \n \n \n \n \n \n \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
\n \n \n \n \n );\n};\n\nexport const UserCreate = props => (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nconst UserTitle = ({ record }) => {\n const translate = useTranslate();\n return (\n
\n {translate(\"resources.users.name\", {\n smart_count: 1,\n })}{\" \"}\n {record ? `\"${record.displayname}\"` : \"\"}\n \n );\n};\nexport const UserEdit = props => {\n const classes = useStyles();\n const translate = useTranslate();\n return (\n
}>\n
}>\n
}\n >\n
\n
\n
\n
\n
\n
\n
\n
\n \n\n
}\n path=\"threepid\"\n >\n
\n \n \n \n \n \n \n\n
}\n path=\"sso\"\n >\n
\n \n \n \n \n \n \n\n
}\n path=\"devices\"\n >\n
\n \n \n \n \n \n \n \n \n \n\n
}\n path=\"connections\"\n >\n
\n \n \n \n \n \n \n \n \n \n\n
}\n path=\"media\"\n >\n
}\n perPage={50}\n sort={{ field: \"created_ts\", order: \"DESC\" }}\n >\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
}\n path=\"rooms\"\n >\n
\n \"/rooms/\" + id + \"/show\"}\n >\n \n \n \n \n \n \n \n\n
}\n path=\"pushers\"\n >\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \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
\n);\n\nexport const RoomDirectoryDeleteButton = props => {\n const translate = useTranslate();\n\n return (\n
}\n />\n );\n};\n\nexport const RoomDirectoryBulkDeleteButton = props => (\n
}\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
\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
\n );\n};\n\nconst RoomDirectoryBulkActionButtons = props => (\n
\n \n \n);\n\nconst AvatarField = ({ source, className, record = {} }) => (\n
\n);\n\nconst RoomDirectoryFilter = ({ ...props }) => {\n const translate = useTranslate();\n return (\n
\n \n \n \n \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
}\n bulkActionButtons={
}\n filters={
}\n perPage={100}\n >\n
\"/rooms/\" + id + \"/show\"}>\n \n \n {roomIdFilter && (\n \n )}\n {canonicalAliasFilter && (\n \n )}\n {topicFilter && (\n \n )}\n \n \n \n \n \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
\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
\n \n {value === true ? (\n \n ) : (\n \n )}\n \n \n );\n }\n\n return (\n
\n {emptyText}\n \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
\n {translate(\"resources.rooms.name\", 1)} {name}\n \n );\n};\n\nconst RoomShowActions = ({ basePath, data, resource }) => {\n var roomDirectoryStatus = \"\";\n if (data) {\n roomDirectoryStatus = data.public;\n }\n\n return (\n
\n {roomDirectoryStatus === false && (\n \n )}\n {roomDirectoryStatus === true && (\n \n )}\n \n \n );\n};\n\nexport const RoomShow = props => {\n const classes = useStyles({ props });\n const translate = useTranslate();\n return (\n
} title={
}>\n
\n }>\n \n \n \n \n \n \n \n\n }\n path=\"detail\"\n >\n \n \n \n \n \n \n \n\n }>\n \n \"/users/\" + id}\n >\n \n \n \n \n \n \n \n\n }\n path=\"permission\"\n >\n \n \n \n \n \n \n\n }\n path=\"state\"\n >\n \n \n \n \n \n \n \n \n \n \n \n\n }\n path=\"forward_extremities\"\n >\n \n {translate(\"resources.rooms.helper.forward_extremities\")}\n
\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nconst RoomBulkActionButtons = props => (\n
\n \n \n \n \n);\n\nconst RoomFilter = ({ ...props }) => {\n const translate = useTranslate();\n return (\n
\n \n \n \n \n \n \n );\n};\n\nconst RoomNameField = props => {\n const { source } = props;\n const record = useRecordContext(props);\n return (\n
{record[source] || record[\"canonical_alias\"] || record[\"id\"]}\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
}\n sort={{ field: \"name\", order: \"ASC\" }}\n filters={
}\n bulkActionButtons={
}\n >\n
\n }\n />\n \n \n {localMembersFilter && }\n {stateEventsFilter && }\n {versionFilter && }\n {federateableFilter && }\n \n \n \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
\n);\n\nexport const ReportShow = props => {\n const translate = useTranslate();\n return (\n
\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n \n \n\n }\n path=\"detail\"\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const ReportList = ({ ...props }) => {\n return (\n
}\n sort={{ field: \"received_ts\", order: \"DESC\" }}\n bulkActionButtons={false}\n >\n
\n \n \n \n \n \n \n \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
\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
\n
\n \n
\n
\n
\n \n
\n
{serverVersion}
\n
\n );\n };\n\n return (\n
\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
\n {filters &&\n cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: \"button\",\n })}\n \n \n \n );\n};\n\nconst UserMediaStatsPagination = props => (\n
\n);\n\nconst UserMediaStatsFilter = props => (\n
\n \n \n);\n\nexport const UserMediaStatsList = props => {\n return (\n
}\n filters={
}\n pagination={
}\n sort={{ field: \"media_length\", order: \"DESC\" }}\n bulkActionButtons={false}\n >\n
\"/users/\" + id + \"/media\"}>\n \n \n \n \n \n \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
\n \n \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
;\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
\n \n \n \n {translate(\n \"import_users.cards.importstats.users_total\",\n stats.total\n )}\n
\n \n {translate(\n \"import_users.cards.importstats.guest_count\",\n stats.is_guest\n )}\n
\n \n {translate(\n \"import_users.cards.importstats.admin_count\",\n stats.admin\n )}\n
\n \n ,\n
\n \n \n \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
\n {stats.id > 0 ? (\n \n \n \n \n \n
\n ) : (\n \"\"\n )}\n \n ,\n
\n \n \n \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
\n {stats.password > 0 ? (\n \n \n }\n label={translate(\"import_users.cards.passwords.use_passwords\")}\n />\n
\n ) : (\n \"\"\n )}\n \n ,\n ];\n\n let conflictCards = stats && !importResults && (\n
\n \n \n \n \n \n \n \n
\n \n \n );\n\n let errorCards = error && (\n
\n \n \n {(Array.isArray(error) ? error : [error]).map(e => (\n {e}
\n ))}\n \n \n );\n\n let uploadCard = !importResults && (\n
\n \n \n {translate(\"import_users.cards.upload.explanation\")}\n example.csv\n
\n
\n \n \n \n );\n\n let resultsCard = importResults && (\n
\n \n \n {translate(\n \"import_users.cards.results.total\",\n importResults.totalRecordCount\n )}\n
\n {translate(\n \"import_users.cards.results.successful\",\n importResults.succeededRecords.length\n )}\n
\n {importResults.skippedRecords.length\n ? [\n translate(\n \"import_users.cards.results.skipped\",\n importResults.skippedRecords.length\n ),\n
\n \n
,\n
,\n ]\n : \"\"}\n {importResults.erroredRecords.length\n ? [\n translate(\n \"import_users.cards.results.skipped\",\n importResults.erroredRecords.length\n ),\n
,\n ]\n : \"\"}\n
\n {importResults.wasDryRun && [\n translate(\"import_users.cards.results.simulated_only\"),\n
,\n ]}\n
\n \n );\n\n let startImportCard =\n !values || values.length === 0 || importResults ? undefined : (\n
\n \n }\n label={translate(\"import_users.cards.startImport.simulate_only\")}\n />\n \n {progress !== null ? (\n \n {progress.done} of {progress.limit} done\n
\n ) : null}\n \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 =
{allCards};\n\n return [\n
,\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
\n \n \n);\n\nexport const RegistrationTokenList = props => {\n return (\n
}\n filterDefaultValues={{ valid: true }}\n pagination={false}\n perPage={500}\n >\n
\n \n \n \n \n \n \n \n );\n};\n\nexport const RegistrationTokenCreate = props => (\n
\n }>\n \n \n \n \n \n \n);\n\nexport const RegistrationTokenEdit = props => {\n return (\n
\n \n \n \n \n \n \n \n \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
,\n ]}\n >\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \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(
, document.getElementById(\"root\"));\n"],"sourceRoot":""}
\ No newline at end of file