Merge remote-tracking branch 'origin/develop' into hs/blocked-err

This commit is contained in:
Will Hunt 2021-03-05 18:50:00 +00:00
commit d07069238f
269 changed files with 18170 additions and 6833 deletions

View file

@ -23,7 +23,7 @@ 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."),
@ -39,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,