forked from Mirrors/keyoxide-web
Improve error message
This commit is contained in:
parent
b2b1a1a8d0
commit
fe8520b40f
1 changed files with 57 additions and 48 deletions
|
@ -40,6 +40,22 @@ block content
|
|||
}
|
||||
}
|
||||
|
||||
if (data && 'errors' in data && data.errors.length > 0)
|
||||
section
|
||||
h2 Something went wrong while viewing the profile
|
||||
.card
|
||||
if data.errors.length === 1
|
||||
p The following error was reported:
|
||||
else
|
||||
p The following errors were reported:
|
||||
ul
|
||||
each error in data.errors
|
||||
li
|
||||
p= error
|
||||
p Please see the
|
||||
a(href="https://docs.keyoxide.org/getting-started/something-went-wrong/") documentation
|
||||
| for help.
|
||||
else
|
||||
section.profile.narrow.h-card
|
||||
noscript
|
||||
p Keyoxide requires JavaScript to function.
|
||||
|
@ -86,13 +102,6 @@ block content
|
|||
textarea#signature(name='signature')= signature
|
||||
input(type='submit', name='submit', value='Generate profile')
|
||||
|
||||
|
||||
if (data && 'errors' in data && data.errors.length > 0)
|
||||
h2 Something went wrong while generating the profile
|
||||
ul
|
||||
each error in data.errors
|
||||
li= error
|
||||
else
|
||||
unless (isSignature && !signature)
|
||||
#profileHeader.card.card--transparent.card--profileHeader
|
||||
img#profileAvatar.u-logo(src=data.extra.avatarURL alt="avatar")
|
||||
|
|
Loading…
Reference in a new issue