Skip video if already seen

[MAILPOET-1447]
This commit is contained in:
Pavel Dohnal
2018-08-14 15:55:06 +02:00
parent 03a452acfa
commit 1f88e56f1e
2 changed files with 6 additions and 2 deletions

View File

@ -18,15 +18,18 @@ const renderBreadcrumb = (newsletterType) => {
function displayTutorial() {
const key = `user_seen_editor_tutorial${window.config.currentUserId}`;
if (window.config.dragDemoUrlSettings) {
return;
}
MailPoet.Modal.popup({
title: MailPoet.I18n.t('tutorialVideoTitle'),
template: '<video style="height:640px;" src=' + window.config.dragDemoUrl + ' controls autoplay></video>',
template: `<video style="height:640px;" src="${window.config.dragDemoUrl}" controls autoplay></video>`,
onCancel: () => {
MailPoet.Ajax.post({
api_version: window.mailpoet_api_version,
endpoint: 'settings',
action: 'set',
data: {[key]: 1},
data: { [key]: 1 },
});
},
});