Skip to content

Commit f7cb2c1

Browse files
committed
add release notes
1 parent a964e0d commit f7cb2c1

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

site/edit/en-US.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,8 @@ module.exports = {
126126
'app.login.title': 'This page is locked. Please enter your password.',
127127
'app.login.noPassword': 'If you don\'t know the password, please delete current page or create a new page',
128128
'app.login.new': 'New Page',
129+
'app.layout.notification.title': '3.0 Release Notes',
130+
'app.layout.notification.content1': '3.0 It has been officially released. Since we have made some adjustments to some templates, if your previously edited templates can not be displayed, please go to ',
131+
'app.layout.notification.content2': 'submit your page ID and JSON data.',
129132
},
130133
};

site/edit/template/layout.jsx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2-
import { Icon, message, Button, Input, Form } from 'antd';
2+
import PropTypes from 'prop-types';
3+
import { Icon, message, Button, Input, Form, notification } from 'antd';
34
import { connect } from 'react-redux';
45
import { FormattedMessage } from 'react-intl';
56

@@ -20,15 +21,35 @@ import EditListController from './components/EditListController';
2021
const FormItem = Form.Item;
2122

2223
class Layout extends React.PureComponent {
24+
static contextTypes = {
25+
intl: PropTypes.object.isRequired,
26+
};
27+
2328
state = {
2429
loading: false,
2530
}
2631

27-
componentWillMount() {
28-
const { dispatch } = this.props;
32+
constructor(props) {
33+
super(props);
34+
const { dispatch } = props;
2935
dispatch(actions.getUserData());
3036
}
3137

38+
componentDidMount() {
39+
notification.open({
40+
placement: 'bottomRight',
41+
duration: null,
42+
message: this.context.intl.formatMessage({ id: 'app.layout.notification.title' }),
43+
description: (
44+
<div>
45+
{this.context.intl.formatMessage({ id: 'app.layout.notification.content1' })}
46+
<a href="https://github.com/ant-design/ant-design-landing/issues" target="_blank"> GitHub issues </a>
47+
{this.context.intl.formatMessage({ id: 'app.layout.notification.content2' })}
48+
</div>
49+
),
50+
});
51+
}
52+
3253
componentDidUpdate() {
3354
if (!this.validateForm && this.props.templateData.data) {
3455
this.props.form.validateFields();

site/edit/zh-CN.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ module.exports = {
127127
'app.login.title': '此页面已加锁,请输入密码。',
128128
'app.login.noPassword': '不知道密码请删除当前面页或新建',
129129
'app.login.new': '新建页面',
130-
130+
'app.layout.notification.title': '3.0 发布说明',
131+
'app.layout.notification.content1': '3.0 已正式发布,由于我们对有些模板做了调整,如果你以前编辑的模板不能显示,请到 ',
132+
'app.layout.notification.content2': '提交你的页面 id 与 JSON 数据。',
131133
},
132134
};

0 commit comments

Comments
 (0)