Skip to content

Commit 3fd158d

Browse files
author
veedrin
committed
dtid_ 开头的用户名强制改名
1 parent 8e2c225 commit 3fd158d

File tree

8 files changed

+345
-96
lines changed

8 files changed

+345
-96
lines changed

app/changelog.html

Lines changed: 149 additions & 44 deletions
Large diffs are not rendered by default.

app/components/Plugins/component.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const PluginArea = observer(({ position = '', childProps = {}, children, getChil
1414
// 如果侧边栏插件的数量超过 5 条,则只显示图标
1515
if (pluginsArray.filter(plugin => plugin.position === SIDEBAR.RIGHT).length > 5) {
1616
pluginsArray.map(plugin => {
17-
console.log(plugin.label)
1817
if (plugin.position === SIDEBAR.RIGHT && plugin.label && typeof plugin.label === 'object') {
1918
plugin.label.onlyIcon = true;
2019
}

app/dashboard/api/global.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ export const markReaded = (data) => {
1111
export const getMessage = () => {
1212
return axios.get('/workspaces/message?page=1&pageSize=10');
1313
}
14+
15+
export const renameGlobalKey = (data) => {
16+
return axios.post('/user/modify-new-global-key', data);
17+
}

app/dashboard/i18n/en_US/global.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"deleting": "Deleting",
4444
"repoUrl": "Repo Url",
4545
"recentdeleted": "Recently Deleted",
46-
"inputTip": "A minimum of two characters, only letters, numbers, or underscores (_), underscores (-), dots (.)",
46+
"inputTip": "Only letters, numbers, or underscores (_), underscores (-), dots (.)",
4747
"sync": "Sync",
4848
"syncing": "Syncing",
4949
"nodata": "No Data",
@@ -72,9 +72,8 @@
7272
"quit": "Quit",
7373
"quiting": "Quiting",
7474
"period": ".",
75-
"globalTip1": "The system has detected that your username has not been modified.",
76-
"globalTip2": "Please go to [ Tencent Cloud Dev Platform > Personal Settings ] and then log in again.",
77-
"gotoModify": "Go to edit",
75+
"globalTip": "You have not set a username yet. Please set a username first, which will be your unique identifier on this platform.",
76+
"submitting": "Submitting...",
7877
"eventStreamBulletin1": "Dear developer, due to ",
7978
"eventStreamBulletin2": "[ event-stream package event ]",
8079
"eventStreamBulletin3": " Impact, your plugin needs to manually delete the `yarn.lock` file and reinstall the dependencies, then push the code to release a new version or pre-release."

app/dashboard/i18n/zh_CN/global.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"deleting": "删除中",
4444
"repoUrl": "仓库地址",
4545
"recentdeleted": "最近删除",
46-
"inputTip": "最少两个字符,仅支持字母、数字或者下划线(_)、中划线(-)、点(.)",
46+
"inputTip": "仅支持字母、数字或者下划线(_)、中划线(-)、点(.)",
4747
"sync": "同步",
4848
"syncing": "同步中",
4949
"nodata": "暂无数据",
@@ -72,9 +72,8 @@
7272
"quit": "退出",
7373
"quiting": "退出中",
7474
"period": "",
75-
"globalTip1": "系统检测到您的用户名尚未修改。",
76-
"globalTip2": "请先进入 [ 腾讯云开发者平台 > 个人设置 ] 修改后再重新登录使用。",
77-
"gotoModify": "前往修改",
75+
"globalTip": "您还没有设置用户名,请先设置用户名,该用户名将作为您在该平台上的唯一标识。",
76+
"submitting": "提交中...",
7877
"eventStreamBulletin1": "尊敬的开发者,由于受 ",
7978
"eventStreamBulletin2": "[ event-stream 包事件 ]",
8079
"eventStreamBulletin3": " 影响,您的插件需要手动删除 `yarn.lock` 文件并重新安装依赖,再推送代码发布新版本或预发布。"
Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,51 @@
1-
import React from 'react';
1+
import React, { Component } from 'react';
22

33
import './mask.css';
44

5+
import Inbox from '../../../share/inbox';
6+
7+
import api from '../../../api';
58
import i18n from '../../../utils/i18n';
69

7-
const Mask = () => {
8-
return (
9-
<div className="dash-global-mask">
10-
<div className="panel">
11-
<div className="line">{i18n('global.globalTip1')}</div>
12-
<div className="line">{i18n('global.globalTip2')}</div>
13-
<div className="control">
14-
<a href="https://dev.tencent.com/user/account" target="_blank" rel="noopener noreferrer">
15-
<button className="com-button primary">{i18n('global.gotoModify')}</button>
16-
</a>
10+
class Mask extends Component {
11+
state = {
12+
loading: false,
13+
value: '',
14+
error: '',
15+
}
16+
17+
render() {
18+
const { loading, value, error } = this.state;
19+
return (
20+
<div className="dash-global-mask">
21+
<div className="panel">
22+
<div className="line">{i18n('global.globalTip')}</div>
23+
<Inbox holder="global.inputTip" value={value} onChange={this.handleChange} />
24+
<div className={`error${error ? ' on' : ''}`}>{error}</div>
25+
{!loading ? (
26+
<button className="com-button primary" onClick={this.handleSubmit}>{i18n('global.ok')}</button>
27+
) : <button className="com-button primary">{i18n('global.submitting')}</button>}
1728
</div>
1829
</div>
19-
</div>
20-
);
30+
);
31+
}
32+
33+
handleChange = (event) => {
34+
this.setState({ value: event.target.value });
35+
}
36+
37+
handleSubmit = () => {
38+
const { value } = this.state;
39+
this.setState({ loading: true });
40+
api.renameGlobalKey({ newGlobalKey: value }).then(res => {
41+
this.setState({ loading: false });
42+
if (res.code === 0) {
43+
window.reload();
44+
} else {
45+
this.setState({ error: res.msg });
46+
}
47+
});
48+
}
2149
}
2250

2351
export default Mask;
Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
.dash-global-mask {
22
width: 100%;
33
height: 100%;
4-
background-color: rgba(0, 0, 0, .6);
4+
background-color: #000;
55
position: fixed;
66
top: 0;
77
left: 0;
88
z-index: 100;
99
}
1010
.dash-global-mask .panel {
11-
width: 465px;
12-
padding: 20px;
13-
border-radius: 5px;
11+
width: 95%;
12+
max-width: 420px;
13+
padding: 15px;
14+
border-radius: 4px;
1415
font-size: 14px;
1516
color: #ccc;
1617
background-color: #333;
18+
transform: translate(-50%, -50%);
1719
position: absolute;
1820
top: 40%;
19-
left: calc(50% - 210px);
21+
left: 50%;
2022
}
21-
.dash-global-mask .panel .line {
22-
padding-bottom: 5px;
23+
.dash-global-mask .panel input {
24+
margin-top: 10px;
2325
}
24-
.dash-global-mask .panel .control {
25-
padding-top: 20px;
26-
text-align: center;
26+
.dash-global-mask .panel .error {
27+
height: 0;
28+
font-size: 12px;
29+
color: #f84a4a;
30+
overflow: hidden;
31+
transition: height .2s ease, margin-top .2s ease;
32+
}
33+
.dash-global-mask .panel .error.on {
34+
height: 16px;
35+
margin-top: 5px;
2736
}
2837
.dash-global-mask .panel button {
29-
width: 90px;
30-
height: 35px;
38+
min-width: 55px;
39+
padding: 4px 13px;
40+
margin-top: 10px;
41+
font-size: 12px;
3142
}

app/intro.html

Lines changed: 122 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@
390390
.intro-canvas #canvas {
391391
width: 100%;
392392
height: 600px;
393+
overflow: hidden;
393394
}
394395
.intro-canvas .content {
395396
display: flex;
@@ -733,23 +734,103 @@
733734
}
734735
</style>
735736

737+
<style>
738+
.intro-connect {
739+
padding: 70px 0 80px;
740+
text-align: center;
741+
background-color: #f7f8fa;
742+
}
743+
.intro-connect .connect {
744+
max-width: 980px;
745+
margin: 0 auto;
746+
}
747+
.intro-connect .connect .title {
748+
margin-bottom: 43px;
749+
line-height: 60px;
750+
font-size: 40px;
751+
font-weight: 500;
752+
}
753+
.intro-connect .connect .content {
754+
display: flex;
755+
flex-wrap: wrap;
756+
align-items: center;
757+
}
758+
.intro-connect .connect .item {
759+
width: 33.33%;
760+
line-height: 24px;
761+
border-right: 1px solid #d8dde4;
762+
font-size: 16px;
763+
color: #202d40;
764+
}
765+
.intro-connect .connect .item:last-of-type {
766+
border-right: none;
767+
}
768+
.intro-connect .connect .item .dec {
769+
margin-bottom: 10px;
770+
color: #606c80;
771+
}
772+
.intro-connect .connect .item a.detail {
773+
color: #202d40;
774+
text-decoration: unset;
775+
}
776+
.intro-connect .connect .statement {
777+
padding: 60px 50px 0;
778+
font-size: 12px;
779+
color: #606c80;
780+
}
781+
@media only screen and (max-width: 414px) {
782+
.intro-connect {
783+
padding: 40px 0 50px;
784+
}
785+
.intro-connect .connect .title {
786+
margin-bottom: 30px;
787+
font-size: 30px;
788+
}
789+
.intro-connect .connect .content {
790+
flex-direction: column;
791+
}
792+
.intro-connect .connect .item {
793+
width: auto;
794+
margin-bottom: 60px;
795+
border-right: none;
796+
}
797+
.intro-connect .connect .item:last-of-type {
798+
margin-bottom: 0;
799+
}
800+
.intro-connect .connect .item .dec {
801+
font-size: 14px;
802+
}
803+
.intro-connect .connect .item .detail {
804+
font-size: 20px;
805+
}
806+
.intro-connect .connect .statement {
807+
padding-top: 40px;
808+
}
809+
}
810+
</style>
811+
736812
<style>
737813
.intro-foot {
814+
display: flex;
815+
flex-direction: column;
816+
justify-content: center;
817+
align-items: center;
738818
width: 100%;
739-
padding: 40px 50px 20px;
819+
height: 150px;
820+
padding: 0 20px;
740821
background-color: #1f2530;
741822
}
742823
.intro-foot .menu {
743824
display: flex;
744825
justify-content: center;
745826
font-size: 14px;
746-
color: #fff;
827+
color: #d2d3d6;
747828
}
748829
.intro-foot .menu .row {
749-
margin-bottom: 20px;
830+
margin-bottom: 16px;
750831
}
751832
.intro-foot .menu a {
752-
color: #fff;
833+
color: #d2d3d6;
753834
}
754835
.intro-foot .menu-item {
755836
margin: 0 20px;
@@ -764,33 +845,34 @@
764845
.intro-foot .strategy a {
765846
color: #a5a7ac;
766847
}
767-
.intro-foot .strategy .divide {
768-
margin: 0 10px;
769-
}
770848
.intro-foot .copyright {
771-
padding-top: 6px;
849+
padding-top: 4px;
772850
text-align: center;
773851
font-size: 12px;
774852
color: #a5a7ac;
775853
}
776-
854+
.intro-foot .divide {
855+
margin: 0 12px;
856+
}
777857
@media screen and (max-width: 800px) {
858+
.intro-foot {
859+
height: 200px;
860+
}
778861
.intro-foot .menu {
779862
flex-wrap: wrap;
780863
justify-content: space-between;
781864
}
782865
.intro-foot .menu .row {
783866
display: flex;
784-
justify-content: space-between;
867+
justify-content: center;
785868
width: 100%;
869+
margin-bottom: 20px;
786870
}
787871
.intro-foot .menu-item {
788-
margin: 0;
872+
margin: 0 10px;
789873
}
790-
}
791-
@media screen and (max-width: 320px) {
792-
.intro-foot {
793-
padding: 40px 30px;
874+
.intro-foot .copyright {
875+
padding-top: 12px;
794876
}
795877
}
796878
</style>
@@ -1032,16 +1114,36 @@ <h2>最极客的云端开发体验</h2>
10321114
</div>
10331115
</div>
10341116
</div>
1117+
<div class="intro-connect">
1118+
<div class="connect">
1119+
<div class="title">联系我们</div>
1120+
<div class="content">
1121+
<div class="item">
1122+
<div class="dec">电话</div>
1123+
<div class="detail">400-930-9163</div>
1124+
</div>
1125+
<div class="item">
1126+
<div class="dec">邮箱</div>
1127+
<a href="mailto:[email protected]" class="detail">[email protected]</a>
1128+
</div>
1129+
<div class="item">
1130+
<div class="dec">在线反馈</div>
1131+
<a href="https://feedback.coding.net" target="_blank" class="detail">https://feedback.coding.net/</a>
1132+
</div>
1133+
</div>
1134+
<div class="statement">腾讯云开发者平台由腾讯云及 CODING 共同运营,目前由 CODING 团队提供运营服务。</div>
1135+
</div>
1136+
</div>
10351137
<div class="intro-foot">
10361138
<div class="menu">
10371139
<div class="row">
1038-
<span class="menu-item">服务支持 QQ 群: 875684377</span>
10391140
<a class="menu-item" href="https://dev.tencent.com/help" target="_blank" rel="noopener noreferrer">文档帮助</a>
1141+
<a class="menu-item" href="https://cloud.tencent.com" target="_blank" rel="noopener noreferrer">腾讯云官网</a>
10401142
</div>
10411143
<div class="row">
1042-
<a class="menu-item" href="https://cloud.tencent.com" target="_blank" rel="noopener noreferrer">腾讯云官网</a>
10431144
<a class="menu-item" href="https://cloud.tencent.com/developer" target="_blank" rel="noopener noreferrer">腾讯云+社区</a>
10441145
<a class="menu-item" href="https://dev.tencent.com/about" target="_blank" rel="noopener noreferrer">关于我们</a>
1146+
<a class="menu-item" href="https://feedback.coding.net/" target="_blank" rel="noopener noreferrer">在线反馈</a>
10451147
</div>
10461148
</div>
10471149
<div class="strategy">
@@ -1051,7 +1153,9 @@ <h2>最极客的云端开发体验</h2>
10511153
<span class="divide">|</span>
10521154
<a href="https://dev.tencent.com/security" target="_blank" rel="noopener noreferrer">安全策略</a>
10531155
</div>
1054-
<div class="copyright">Copyright &copy; 2013-<span id="year">2018</span> Tencent Cloud. All Rights Reserved. 腾讯云 版权所有</div>
1156+
<div class="copyright">
1157+
<span>Copyright &copy; 2013-<span id="year">2018</span> Tencent Cloud. All Rights Reserved. 腾讯云 版权所有</span><span class="divide">|</span><span>粤B2-20090059</span>
1158+
</div>
10551159
</div>
10561160
</div>
10571161

0 commit comments

Comments
 (0)