feat(errors): add reset credentials button to error page

This commit is contained in:
Benedikt Rötsch
2018-02-14 11:46:30 +01:00
committed by Benedikt Rötsch
parent 8c20dfb817
commit 92fcbdf4d8

View File

@@ -7,6 +7,7 @@ block content
.error .error
h1 #{translate('somethingWentWrongLabel', currentLocale.code)} (#{error.status}) h1 #{translate('somethingWentWrongLabel', currentLocale.code)} (#{error.status})
p #{error.message} p #{error.message}
h2 #{translate('tryLabel', currentLocale.code)}: h2 #{translate('tryLabel', currentLocale.code)}:
ul ul
case error.status case error.status
@@ -23,10 +24,17 @@ block content
if error.stack if error.stack
li #{translate('stackTraceErrorLabel', currentLocale.code)} li #{translate('stackTraceErrorLabel', currentLocale.code)}
if helpers.isCustomCredentials(settings)
form(action='/settings?reset=true' method='POST')
p
button(type="submit") #{translate('resetCredentialsLabel', currentLocale.code)}
if error.response if error.response
h2 #{translate('errorLabel', currentLocale.code)} h2 #{translate('errorLabel', currentLocale.code)}
pre.error__stack-trace pre.error__stack-trace
code.shell #{helpers.dump(error.response.data)} code.shell #{helpers.dump(error.response.data)}
if error.stack if error.stack
h2 #{translate('stackTraceLabel', currentLocale.code)} h2 #{translate('stackTraceLabel', currentLocale.code)}
pre.error__stack-trace pre.error__stack-trace