2019-01-22 08:55:35 +00:00
|
|
|
module.exports = {
|
|
|
|
name: 'email-footer',
|
2019-01-23 08:33:58 +00:00
|
|
|
asyncData(ctx) {
|
2019-01-22 08:55:35 +00:00
|
|
|
return {
|
|
|
|
isPreview: ctx.method === 'GET',
|
|
|
|
};
|
|
|
|
},
|
|
|
|
created() {
|
2019-02-05 06:58:05 +00:00
|
|
|
if (this.locale)
|
|
|
|
this.$i18n.locale = this.locale;
|
|
|
|
|
2019-01-22 08:55:35 +00:00
|
|
|
const embeded = [];
|
2019-01-23 08:33:58 +00:00
|
|
|
this.files.map(file => {
|
2019-01-28 11:28:22 +00:00
|
|
|
const src = this.isPreview ? `/api/${file}` : `cid:${file}`;
|
2019-01-23 08:33:58 +00:00
|
|
|
embeded[file] = src;
|
2019-01-22 08:55:35 +00:00
|
|
|
});
|
|
|
|
this.embeded = embeded;
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2019-01-23 08:33:58 +00:00
|
|
|
files: [
|
2019-01-29 14:04:38 +00:00
|
|
|
/* '/assets/images/action.png',
|
|
|
|
'/assets/images/info.png', */
|
2019-01-22 08:55:35 +00:00
|
|
|
'/assets/images/facebook.png',
|
|
|
|
'/assets/images/twitter.png',
|
|
|
|
'/assets/images/youtube.png',
|
|
|
|
'/assets/images/pinterest.png',
|
|
|
|
'/assets/images/instagram.png',
|
|
|
|
'/assets/images/linkedin.png',
|
|
|
|
],
|
|
|
|
};
|
|
|
|
},
|
2019-02-05 06:58:05 +00:00
|
|
|
props: ['locale']
|
2019-01-22 08:55:35 +00:00
|
|
|
};
|