Show a specific error for hs_disabled
This commit is contained in:
parent
048a3f6ec8
commit
5de92b68d9
6 changed files with 11 additions and 1 deletions
|
@ -94,7 +94,7 @@ interface IProps {
|
||||||
|
|
||||||
interface IUsageLimit {
|
interface IUsageLimit {
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
limit_type: "monthly_active_user" | string;
|
limit_type: "monthly_active_user" | "hs_disabled" | string;
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
admin_contact?: string;
|
admin_contact?: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,6 +195,10 @@ export default class RoomStatusBar extends React.Component {
|
||||||
"Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. " +
|
"Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. " +
|
||||||
"Please <a>contact your service administrator</a> to continue using the service.",
|
"Please <a>contact your service administrator</a> to continue using the service.",
|
||||||
),
|
),
|
||||||
|
'hs_disabled': _td(
|
||||||
|
"Your message wasn't sent because this homeserver has been blocked by it's administrator. " +
|
||||||
|
"Please <a>contact your service administrator</a> to continue using the service.",
|
||||||
|
),
|
||||||
'': _td(
|
'': _td(
|
||||||
"Your message wasn't sent because this homeserver has exceeded a resource limit. " +
|
"Your message wasn't sent because this homeserver has exceeded a resource limit. " +
|
||||||
"Please <a>contact your service administrator</a> to continue using the service.",
|
"Please <a>contact your service administrator</a> to continue using the service.",
|
||||||
|
|
|
@ -218,6 +218,9 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>
|
||||||
'monthly_active_user': _td(
|
'monthly_active_user': _td(
|
||||||
"This homeserver has hit its Monthly Active User limit.",
|
"This homeserver has hit its Monthly Active User limit.",
|
||||||
),
|
),
|
||||||
|
'hs_blocked': _td(
|
||||||
|
"This homeserver has been blocked by it's administrator.",
|
||||||
|
),
|
||||||
'': _td(
|
'': _td(
|
||||||
"This homeserver has exceeded one of its resource limits.",
|
"This homeserver has exceeded one of its resource limits.",
|
||||||
),
|
),
|
||||||
|
|
|
@ -276,6 +276,7 @@ export default class Registration extends React.Component<IProps, IState> {
|
||||||
response.data.admin_contact,
|
response.data.admin_contact,
|
||||||
{
|
{
|
||||||
'monthly_active_user': _td("This homeserver has hit its Monthly Active User limit."),
|
'monthly_active_user': _td("This homeserver has hit its Monthly Active User limit."),
|
||||||
|
'hs_blocked': _td("This homeserver has been blocked by it's administrator."),
|
||||||
'': _td("This homeserver has exceeded one of its resource limits."),
|
'': _td("This homeserver has exceeded one of its resource limits."),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -26,6 +26,7 @@ const TOAST_KEY = "serverlimit";
|
||||||
export const showToast = (limitType: string, adminContact?: string, syncError?: boolean) => {
|
export const showToast = (limitType: string, adminContact?: string, syncError?: boolean) => {
|
||||||
const errorText = messageForResourceLimitError(limitType, adminContact, {
|
const errorText = messageForResourceLimitError(limitType, adminContact, {
|
||||||
'monthly_active_user': _td("Your homeserver has exceeded its user limit."),
|
'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."),
|
'': _td("Your homeserver has exceeded one of its resource limits."),
|
||||||
});
|
});
|
||||||
const contactText = messageForResourceLimitError(limitType, adminContact, {
|
const contactText = messageForResourceLimitError(limitType, adminContact, {
|
||||||
|
|
|
@ -62,6 +62,7 @@ export function messageForSyncError(err) {
|
||||||
err.data.admin_contact,
|
err.data.admin_contact,
|
||||||
{
|
{
|
||||||
'monthly_active_user': _td("This homeserver has hit its Monthly Active User limit."),
|
'monthly_active_user': _td("This homeserver has hit its Monthly Active User limit."),
|
||||||
|
'hs_blocked': _td("This homeserver has been blocked by its administrator."),
|
||||||
'': _td("This homeserver has exceeded one of its resource limits."),
|
'': _td("This homeserver has exceeded one of its resource limits."),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue