Skip to content

Commit 259a074

Browse files
committed
update history and editor-list, #156
1 parent 074c1a4 commit 259a074

File tree

7 files changed

+23
-21
lines changed

7 files changed

+23
-21
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "landing",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"title": "Landing Pages",
55
"description": "site of Landing Pages",
66
"homepage": "http://landing.ant.design/",

site/edit/en-US.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ module.exports = {
123123
'app.login.title': 'This page is locked. Please enter your password.',
124124
'app.login.noPassword': 'If you don\'t know the password, please delete current page or create a new page',
125125
'app.login.new': 'New Page',
126-
'app.layout.notification.title': '3.0 Release Notes',
127-
'app.layout.notification.content': '3.0 has been officially released. As we have made some adjustments to some templates, if your previously edited templates can not be displayed, please re-edit the new page.',
126+
'app.layout.notification.title': 'Editor update description',
127+
'app.layout.notification.content': 'In order to improve the performance and experience of editing, the style editing is currently triggered by pressing enter or leaving the input box.',
128128
},
129129
};

site/edit/template/components/ListComponents/EditorComp.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let funcData = {};
2020
const { ClassName, State, Layout, Font, BackGround, Border, Interface, Margin, Shadow, Transition } = EditorList;
2121
class EditorComp extends React.Component {
2222
onChange = (cb) => {
23-
const { cssName, currentEditCssString } = cb;
23+
const { cssName, currentEditCssString, isDrag } = cb;
2424
const { currentEditData, dispatch, templateData } = this.props;
2525
const { id } = currentEditData;
2626
const ids = id.split('-');
@@ -43,6 +43,7 @@ class EditorComp extends React.Component {
4343
};
4444
newTemplateData.data.style = (newTemplateData.data.style || []).filter(c => c.id !== cb.id);
4545
newTemplateData.data.style.push(data);
46+
newTemplateData.noHistory = isDrag;
4647
dispatch(actions.setTemplateData(newTemplateData));
4748
}
4849

site/edit/template/components/NavController/HistoryButton.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ class HistoryButton extends React.Component {
6464
const redoClassName = classnames('redo', {
6565
disabled: !currentHistory,
6666
});
67-
console.log(this.props);
6867
return (
6968
<ul className="history-button-wrapper">
7069
<li className={undoClassName}>

site/edit/template/layout.jsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Icon, message, Button, Input, Form } from 'antd';
2+
import { Icon, message, Button, Input, Form, notification } from 'antd';
33
import { connect } from 'react-redux';
44
import { FormattedMessage, injectIntl } from 'react-intl';
55

@@ -31,16 +31,20 @@ class Layout extends React.PureComponent {
3131
}
3232

3333
componentDidMount() {
34-
/* notification.open({
35-
placement: 'bottomRight',
36-
duration: null,
37-
message: this.props.intl.formatMessage({ id: 'app.layout.notification.title' }),
38-
description: (
39-
<div>
40-
{this.props.intl.formatMessage({ id: 'app.layout.notification.content' })}
41-
</div>
42-
),
43-
}); */
34+
const date = new Date();
35+
const endDate = new Date('2019/11/29 23:59:59');
36+
if (endDate.getTime() - date.getTime() > 0) {
37+
notification.open({
38+
placement: 'bottomRight',
39+
duration: 10000,
40+
message: this.props.intl.formatMessage({ id: 'app.layout.notification.title' }),
41+
description: (
42+
<div>
43+
{this.props.intl.formatMessage({ id: 'app.layout.notification.content' })}
44+
</div>
45+
),
46+
});
47+
}
4448
}
4549

4650
componentDidUpdate() {

site/edit/zh-CN.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports = {
124124
'app.login.title': '此页面已加锁,请输入密码。',
125125
'app.login.noPassword': '不知道密码请删除当前面页或新建',
126126
'app.login.new': '新建页面',
127-
'app.layout.notification.title': '3.0 发布说明',
128-
'app.layout.notification.content': '3.0 已正式发布,由于我们对有些模板做了调整,如果你以前编辑的模板不能显示,请新建页面重新编辑。',
127+
'app.layout.notification.title': '编辑器功能更新说明',
128+
'app.layout.notification.content': '为提高编辑时的性能与体验,目前将样式编辑调整为按回车或离开输入框才触发。',
129129
},
130130
};

site/shared/redux/saga.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ function* handleSetTemplateData(action) {
144144
const { data: { uid: id, data: attributes, noHistory } } = action;
145145
const data = { id, attributes, noHistory };
146146
saveTemplateToLocalStorage(DEFAULT_USER_NAME, data);
147-
console.log(noHistory);
148147
yield put({
149148
type: UPDATE_HISTORY,
150149
data,
@@ -182,8 +181,7 @@ function* handleSetUserAndTemplateData(action) {
182181
});
183182
}
184183

185-
function* handleUpdateHistory(action, state) {
186-
console.log(action, state);
184+
function* handleUpdateHistory(action) {
187185
const { data: template } = action;
188186
const { noHistory } = template;
189187
if (!noHistory) {

0 commit comments

Comments
 (0)