Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EX-9657: Ghostery custom UI for rewards #521

Merged
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Next

EX-9657: custom ghostery ui for rewards

  • Loading branch information
Aleksandr Panin
Aleksandr Panin committed Apr 14, 2020
commit eea61b0f1477c2990ef5dada26796c3aa00d8bbb
@@ -2063,9 +2063,6 @@
"myoffrz_turnoff_rewards": {
"message": "Turn off Ghostery Rewards"
},
"OFFERS_ALREADY_TRANSLATED": {
"message": ""
},
"myoffrz_help": {
"message": "Help"
},
@@ -2144,6 +2141,18 @@
}
}
},
"myoffrz_check_conditions": {
"message": "Check the following conditions"
},
"myoffrz_redeem_code": {
"message": "Redeem code"
},
"myoffrz_voucher_found": {
"message": "Voucher found"
},
"myoffrz_redeeming_voucher": {
"message": "Redeeming voucher"
},
"OFFERS_ENDS": {
"message": ""
},
@@ -95,7 +95,7 @@ class Rewards extends React.Component {
sendToIframe(message) {
if (!this.iframe.current) { return; }
this.iframe.current.contentWindow.postMessage(JSON.stringify({
target: 'cliqz-offers-cc',
target: 'cliqz-offers-templates',
origin: 'window',
message,
}), '*');
@@ -130,7 +130,7 @@ class Rewards extends React.Component {
return;
}

if (target !== 'cliqz-offers-cc') { return; }
if (target !== 'cliqz-offers-templates') { return; }
if (message.action === 'resize') {
this.iframeResize(message.data);
} else {
@@ -263,7 +263,7 @@ class Rewards extends React.Component {
} = this.state;
if (shouldHideRewards) { return this.renderRewardsNoneFoundText(); }

const src = chrome.runtime.getURL('cliqz/offers-cc/index.html?cross-origin');
const src = chrome.runtime.getURL('cliqz/offers-templates/control-center.html?cross-origin');
const text = t(`panel_rewards_view__reward${rewardsCount === 1 ? '' : 's'}`);
return (
<>
@@ -99,8 +99,8 @@
"web_accessible_resources": [
"app/images/*",
"dist/css/rewards_styles.css",
"cliqz/offers-cc/index.html",
"cliqz/offers-reminder/index.html",
"cliqz/popup-notification/images/*"
"cliqz/offers-templates/reminder.html",
"cliqz/offers-templates/checkout.html",
"cliqz/offers-templates/control-center.html"
]
}
@@ -1226,7 +1226,8 @@ offers.on('enabled', () => {
if (DEBUG) {
offers.action('setConfiguration', {
config_location: 'de',
triggersBE: 'https://offers-api-staging-myo.myoffrz.ninja',
// triggersBE: 'https://offers-api-staging-myo.myoffrz.ninja',
triggersBE: 'https://offers-api.ghostery.net',
showConsoleLogs: true,
offersLogsEnabled: true,
offersDevFlag: true,
ProTip! Use n and p to navigate between commits in a pull request.