Skip to content

Commit 4f483da

Browse files
author
马蹄疾
authored
Merge pull request #480 from Coding/remove-beta
去掉 beta 字样
2 parents eed35f1 + 16bd0d0 commit 4f483da

File tree

18 files changed

+99
-194
lines changed

18 files changed

+99
-194
lines changed

app/components/MenuBar/menuBarItems.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const divider = { isDivider: true };
1313
const menuBarItems = observable([
1414
{
1515
key: 'meta',
16-
name: (<div className="menu-bar-item-logo"><img className="logo" src={logo} alt="logo" /><div className='beta'>beta</div></div>),
16+
name: (<div className="menu-bar-item-logo"><img className="logo" src={logo} alt="" /></div>),
1717
className: 'coding-logo',
1818
items: [
1919
{

app/components/Modal/modals/About.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const Alert = () => {
77
<div className='modal-content about'>
88
<div className='title'>
99
<div className='logo'></div>
10-
<span className='beta'>beta</span>
1110
</div>
1211
<div className='logos'>
1312
<div className='logo-item'>

app/components/Tab/WelcomePage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class WelcomePage extends PureComponent {
1111
return (
1212
<div className='welcome-page'>
1313
<div className='header'></div>
14-
<h1>欢迎使用 <div className='logo'><span className='beta'>beta</span></div></h1>
14+
<h1>欢迎使用<div className='logo'></div></h1>
1515
<div className='subtitle'>您将获得前所未有的云端开发体验</div>
1616
<div className='quick-start'>
1717
<div className="video-btn" onClick={this.handleVideo}>

app/dashboard/api/global.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import axios from './axios';
22

3+
export const getUserProfile = () => {
4+
return axios.get('/user/current', { 'Accept': 'application/vnd.coding.v1+json' });
5+
}
6+
37
export const getNotification = () => {
48
return axios.get('/workspaces/notification?page=1&pageSize=10');
59
}
@@ -11,7 +15,3 @@ export const markReaded = (data) => {
1115
export const getMessage = () => {
1216
return axios.get('/workspaces/message?page=1&pageSize=10');
1317
}
14-
15-
export const renameGlobalKey = (data) => {
16-
return axios.post('/user/modify-new-global-key', data);
17-
}

app/dashboard/api/ws.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import axios from './axios';
22

3-
export const getUserProfile = () => {
4-
return axios.get('/user/current', { 'Accept': 'application/vnd.coding.v1+json' });
5-
}
6-
73
export const getWorkspace = () => {
84
return axios.get('/ws/list?page=0&size=100', { 'Accept': 'application/vnd.coding.v1+json' });
95
}

app/dashboard/view/about/About.js

Lines changed: 31 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from 'react';
1+
import React from 'react';
22

33
import './about.css';
44
import cloudstudio from '../../static/cloudstudio.svg';
@@ -8,66 +8,41 @@ import tencentcloud from './img/tencentcloud.png';
88
import i18n from '../../utils/i18n';
99
import config from '../../utils/config';
1010

11-
class About extends Component {
12-
state = {
13-
width: '100%',
14-
height: '100%',
15-
}
11+
const url = window === window.top ? '/changelog' : `${config.studioOrigin}/changelog`;
1612

17-
render() {
18-
const { width, height } = this.state;
19-
const url = window === window.top ? '/changelog' : `${config.studioOrigin}/changelog`;
20-
return (
21-
<div className="dash-about" style={{ width, height }}>
22-
<div className="up"></div>
23-
<div className="center">
24-
<div className="logo">
25-
<img src={cloudstudio} alt="cloudstudio" />
26-
<div className="beta">beta</div>
27-
</div>
28-
<div className="desc">
29-
<span className="version">V 3.4</span>
30-
<a href={url} target="_blank" rel="noopener noreferrer">{i18n('global.changelog')}</a>
31-
</div>
13+
const About = () => {
14+
return (
15+
<div className="dash-about">
16+
<div className="up"></div>
17+
<div className="center">
18+
<div className="logo">
19+
<img src={cloudstudio} alt="" />
3220
</div>
33-
<div className="below">
34-
<div className="produce">
35-
<div className="corp">
36-
<div className="role">{i18n('global.produce')}</div>
37-
<a href="https://coding.net" target="_blank" rel="noopener noreferrer">
38-
<img src={coding} alt="Coding Logo" />
39-
</a>
40-
</div>
41-
<div className="x"></div>
42-
<div className="corp">
43-
<div className="role">{i18n('global.computeSupport')}</div>
44-
<a href="https://cloud.tencent.com/" target="_blank" rel="noopener noreferrer">
45-
<img src={tencentcloud} alt="Tencent Logo" />
46-
</a>
47-
</div>
21+
<div className="desc">
22+
<span className="version">V 3.4</span>
23+
<a href={url} target="_blank" rel="noopener noreferrer">{i18n('global.changelog')}</a>
24+
</div>
25+
</div>
26+
<div className="below">
27+
<div className="produce">
28+
<div className="corp">
29+
<div className="role">{i18n('global.produce')}</div>
30+
<a href="https://coding.net" target="_blank" rel="noopener noreferrer">
31+
<img src={coding} alt="" />
32+
</a>
33+
</div>
34+
<div className="x"></div>
35+
<div className="corp">
36+
<div className="role">{i18n('global.computeSupport')}</div>
37+
<a href="https://cloud.tencent.com/" target="_blank" rel="noopener noreferrer">
38+
<img src={tencentcloud} alt="" />
39+
</a>
4840
</div>
49-
<div className="copyright">Copyright @ 2015-{new Date().getFullYear()}. {i18n('global.copyright')}</div>
5041
</div>
42+
<div className="copyright">Copyright @ 2015-{new Date().getFullYear()}. {i18n('global.copyright')}</div>
5143
</div>
52-
);
53-
}
54-
55-
componentDidMount() {
56-
this.handleResize();
57-
window.addEventListener('resize', this.handleResize);
58-
}
59-
60-
handleResize = () => {
61-
const w = document.documentElement.clientWidth - 60;
62-
this.setState({
63-
width: w > 860 - 60 ? w - 200 : w,
64-
height: document.documentElement.clientHeight - 50 - 60,
65-
});
66-
}
67-
68-
componentWillUnmount() {
69-
window.removeEventListener('resize', this.handleResize);
70-
}
44+
</div>
45+
);
7146
}
7247

7348
export default About;

app/dashboard/view/about/about.css

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
display: flex;
33
flex-wrap: wrap;
44
align-content: space-between;
5-
width: 100%;
6-
height: 100%;
5+
width: calc(100vw - 260px);
6+
height: calc(100vh - 110px);
77
}
88
.dash-about .up,
99
.dash-about .center,
@@ -12,25 +12,13 @@
1212
}
1313
.dash-about .center .logo {
1414
width: 27%;
15-
min-width: 200px;
16-
max-width: 400px;
15+
min-width: 260px;
16+
max-width: 500px;
1717
margin: 0 auto;
18-
position: relative;
1918
}
2019
.dash-about .center .logo img {
2120
width: 100%;
2221
}
23-
.dash-about .center .logo .beta {
24-
height: 15px;
25-
padding: 0 2px;
26-
line-height: 15px;
27-
border-radius: 3px;
28-
color: #000;
29-
background-color: #fff;
30-
position: absolute;
31-
top: 10px;
32-
right: -10px;
33-
}
3422
.dash-about .center .desc {
3523
display: flex;
3624
justify-content: center;
@@ -69,16 +57,9 @@
6957
text-align: center;
7058
color: #5f5f5f;
7159
}
72-
73-
@media screen and (max-width: 1440px) {
74-
.dash-about .center .logo .beta {
75-
top: 0;
76-
right: -15px;
77-
}
78-
}
7960
@media screen and (max-width: 860px) {
80-
.dash-about .center .logo .beta {
81-
top: -5px;
82-
right: -20px;
61+
.dash-about {
62+
width: calc(100vw - 40px);
63+
height: calc(100vh - 90px);
8364
}
8465
}

app/dashboard/view/home/Home.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ class Home extends Component {
4040
return (
4141
<div id="dash-container" onClick={this.turnOffPanel}>
4242
<div className="dash-mbar">
43-
<div className="logo">
44-
<Link to="/dashboard/workspace" onClick={hideMbar}><img src={cloudstudio} alt="logo" /></Link>
45-
<span className="beta">beta</span>
46-
</div>
43+
<Link className="logo" to="/dashboard/workspace" onClick={hideMbar}><img src={cloudstudio} alt="" /></Link>
4744
<Stripe />
4845
</div>
4946
<div className={`dash-mnav${isMbarOn ? ' on' : ''}`}>
@@ -56,10 +53,7 @@ class Home extends Component {
5653
<a className="nav-item" href="https://feedback.coding.net/" target="_blank" rel="noopener noreferrer" onClick={hideMbar}>{i18n('global.feedback')}</a>
5754
</div>
5855
<div className="dash-sidebar">
59-
<div className="logo">
60-
<Link to="/dashboard/workspace"><img src={cloudstudio} alt="logo" /></Link>
61-
<span className="beta">beta</span>
62-
</div>
56+
<Link className="logo" to="/dashboard/workspace"><img src={cloudstudio} alt="" /></Link>
6357
<div className="nav">
6458
<NavLink className="nav-item" activeClassName="active" to="/dashboard/workspace">{i18n('global.workspace')} ({wsCount})</NavLink>
6559
<NavLink className="nav-item" activeClassName="active" to="/dashboard/plugin">{i18n('global.plugin')}</NavLink>

app/dashboard/view/home/home.css

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@
1818
}
1919
.dash-mbar .logo img {
2020
width: 150px;
21-
padding-left: 8px;
22-
}
23-
.dash-mbar .logo .beta {
24-
height: 15px;
25-
padding: 0 2px;
26-
line-height: 15px;
27-
border-radius: 3px;
28-
color: #3b3b3b;
29-
background-color: #ddd;
3021
}
3122
.dash-mnav {
3223
display: flex;
@@ -69,16 +60,8 @@
6960
border-bottom: 1px solid #2d2d2d;
7061
}
7162
.dash-sidebar .logo img {
72-
width: 145px;
73-
padding-left: 8px;
74-
}
75-
.dash-sidebar .logo .beta {
76-
height: 15px;
77-
padding: 0 2px;
78-
line-height: 15px;
79-
border-radius: 3px;
80-
color: #3b3b3b;
81-
background-color: #ddd;
63+
width: 100%;
64+
padding: 0 8px;
8265
}
8366
.dash-sidebar .nav {
8467
display: flex;

app/dashboard/view/pluginSet/PluginSet.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class PluginSet extends Component {
2323
pluginType: '',
2424
avgScore: 0,
2525
countScoreUser: 0,
26-
spaceKey: '',
2726
repoName: '',
2827
repoUrl: '',
2928
historyVersions: [],
@@ -41,8 +40,9 @@ class PluginSet extends Component {
4140
timer = null
4241

4342
render() {
44-
const { pluginId, pluginName, remark, historyVersions, status, version, spaceKey, hasPrePublish, preStatus, preLog, tab } = this.state;
43+
const { pluginId, pluginName, remark, historyVersions, status, version, createdBy, repoName, hasPrePublish, preStatus, preLog, tab } = this.state;
4544
const prePublishProps = { hasPrePublish, preStatus, preLog };
45+
const settingProps = { pluginId, pluginName, remark, createdBy, repoName };
4646
return (
4747
<div className="dash-pluginset">
4848
<Overview {...this.state} cancelRelease={this.cancelPrePublish} />
@@ -58,7 +58,7 @@ class PluginSet extends Component {
5858
</div>
5959
)}
6060
{tab === 2 && pluginName && <History historyVersions={historyVersions} />}
61-
{tab === 3 && pluginName && <Setting pluginId={pluginId} pluginName={pluginName} spaceKey={spaceKey} remark={remark} refresh={this.fetchPlugin} />}
61+
{tab === 3 && pluginName && <Setting {...settingProps} refresh={this.fetchPlugin} />}
6262
</div>
6363
);
6464
}
@@ -74,7 +74,7 @@ class PluginSet extends Component {
7474
const { pluginId } = this.state;
7575
api.getPluginInfo(pluginId).then(res => {
7676
if (res.code === 0) {
77-
const { createdBy, pluginName, remark, avgScore, countScoreUser, pluginTypes, pluginVersions, spaceKey, repoName, repoUrl } = res.data;
77+
const { createdBy, pluginName, remark, avgScore, countScoreUser, pluginTypes, pluginVersions, repoName, repoUrl } = res.data;
7878
const { historyVersions, status, version, versionId, log, auditRemark, hasPrePublish, preStatus, preVersionId, preLog } = parseStatus(pluginVersions);
7979
this.setState({
8080
createdBy,
@@ -83,7 +83,6 @@ class PluginSet extends Component {
8383
avgScore,
8484
countScoreUser,
8585
pluginType: pluginTypes[0].typeName,
86-
spaceKey,
8786
repoName,
8887
repoUrl,
8988
historyVersions,

0 commit comments

Comments
 (0)