@capillarytech/creatives-library 3.9.21 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +7 -7
- package/components/TemplatePreview/_templatePreview.scss +20 -287
- package/components/TemplatePreview/index.js +31 -203
- package/components/TemplatePreview/messages.js +0 -21
- package/containers/Assets/Gallery/index.js +59 -53
- package/containers/Cap/index.js +0 -1
- package/index.js +0 -6
- package/package.json +1 -1
- package/routes.js +0 -5
- package/services/getSchema.js +1 -4
- package/translations/en.json +1 -29
- package/translations/zh.json +1 -29
- package/v2Components/FormBuilder/index.js +37 -188
- package/v2Components/FormBuilder/messages.js +0 -16
- package/v2Components/MobilePushPreviewV2/index.js +36 -44
- package/v2Components/MobilePushPreviewV2/messages.js +8 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -64
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +18 -100
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -12
- package/v2Components/TemplatePreview/_templatePreview.scss +4 -24
- package/v2Components/TemplatePreview/index.js +23 -162
- package/v2Components/TemplatePreview/messages.js +0 -8
- package/v2Containers/Assets/Gallery/index.js +48 -54
- package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -87
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -1
- package/v2Containers/CreativesContainer/index.js +2 -58
- package/v2Containers/CreativesContainer/messages.js +2 -2
- package/v2Containers/Email/_email.scss +1 -7
- package/v2Containers/Email/index.js +14 -40
- package/v2Containers/Email/messages.js +0 -4
- package/v2Containers/Email/reducer.js +0 -1
- package/v2Containers/EmailWrapper/index.js +5 -7
- package/v2Containers/Line/Create/_lineCreate.scss +19 -40
- package/v2Containers/Line/Create/actions.js +9 -13
- package/v2Containers/Line/Create/index.js +237 -498
- package/v2Containers/Line/Create/messages.js +2 -42
- package/v2Containers/Line/Create/sagas.js +4 -10
- package/v2Containers/Line/Create/selectors.js +9 -3
- package/v2Containers/MobilePush/Create/index.js +0 -5
- package/v2Containers/MobilePush/Edit/index.js +0 -5
- package/v2Containers/MobilepushWrapper/index.js +1 -4
- package/v2Containers/Sms/Create/index.js +1 -2
- package/v2Containers/Sms/Edit/index.js +0 -2
- package/v2Containers/Templates/_templates.scss +1 -24
- package/v2Containers/Templates/actions.js +0 -7
- package/v2Containers/Templates/constants.js +0 -2
- package/v2Containers/Templates/index.js +15 -118
- package/v2Containers/Templates/messages.js +0 -8
- package/v2Containers/Templates/reducer.js +0 -2
- package/v2Containers/TemplatesV2/index.js +4 -5
- package/v2Containers/TemplatesV2/messages.js +0 -4
- package/assets/IPad.js +0 -23
- package/assets/index.js +0 -1
- package/assets/lineImageTemplate.png +0 -0
- package/components/TemplatePreview/assets/images/HomeScreenAndroid.js +0 -53
- package/components/TemplatePreview/assets/images/SmsMobileAndroid.js +0 -52
- package/components/TemplatePreview/assets/images/SmsMobileIos.js +0 -71
- package/components/TemplatePreview/assets/images/UserIcon.js +0 -24
- package/components/TemplatePreview/assets/images/WechatMobileAndroid.js +0 -53
- package/components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
- package/components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
- package/components/TemplatePreview/assets/images/sms_mobile_android.svg +0 -22
- package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +0 -16
- package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
- package/v2Components/TemplatePreview/assets/images/HomeScreenAndroid.js +0 -53
- package/v2Components/TemplatePreview/assets/images/SmsMobileAndroid.js +0 -52
- package/v2Components/TemplatePreview/assets/images/UserIcon.js +0 -24
- package/v2Components/TemplatePreview/assets/images/WechatHomeScreenAndroid.js +0 -74
- package/v2Components/TemplatePreview/assets/images/WechatMobileAndroid.js +0 -53
- package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
- package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
- package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +0 -22
- package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +0 -21
- package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
- package/v2Containers/Assets/images/CalltaskIllustration.js +0 -71
- package/v2Containers/Assets/images/EmailIllustration.js +0 -87
- package/v2Containers/Assets/images/ImageGalleryIllustration.js +0 -60
- package/v2Containers/Assets/images/PushIllustration.js +0 -60
- package/v2Containers/Assets/images/SmsIllustration.js +0 -191
- package/v2Containers/Assets/images/WechatIllustration.js +0 -90
- package/v2Containers/Assets/images/index.js +0 -6
- package/v2Containers/Line/Create/initialSchema.js +0 -378
- package/v2Containers/Line/CreateWrapper/constants.js +0 -2
- package/v2Containers/Line/CreateWrapper/index.js +0 -117
- package/v2Containers/Line/CreateWrapper/messages.js +0 -55
|
@@ -7,10 +7,16 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { CapButton } from '@capillarytech/cap-ui-library';
|
|
11
|
+
// import styled from 'styled-components';
|
|
12
|
+
|
|
13
|
+
import { FormattedMessage } from 'react-intl';
|
|
14
|
+
import { Button } from 'antd';
|
|
11
15
|
import { get, map, isEmpty} from 'lodash';
|
|
12
16
|
import TemplatePreview from '../TemplatePreview';
|
|
13
17
|
import '../PreviewSideBar/_previewsidebar.scss';
|
|
18
|
+
import messages from './messages';
|
|
19
|
+
const ButtonGroup = Button.Group;
|
|
14
20
|
|
|
15
21
|
class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
16
22
|
constructor(props) {
|
|
@@ -18,11 +24,8 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
|
|
|
18
24
|
this.goToEdit = this.goToEdit.bind(this);
|
|
19
25
|
this.goToDuplicate = this.goToDuplicate.bind(this);
|
|
20
26
|
this.changeDevice = this.changeDevice.bind(this);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.goToDuplicate = this.goToDuplicate.bind(this);
|
|
24
|
-
const hasAndroid = get(props, 'templateData.versions.base.ANDROID') || get(props, 'templateData.androidContent.title');
|
|
25
|
-
const hasIos = get(props, 'templateData.versions.base.IOS') || get(props, 'templateData.iosContent.title');
|
|
27
|
+
const hasAndroid = get(props, 'templateData.versions.base.ANDROID') || get(props, 'templateData.androidContent');
|
|
28
|
+
const hasIos = get(props, 'templateData.versions.base.IOS') || get(props, 'templateData.iosContent');
|
|
26
29
|
let device = "android";
|
|
27
30
|
if (hasAndroid) {
|
|
28
31
|
device = 'android';
|
|
@@ -35,7 +38,7 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
|
|
|
35
38
|
};
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
setContent(templateData, device) {
|
|
41
|
+
setContent = (templateData, device) => {
|
|
39
42
|
const androidContent = get(templateData, 'versions.base.ANDROID') || get(templateData, 'androidContent');
|
|
40
43
|
const iosContent = get(templateData, 'versions.base.IOS') || get(templateData, 'iosContent');
|
|
41
44
|
|
|
@@ -56,21 +59,12 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
|
|
|
56
59
|
}
|
|
57
60
|
return content;
|
|
58
61
|
}
|
|
59
|
-
getPreview(device) {
|
|
60
|
-
return (
|
|
61
|
-
<TemplatePreview
|
|
62
|
-
device={device}
|
|
63
|
-
channel={this.props.channel}
|
|
64
|
-
content={this.state.content || ''}
|
|
65
|
-
templateData={this.props.templateData}
|
|
66
|
-
/>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
62
|
goToDuplicate() {
|
|
70
63
|
this.props.onDuplicateClick(this.props.templateData);
|
|
71
64
|
this.props.handleClose();
|
|
72
65
|
}
|
|
73
|
-
changeDevice(
|
|
66
|
+
changeDevice(ev) {
|
|
67
|
+
const device = ev.target.value;
|
|
74
68
|
const content = this.setContent(this.props.templateData, device);
|
|
75
69
|
this.setState({device, content });
|
|
76
70
|
}
|
|
@@ -78,40 +72,38 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
|
|
|
78
72
|
this.props.onEditClick(e, this.props.templateData._id, this.props.templateData.modeType, path);
|
|
79
73
|
}
|
|
80
74
|
render() {
|
|
81
|
-
const {templateData} = this.props;
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
const
|
|
75
|
+
const {templateData, channel} = this.props;
|
|
76
|
+
|
|
77
|
+
const hasAndroid = get(templateData, 'versions.base.ANDROID') || get(templateData, 'androidContent');
|
|
78
|
+
const hasIos = get(templateData, 'versions.base.IOS') || get(templateData, 'iosContent');
|
|
79
|
+
|
|
80
|
+
const {device, content} = this.state;
|
|
85
81
|
|
|
86
82
|
return (
|
|
83
|
+
|
|
87
84
|
<div>
|
|
88
85
|
<div className="devices">
|
|
89
|
-
{!isEmpty(templateData) &&
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
content: this.getPreview('android'),
|
|
95
|
-
tab: <CapIcon type="android" size="m" />,
|
|
96
|
-
key: 'android',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
content: this.getPreview('iphone'),
|
|
100
|
-
tab: <CapIcon type="ios" size="m" />,
|
|
101
|
-
key: 'iphone',
|
|
102
|
-
},
|
|
103
|
-
]}
|
|
104
|
-
onChange={(activeKey) => this.changeDevice(activeKey)}
|
|
105
|
-
tabBarStyle={{margin: 'auto', width: '38%'}}
|
|
106
|
-
/>
|
|
107
|
-
) : (
|
|
108
|
-
(hasAndroid || hasIos) && this.getPreview(hasAndroid ? 'android' : 'ios')
|
|
109
|
-
))
|
|
110
|
-
}
|
|
86
|
+
{!isEmpty(templateData) && hasAndroid && hasIos &&
|
|
87
|
+
<ButtonGroup onClick={this.changeDevice}>
|
|
88
|
+
<CapButton type={device === "android" ? "primary" : "secondary"} value={"android"}><FormattedMessage {...messages.android} /></CapButton>
|
|
89
|
+
<CapButton type={device === "iphone" ? "primary" : "secondary"} value={"iphone"}><FormattedMessage {...messages.ios} /></CapButton>
|
|
90
|
+
</ButtonGroup>}
|
|
111
91
|
</div>
|
|
92
|
+
<TemplatePreview
|
|
93
|
+
device={device === "android" ? "android" : "iphone"}
|
|
94
|
+
channel={channel}
|
|
95
|
+
content={content || ''}
|
|
96
|
+
templateData={templateData}
|
|
97
|
+
>
|
|
98
|
+
</TemplatePreview>
|
|
99
|
+
|
|
100
|
+
|
|
112
101
|
</div>
|
|
102
|
+
|
|
103
|
+
|
|
113
104
|
);
|
|
114
105
|
}
|
|
106
|
+
|
|
115
107
|
}
|
|
116
108
|
|
|
117
109
|
MobilePushPreviewV2.propTypes = {
|
|
@@ -10,4 +10,12 @@ export default defineMessages({
|
|
|
10
10
|
id: 'creatives.componentsv2.MobilePushPreviewV2.header',
|
|
11
11
|
defaultMessage: 'This is the MobilePushPreviewV2 component !',
|
|
12
12
|
},
|
|
13
|
+
android: {
|
|
14
|
+
id: 'creatives.componentsv2.MobilePushPreviewV2.android',
|
|
15
|
+
defaultMessage: 'Android',
|
|
16
|
+
},
|
|
17
|
+
ios: {
|
|
18
|
+
id: 'creatives.componentsv2.MobilePushPreviewV2.ios',
|
|
19
|
+
defaultMessage: 'IOS',
|
|
20
|
+
},
|
|
13
21
|
});
|
|
@@ -1,69 +1,5 @@
|
|
|
1
1
|
@import '~@capillarytech/cap-ui-library/styles/_variables.scss';
|
|
2
2
|
|
|
3
|
-
.shell-lock-screen-android .main-screen-preview .wechatMsgContainer{
|
|
4
|
-
position: absolute;
|
|
5
|
-
left: 53.5%;
|
|
6
|
-
top:28%;
|
|
7
|
-
background: white;
|
|
8
|
-
width: 19.5%;
|
|
9
|
-
text-align: left;
|
|
10
|
-
height: fit-content;
|
|
11
|
-
border-radius: 0.285rem;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.shell-lock-screen-android .lock-screen-preview{
|
|
15
|
-
.wechat-android-sender-id{
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 46%;
|
|
18
|
-
font-size: 10px;
|
|
19
|
-
left: 28%;
|
|
20
|
-
}
|
|
21
|
-
.wechat-android-title{
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 49%;
|
|
24
|
-
font-size: 10px;
|
|
25
|
-
left: 28%;
|
|
26
|
-
color: #5e6c84;
|
|
27
|
-
}
|
|
28
|
-
.wechat-android-action-buttons{
|
|
29
|
-
position: absolute;
|
|
30
|
-
left: 28%;
|
|
31
|
-
top: 53%;
|
|
32
|
-
font-size: 10px;
|
|
33
|
-
color: #3861ca;
|
|
34
|
-
font-weight: 500;
|
|
35
|
-
}
|
|
36
|
-
.wechat-ios-sender-id{
|
|
37
|
-
position: absolute;
|
|
38
|
-
top: 44%;
|
|
39
|
-
font-size: 10px;
|
|
40
|
-
left: 28.5%;
|
|
41
|
-
}
|
|
42
|
-
.wechat-ios-title{
|
|
43
|
-
position: absolute;
|
|
44
|
-
top: 47%;
|
|
45
|
-
font-size: 10px;
|
|
46
|
-
left: 28.5%;
|
|
47
|
-
color: #5e6c84;
|
|
48
|
-
}
|
|
49
|
-
.wechat-ios-action-reply{
|
|
50
|
-
position: absolute;
|
|
51
|
-
left: 35%;
|
|
52
|
-
top: 59%;
|
|
53
|
-
font-size: 12px;
|
|
54
|
-
color: #3861ca;
|
|
55
|
-
font-weight: 500;
|
|
56
|
-
}
|
|
57
|
-
.wechat-ios-action-cancel{
|
|
58
|
-
position: absolute;
|
|
59
|
-
left: 34.5%;
|
|
60
|
-
top: 66%;
|
|
61
|
-
font-size: 12px;
|
|
62
|
-
color: #3861ca;
|
|
63
|
-
font-weight: 500;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
3
|
.wechatMsgContainer{
|
|
68
4
|
position: absolute;
|
|
69
5
|
left: 30%;
|
|
@@ -8,14 +8,13 @@ import React from 'react';
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
// import { connect } from 'react-redux';
|
|
10
10
|
import { CapRow, CapColumn, CapButton } from '@capillarytech/cap-react-ui-library/';
|
|
11
|
-
import { CapHeading, CapLabel
|
|
11
|
+
import { CapHeading, CapLabel } from '@capillarytech/cap-ui-library/';
|
|
12
12
|
import { FormattedMessage } from 'react-intl';
|
|
13
13
|
import _ from 'lodash';
|
|
14
14
|
import './_wechatRichmediaTemplatePrev.scss';
|
|
15
15
|
import messages from './messages';
|
|
16
|
-
const wechatBody = require('./../assets/images/
|
|
17
|
-
|
|
18
|
-
const wechatLockScreenIos = require('./../assets/images/home-screen-ios.svg');
|
|
16
|
+
const wechatBody = require('./../assets/images/WECHAT_5x.png');
|
|
17
|
+
|
|
19
18
|
class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
|
|
20
19
|
preparePreviewData = (mediaList) => {
|
|
21
20
|
const previewMsg = [];
|
|
@@ -24,7 +23,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
|
|
|
24
23
|
const contentData = content[0];
|
|
25
24
|
previewMsg.push(
|
|
26
25
|
<div className="richmedia-image-container">
|
|
27
|
-
<
|
|
26
|
+
<img alt="default" width="100%" height="102px" src={contentData.image_url} />
|
|
28
27
|
{mediaListLength !== 1 && (
|
|
29
28
|
<div className="name-container">
|
|
30
29
|
<CapHeading type="h4" style={{color: "white"}}>{contentData.title}</CapHeading>
|
|
@@ -44,7 +43,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
|
|
|
44
43
|
previewMsg.push(
|
|
45
44
|
<div className="additional-richmedia-container">
|
|
46
45
|
<div><CapLabel type="label9" style={{width: '170px', top: '12px', position: 'relative'}}>{data.title}</CapLabel></div>
|
|
47
|
-
<
|
|
46
|
+
<img alt="default" width="34px" height="34px" src={data.image_url} />
|
|
48
47
|
</div>
|
|
49
48
|
);
|
|
50
49
|
});
|
|
@@ -62,7 +61,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
|
|
|
62
61
|
returnObj.push(
|
|
63
62
|
<div style={{ width: "100%", height: 116, position: "relative" }}>
|
|
64
63
|
<CapRow>
|
|
65
|
-
<
|
|
64
|
+
<img alt="default" width="100%" height="110px" src={contentData.image_url} />
|
|
66
65
|
<div className="preview-overflow-wrap-fields" style={{ position: "absolute", bottom: "5%", left: "10%", width: "auto" }}>{contentData.title ? contentData.title : ""}</div>
|
|
67
66
|
</CapRow>
|
|
68
67
|
{Object.keys(mediaList).length === 1 ?
|
|
@@ -81,7 +80,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
|
|
|
81
80
|
{contentData.title}
|
|
82
81
|
</CapColumn>
|
|
83
82
|
<CapColumn style={{ float: "right" }}>
|
|
84
|
-
<
|
|
83
|
+
<img alt="default" width="60px" height="60px" src={contentData.image_url}/>
|
|
85
84
|
</CapColumn>
|
|
86
85
|
</CapRow>
|
|
87
86
|
);
|
|
@@ -92,102 +91,21 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
|
|
|
92
91
|
goToEdit(e, path) {
|
|
93
92
|
this.props.onEditClick(e, this.props.templateId, this.props.modeType, path);
|
|
94
93
|
}
|
|
95
|
-
getWechatRichMediaAndroidPreview = (content) => (
|
|
96
|
-
<div className="preview-container">
|
|
97
|
-
<div className="shell-lock-screen-android align-center">
|
|
98
|
-
<div className="lock-screen-preview">
|
|
99
|
-
<CapImage className="preview-image" src={wechatLockScreenAndroid} alt="Preview is being generated"/>
|
|
100
|
-
<div className="wechat-android-sender-id">
|
|
101
|
-
Muji India
|
|
102
|
-
</div>
|
|
103
|
-
<div className="wechat-android-title">
|
|
104
|
-
{content[0].title}
|
|
105
|
-
</div>
|
|
106
|
-
<div className="wechat-android-action-buttons">
|
|
107
|
-
<FormattedMessage {...messages.MarkAsRead} /> <FormattedMessage {...messages.reply} />
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<div className="main-screen-preview">
|
|
111
|
-
<CapImage className="preview-image" src={wechatBody} alt="Preview is being generated"/>
|
|
112
|
-
<div className={this.props.type === 'embedded' ? "wechatMsgContainerOutbound" : "wechatMsgContainer"}>
|
|
113
|
-
<div className={this.props.type === 'embedded' ? "overflow-handle-preview-outbound" : "overflow-handle-preview"}>
|
|
114
|
-
{this.preparePreviewData(content)}
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
getWechatRIchMediaIosPreview = (content) => (
|
|
123
|
-
<div className="preview-container">
|
|
124
|
-
<div className="shell-lock-screen-android align-center">
|
|
125
|
-
<div className="lock-screen-preview">
|
|
126
|
-
<CapImage className="preview-image" src={wechatLockScreenIos} alt="Preview is being generated"/>
|
|
127
|
-
<div className="wechat-ios-sender-id">
|
|
128
|
-
Muji India
|
|
129
|
-
</div>
|
|
130
|
-
<div className="wechat-ios-title">
|
|
131
|
-
{content[0].title}
|
|
132
|
-
</div>
|
|
133
|
-
<div className="wechat-ios-action-reply">
|
|
134
|
-
<FormattedMessage {...messages.reply} />
|
|
135
|
-
</div>
|
|
136
|
-
<div className="wechat-ios-action-cancel">
|
|
137
|
-
<FormattedMessage {...messages.cancel} />
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
<div className="main-screen-preview">
|
|
141
|
-
<CapImage className="preview-image" src={wechatBody} alt="Preview is being generated"/>
|
|
142
|
-
<div className={this.props.type === 'embedded' ? "wechatMsgContainerOutbound" : "wechatMsgContainer"}>
|
|
143
|
-
<div className={this.props.type === 'embedded' ? "overflow-handle-preview-outbound" : "overflow-handle-preview"}>
|
|
144
|
-
{this.preparePreviewData(content)}
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
getContentForSlidebox = (content) => {
|
|
153
|
-
return (
|
|
154
|
-
!this.props.showLockScreenPreview ? (
|
|
155
|
-
<div className={`preview-container ${this.props.type === 'embedded' ? 'embedded-preview' : ''}`}>
|
|
156
|
-
<div className="shell align-center" id="sms-preview">
|
|
157
|
-
<CapImage className="preview-image" src={wechatBody} alt="Preview is being generated"/>
|
|
158
|
-
<div className={this.props.type === 'embedded' ? "wechatMsgContainerOutbound" : "wechatMsgContainer"}>
|
|
159
|
-
<div className={this.props.type === 'embedded' ? "overflow-handle-preview-outbound" : "overflow-handle-preview"}>
|
|
160
|
-
{this.preparePreviewData(this.props.content)}
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
{this.props.showEdit ? <CapButton onClick={(e) => this.goToEdit(e, this.props.path)} className="preview-buttons" type="primary">{this.props.type === 'embedded' ? <FormattedMessage {...messages.select} /> : <FormattedMessage {...messages.edit} /> }</CapButton> : ""}
|
|
165
|
-
</div>
|
|
166
|
-
) : (
|
|
167
|
-
<CapTab
|
|
168
|
-
panes={[
|
|
169
|
-
{
|
|
170
|
-
content: this.getWechatRichMediaAndroidPreview(this.props.content),
|
|
171
|
-
tab: <CapIcon type="android" size='m' />,
|
|
172
|
-
key: 'android',
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
content: this.getWechatRIchMediaIosPreview(this.props.content),
|
|
176
|
-
tab: <CapIcon type="ios" size='m' />,
|
|
177
|
-
key: 'ios',
|
|
178
|
-
},
|
|
179
|
-
]}
|
|
180
|
-
tabBarStyle={{margin: 'auto', width: '14%'}}
|
|
181
|
-
/>
|
|
182
|
-
)
|
|
183
|
-
);
|
|
184
|
-
};
|
|
185
|
-
|
|
186
94
|
render() {
|
|
187
95
|
return (
|
|
188
96
|
<div>
|
|
189
97
|
{this.props.contentForSlideBox ?
|
|
190
|
-
this.
|
|
98
|
+
<div className={`preview-container ${this.props.type === 'embedded' ? 'embedded-preview' : ''}`}>
|
|
99
|
+
<div className="shell align-center" id="sms-preview">
|
|
100
|
+
<img className="preview-image" src={wechatBody} alt="Preview is being generated"/>
|
|
101
|
+
<div className={this.props.type === 'embedded' ? "wechatMsgContainerOutbound" : "wechatMsgContainer"}>
|
|
102
|
+
<div className={this.props.type === 'embedded' ? "overflow-handle-preview-outbound" : "overflow-handle-preview"}>
|
|
103
|
+
{this.preparePreviewData(this.props.content)}
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
{this.props.showEdit ? <CapButton onClick={(e) => this.goToEdit(e, this.props.path)} className="preview-buttons" type="primary">{this.props.type === 'embedded' ? <FormattedMessage {...messages.select} /> : <FormattedMessage {...messages.edit} /> }</CapButton> : ""}
|
|
108
|
+
</div>
|
|
191
109
|
:
|
|
192
110
|
<div className={`preview-container ${this.props.type === 'embedded' ? 'embedded-preview' : ''}`}>
|
|
193
111
|
<div className="shell align-center" id="sms-preview">
|
|
@@ -18,16 +18,4 @@ export default defineMessages({
|
|
|
18
18
|
id: 'creatives.components.WechatRichmediaTemplatePreview.edit',
|
|
19
19
|
defaultMessage: 'Edit',
|
|
20
20
|
},
|
|
21
|
-
MarkAsRead: {
|
|
22
|
-
id: 'creatives.components.WechatRichmediaTemplatePreview.MarkAsRead',
|
|
23
|
-
defaultMessage: 'Mark as read',
|
|
24
|
-
},
|
|
25
|
-
reply: {
|
|
26
|
-
id: 'creatives.components.WechatRichmediaTemplatePreview.reply',
|
|
27
|
-
defaultMessage: 'Reply',
|
|
28
|
-
},
|
|
29
|
-
cancel: {
|
|
30
|
-
id: 'creatives.components.WechatRichmediaTemplatePreview.cancel',
|
|
31
|
-
defaultMessage: 'Cancel',
|
|
32
|
-
},
|
|
33
21
|
});
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.shell-v2 {
|
|
1
|
+
.shell {
|
|
4
2
|
position: relative;
|
|
5
3
|
-webkit-transform: translate(-50%);
|
|
6
4
|
transform: translate(-50%);
|
|
@@ -17,8 +15,8 @@
|
|
|
17
15
|
|
|
18
16
|
.msgContainer {
|
|
19
17
|
position: absolute;
|
|
20
|
-
top:
|
|
21
|
-
left:
|
|
18
|
+
top: 18%;
|
|
19
|
+
left: 28.8%;
|
|
22
20
|
width: 42%;
|
|
23
21
|
height: 336px;
|
|
24
22
|
display: -webkit-box;
|
|
@@ -39,18 +37,6 @@
|
|
|
39
37
|
left: 14px;
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
|
-
&.wechat{
|
|
43
|
-
width: 52%;
|
|
44
|
-
}
|
|
45
|
-
&.line-preview {
|
|
46
|
-
margin-left: $CAP_SPACE_16;
|
|
47
|
-
|
|
48
|
-
.message-pop {
|
|
49
|
-
width: 80%;
|
|
50
|
-
left: 36px;
|
|
51
|
-
margin-top: -6px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
40
|
|
|
55
41
|
.message-pop{
|
|
56
42
|
.unicode-disabled{
|
|
@@ -68,7 +54,7 @@
|
|
|
68
54
|
line-height: 14px;
|
|
69
55
|
padding: 0 8px 8px 8px;
|
|
70
56
|
font-size: 10px;
|
|
71
|
-
width:
|
|
57
|
+
width: 80%;
|
|
72
58
|
font-family: 'open-sans';
|
|
73
59
|
.message-pop-item{
|
|
74
60
|
padding: 4px;
|
|
@@ -373,9 +359,3 @@
|
|
|
373
359
|
font-size: 12px;
|
|
374
360
|
}
|
|
375
361
|
}
|
|
376
|
-
|
|
377
|
-
.test-and-preview-container{
|
|
378
|
-
display: flex;
|
|
379
|
-
margin-top: -12px;
|
|
380
|
-
margin-bottom: 12px;
|
|
381
|
-
}
|