You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2024/07/25 03:43:42 UTC
(incubator-answer) 01/01: style: link-invalid page ui changed
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch fix/links-invalid
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit 87c6520948c704b186f7e12233d8dc8255f00efc
Author: shuai <li...@sifou.com>
AuthorDate: Thu Jul 25 11:42:53 2024 +0800
style: link-invalid page ui changed
---
i18n/en_US.yaml | 5 ++---
ui/src/pages/Users/ActivationResult/index.tsx | 18 ++++++++++++++++--
ui/src/router/routes.ts | 6 +++---
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml
index 73ec16fa..ed6f0c9a 100644
--- a/i18n/en_US.yaml
+++ b/i18n/en_US.yaml
@@ -1265,9 +1265,8 @@ ui:
account_result:
success: Your new account is confirmed; you will be redirected to the home page.
link: Continue to homepage
- invalid: >-
- Sorry, this account confirmation link is no longer valid. Perhaps your
- account is already active?
+ oops: Oops!
+ invalid: The link you used no longer works.
confirm_new_email: Your email has been updated.
confirm_new_email_invalid: >-
Sorry, this confirmation link is no longer valid. Perhaps your email was
diff --git a/ui/src/pages/Users/ActivationResult/index.tsx b/ui/src/pages/Users/ActivationResult/index.tsx
index 37889d57..81d3406f 100644
--- a/ui/src/pages/Users/ActivationResult/index.tsx
+++ b/ui/src/pages/Users/ActivationResult/index.tsx
@@ -35,9 +35,9 @@ const Index: FC = () => {
<Container className="pt-4 mt-2 mb-5">
<Row className="justify-content-center">
<Col lg={6}>
- <WelcomeTitle className="mt-3 mb-5" />
{location.pathname?.includes('success') && (
<>
+ <WelcomeTitle className="mt-3 mb-5" />
<p className="text-center">{t('success')}</p>
<div className="text-center">
<Link to="/">{t('link')}</Link>
@@ -46,7 +46,21 @@ const Index: FC = () => {
)}
{location.pathname?.includes('failed') && (
- <p className="text-center">{t('invalid')}</p>
+ <div className="d-flex flex-column flex-shrink-1 flex-grow-1 justify-content-center align-items-center">
+ <div
+ className="mb-4 text-secondary"
+ style={{ fontSize: '120px', lineHeight: 1.2 }}>
+ (=‘x‘=)
+ </div>
+
+ <h4 className="text-center">{t('oops')}</h4>
+ <p className="text-center mb-3 fs-5">{t('invalid')}</p>
+ <div className="text-center">
+ <Link to="/" className="btn btn-link">
+ {t('back_home', { keyPrefix: 'page_error' })}
+ </Link>
+ </div>
+ </div>
)}
</Col>
</Row>
diff --git a/ui/src/router/routes.ts b/ui/src/router/routes.ts
index 5c420e36..c582b9ba 100644
--- a/ui/src/router/routes.ts
+++ b/ui/src/router/routes.ts
@@ -285,9 +285,9 @@ const routes: RouteNode[] = [
{
path: '/users/account-activation/failed',
page: 'pages/Users/ActivationResult',
- guard: () => {
- return guard.notActivated();
- },
+ // guard: () => {
+ // return guard.notActivated();
+ // },
},
{
path: '/users/confirm-new-email',