Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
疯人忠
Cvat
提交
a162a65c
C
Cvat
项目概览
疯人忠
/
Cvat
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Cvat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a162a65c
编写于
9月 23, 2021
作者:
A
Akash Upadhyay
提交者:
GitHub
9月 23, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added email confirmation page (#3573)
* Added email confirmation page
上级
f3e09cdd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
55 addition
and
2 deletion
+55
-2
cvat-ui/src/components/cvat-app.tsx
cvat-ui/src/components/cvat-app.tsx
+4
-0
cvat-ui/src/components/email-confirmation-page/email-confirmed.tsx
...rc/components/email-confirmation-page/email-confirmed.tsx
+39
-0
cvat-ui/src/components/email-confirmation-page/styles.scss
cvat-ui/src/components/email-confirmation-page/styles.scss
+8
-0
cvat/settings/base.py
cvat/settings/base.py
+3
-1
cvat/settings/development.py
cvat/settings/development.py
+1
-1
未找到文件。
cvat-ui/src/components/cvat-app.tsx
浏览文件 @
a162a65c
...
...
@@ -42,6 +42,7 @@ import showPlatformNotification, {
showUnsupportedNotification
,
}
from
'
utils/platform-checker
'
;
import
'
../styles.scss
'
;
import
EmailConfirmationPage
from
'
./email-confirmation-page/email-confirmed
'
;
interface
CVATAppProps
{
loadFormats
:
()
=>
void
;
...
...
@@ -381,6 +382,9 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP
path
=
'/auth/password/reset/confirm'
component
=
{
ResetPasswordPageConfirmComponent
}
/>
<
Route
exact
path
=
'/auth/email-confirmation'
component
=
{
EmailConfirmationPage
}
/>
<
Redirect
to
=
{
location
.
pathname
.
length
>
1
?
`/auth/login/?next=
${
location
.
pathname
}
`
:
'
/auth/login
'
}
/>
...
...
cvat-ui/src/components/email-confirmation-page/email-confirmed.tsx
0 → 100644
浏览文件 @
a162a65c
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
import
React
,
{
useRef
}
from
'
react
'
;
import
{
Link
}
from
'
react-router-dom
'
;
import
{
Col
,
Row
}
from
'
antd/lib/grid
'
;
import
Layout
from
'
antd/lib/layout
'
;
import
Statistic
from
'
antd/lib/statistic
'
;
import
'
./styles.scss
'
;
const
{
Content
}
=
Layout
;
const
{
Countdown
}
=
Statistic
;
/**
* Component for displaying email confirmation message and then redirecting to the login page
*/
function
EmailConfirmationPage
():
JSX
.
Element
{
const
linkRef
=
useRef
();
const
onFinish
=
()
=>
{
linkRef
.
current
.
click
();
};
return
(
<
Layout
>
<
Content
>
<
Row
justify
=
'center'
align
=
'middle'
id
=
'email-confirmation-page-container'
>
<
Col
>
<
h1
>
Your email is confirmed
</
h1
>
<
Countdown
format
=
'ss'
title
=
'Redirecting to login page after...'
value
=
{
Date
.
now
()
+
1000
*
6
}
onFinish
=
{
onFinish
}
/>
<
Link
to
=
'/auth/login'
ref
=
{
linkRef
}
>
Or click this link
</
Link
>
</
Col
>
</
Row
>
</
Content
>
</
Layout
>
);
}
export
default
EmailConfirmationPage
;
cvat-ui/src/components/email-confirmation-page/styles.scss
0 → 100644
浏览文件 @
a162a65c
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
#email-confirmation-page-container
{
height
:
100%
;
text-align
:
center
;
}
cvat/settings/base.py
浏览文件 @
a162a65c
...
...
@@ -238,7 +238,9 @@ AUTHENTICATION_BACKENDS = [
# https://github.com/pennersr/django-allauth
ACCOUNT_EMAIL_VERIFICATION
=
'none'
# set UI url to redirect after a successful e-mail confirmation
ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL
=
'/auth/login'
#changed from '/auth/login' to '/auth/email-confirmation' for email confirmation message
ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL
=
'/auth/email-confirmation'
OLD_PASSWORD_FIELD_ENABLED
=
True
# Django-RQ
...
...
cvat/settings/development.py
浏览文件 @
a162a65c
...
...
@@ -38,7 +38,7 @@ UI_URL = '{}://{}'.format(UI_SCHEME, UI_HOST)
if
UI_PORT
and
UI_PORT
!=
'80'
:
UI_URL
+=
':{}'
.
format
(
UI_PORT
)
# set UI url to redirect to after successful e-mail confirmation
ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL
=
'{}/auth/
logi
n'
.
format
(
UI_URL
)
ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL
=
'{}/auth/
email-confirmatio
n'
.
format
(
UI_URL
)
CORS_ORIGIN_WHITELIST
=
[
UI_URL
]
CORS_REPLACE_HTTPS_REFERER
=
True
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录