Skip to content

Commit cf25713

Browse files
author
veedrin
committed
去掉公告
1 parent 0b194d3 commit cf25713

File tree

4 files changed

+2
-60
lines changed

4 files changed

+2
-60
lines changed

app/containers/IDE.jsx

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,10 @@ import GlobalPrompt from './GlobalPrompt'
1111
import config from 'config';
1212
import { autorun } from 'mobx';
1313

14-
const Bulletin = ({ close }) => {
15-
return (
16-
<div className="ide-bulletin">
17-
<span>{i18n`global.eventStreamBulletin1`}</span>
18-
<a href="https://mp.weixin.qq.com/s/IaOWxG0XLvn2znvvP1dmwA" target="_blank">{i18n`global.eventStreamBulletin2`}</a>
19-
<span>{i18n`global.eventStreamBulletin3`}</span>
20-
<i className="fa fa-remove" onClick={close}></i>
21-
</div>
22-
);
23-
}
24-
2514
class IDE extends Component {
2615
constructor (props) {
2716
super(props)
28-
this.state = { isReady: false, isBulletinOn: false }
17+
this.state = { isReady: false }
2918
}
3019

3120
componentWillMount () { // initLifecycle_3: IDE specific init
@@ -41,28 +30,18 @@ class IDE extends Component {
4130
dismissAfter: 12000
4231
})
4332
}
44-
autorun(() => {
45-
if (config.__PLUGIN_DEV__) {
46-
this.setState({ isBulletinOn: true });
47-
}
48-
});
4933
}
5034

5135
render () {
5236
if (!this.state.isReady) return null
5337
return (
5438
<div className='ide-container'>
55-
{this.state.isBulletinOn && <Bulletin close={this.closeBulletin} />}
5639
<GlobalPrompt />
5740
<PanelsContainer />
5841
<Utilities />
5942
</div>
6043
)
6144
}
62-
63-
closeBulletin = () => {
64-
this.setState({ isBulletinOn: false });
65-
}
6645
}
6746

6847
export default connect()(IDE)

app/dashboard/view/home/Home.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { NavLink, Link, Switch, Route, Redirect } from 'react-router-dom';
55
import './home.css';
66
import cloudstudio from '../../static/cloudstudio.svg';
77

8-
import Bulletin from './bulletin';
98
import Mask from './mask';
109
import Stripe from '../../share/stripe';
1110
import Bell from '../bell';
@@ -25,7 +24,6 @@ class Home extends Component {
2524
super(props);
2625
this.state = {
2726
loaded: false,
28-
isBulletinOn: true,
2927
isMaskOn: true,
3028
isBellOn: false,
3129
isProfileOn: false,
@@ -34,14 +32,13 @@ class Home extends Component {
3432
}
3533

3634
render() {
37-
const { loaded, isBulletinOn, isMaskOn, isBellOn, isProfileOn } = this.state;
35+
const { loaded, isMaskOn, isBellOn, isProfileOn } = this.state;
3836
const { isMbarOn, wsCount, hideMbar } = this.props;
3937
if (loaded && isMaskOn) {
4038
return <Mask />;
4139
}
4240
return (
4341
<div id="dash-container" onClick={this.turnOffPanel}>
44-
{isBulletinOn && <Bulletin close={this.closeBulletin} />}
4542
<div className="dash-mbar">
4643
<div className="logo">
4744
<Link to="/dashboard/workspace" onClick={hideMbar}><img src={cloudstudio} alt="logo" /></Link>
@@ -185,10 +182,6 @@ class Home extends Component {
185182
});
186183
}
187184
}
188-
189-
closeBulletin = () => {
190-
this.setState({ isBulletinOn: false });
191-
}
192185
}
193186

194187
const mapState = (state) => {

app/styles/core-ui/Mask.styl

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,3 @@
4040
}
4141
}
4242
}
43-
44-
.ide-bulletin {
45-
width: 930px;
46-
padding: 15px 35px;
47-
border-radius: 4px;
48-
color: #333;
49-
background-color: #fff;
50-
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
51-
transform: translate(-50%, 0);
52-
position: absolute;
53-
top: 10px;
54-
left: 50%;
55-
z-index: 300;
56-
}
57-
.ide-bulletin i {
58-
cursor: pointer;
59-
transform: translate(0, -50%);
60-
position: absolute;
61-
top: 50%;
62-
right: 15px;
63-
}
64-
.ide-bulletin i:hover {
65-
color: #aaa;
66-
}

app/styles/dark/styles/mask.styl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@
66
border: 1px solid $base-border-color;
77
}
88
}
9-
10-
.ide-bulletin {
11-
color: #ccc;
12-
background-color: #444;
13-
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
14-
}

0 commit comments

Comments
 (0)