Skip to content

Commit

Permalink
add release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
jljsj33 committed Aug 21, 2019
1 parent a964e0d commit f7cb2c1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
3 changes: 3 additions & 0 deletions site/edit/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,8 @@ module.exports = {
'app.login.title': 'This page is locked. Please enter your password.',
'app.login.noPassword': 'If you don\'t know the password, please delete current page or create a new page',
'app.login.new': 'New Page',
'app.layout.notification.title': '3.0 Release Notes',
'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 ',
'app.layout.notification.content2': 'submit your page ID and JSON data.',
},
};
27 changes: 24 additions & 3 deletions site/edit/template/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Icon, message, Button, Input, Form } from 'antd';
import PropTypes from 'prop-types';
import { Icon, message, Button, Input, Form, notification } from 'antd';
import { connect } from 'react-redux';
import { FormattedMessage } from 'react-intl';

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

class Layout extends React.PureComponent {
static contextTypes = {
intl: PropTypes.object.isRequired,
};

state = {
loading: false,
}

componentWillMount() {
const { dispatch } = this.props;
constructor(props) {
super(props);
const { dispatch } = props;
dispatch(actions.getUserData());
}

componentDidMount() {
notification.open({
placement: 'bottomRight',
duration: null,
message: this.context.intl.formatMessage({ id: 'app.layout.notification.title' }),
description: (
<div>
{this.context.intl.formatMessage({ id: 'app.layout.notification.content1' })}
<a href="https://github.com/ant-design/ant-design-landing/issues" target="_blank"> GitHub issues </a>
{this.context.intl.formatMessage({ id: 'app.layout.notification.content2' })}
</div>
),
});
}

componentDidUpdate() {
if (!this.validateForm && this.props.templateData.data) {
this.props.form.validateFields();
Expand Down
4 changes: 3 additions & 1 deletion site/edit/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ module.exports = {
'app.login.title': '此页面已加锁,请输入密码。',
'app.login.noPassword': '不知道密码请删除当前面页或新建',
'app.login.new': '新建页面',

'app.layout.notification.title': '3.0 发布说明',
'app.layout.notification.content1': '3.0 已正式发布,由于我们对有些模板做了调整,如果你以前编辑的模板不能显示,请到 ',
'app.layout.notification.content2': '提交你的页面 id 与 JSON 数据。',
},
};

0 comments on commit f7cb2c1

Please sign in to comment.