Merge branch 'develop' of git+ssh://github.com/matrix-org/matrix-react-sdk into develop

This commit is contained in:
Matthew Hodgson 2021-03-08 04:57:10 +00:00
commit c02d03cc5b
146 changed files with 8365 additions and 1072 deletions

View file

@ -23,9 +23,10 @@ import {messageForResourceLimitError} from "../utils/ErrorUtils";
const TOAST_KEY = "serverlimit";
export const showToast = (limitType: string, adminContact?: string, syncError?: boolean) => {
export const showToast = (limitType: string, onHideToast: () => void, adminContact?: string, syncError?: boolean) => {
const errorText = messageForResourceLimitError(limitType, adminContact, {
'monthly_active_user': _td("Your homeserver has exceeded its user limit."),
'hs_blocked': _td("This homeserver has been blocked by it's administrator."),
'': _td("Your homeserver has exceeded one of its resource limits."),
});
const contactText = messageForResourceLimitError(limitType, adminContact, {
@ -38,7 +39,10 @@ export const showToast = (limitType: string, adminContact?: string, syncError?:
props: {
description: <React.Fragment>{errorText} {contactText}</React.Fragment>,
acceptLabel: _t("Ok"),
onAccept: hideToast,
onAccept: () => {
hideToast()
if (onHideToast) onHideToast();
},
},
component: GenericToast,
priority: 70,