diff --git a/app/client/aclui/AccessRules.ts b/app/client/aclui/AccessRules.ts index e205bce1..afe04df5 100644 --- a/app/client/aclui/AccessRules.ts +++ b/app/client/aclui/AccessRules.ts @@ -1322,7 +1322,7 @@ class SpecialSchemaObsRuleSet extends SpecialObsRuleSet { protected _buildDomWarning(): DomContents { return dom.maybe( (use) => use(this._body).every(rule => rule.isBuiltInOrEmpty(use)), - () => cssConditionError({style: 'margin-left: 56px; margin-bottom: 8px;'}, + () => cssError( t("This default should be changed if editors' access is to be limited. "), dom('a', {style: 'color: inherit; text-decoration: underline'}, 'Dismiss', dom.on('click', () => this._allowEditors('confirm'))), @@ -1969,10 +1969,17 @@ const cssInput = styled(textInput, ` } `); +const cssError = styled('div', ` + color: ${theme.errorText}; + margin-left: 56px; + margin-bottom: 8px; + margin-top: 4px; +`); + const cssConditionError = styled('div', ` + color: ${theme.errorText}; margin-top: 4px; width: 100%; - color: ${theme.errorText}; `); /** diff --git a/app/client/models/errors.ts b/app/client/models/errors.ts index ad39f368..7ca826a4 100644 --- a/app/client/models/errors.ts +++ b/app/client/models/errors.ts @@ -70,17 +70,32 @@ export function reportSuccess(msg: MessageType, options?: Partial(); /** * Report an error to the user using the global Notifier instance. If the argument is a UserError @@ -99,8 +114,9 @@ export function reportError(err: Error|string, ev?: ErrorEvent): void { if (ev && isUnhelpful(ev)) { // Report just once to the server. There is little point reporting subsequent such errors once // we know they happen, since each individual error has no useful information. - if (++unhelpfulErrors <= 1) { + if (!unhelpfulErrors.has(ev.message)) { logError(err); + unhelpfulErrors.add(ev.message); } return; }