From 9d4beadf8c8ddddf0a22324b59e9f712a730012d Mon Sep 17 00:00:00 2001 From: Furkan Yilmaz Date: Fri, 31 Mar 2017 18:02:32 +0100 Subject: [PATCH 1/5] PI-1033 more under stable message to users --- lang/en.js | 2 +- src/constants/UrlPaths.js | 1 + src/containers/WaitForSettings/WaitForSettings.js | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lang/en.js b/lang/en.js index 386e69d..2f73009 100644 --- a/lang/en.js +++ b/lang/en.js @@ -230,7 +230,7 @@ "constants.plans.pro": "Pro plan", "constants.plans.biz": "Business plan", "constants.plans.ent": "Enterprise plan", - "errors.noActiveZoneSelected": "Please select a domain that is provisioned with Cloudflare.", + "errors.noActiveZoneSelected": "Please continue to {link} to set up this domain.", "warning.usingSubdomain": "You are using a subdomain for your site, but any Cloudflare settings applied via this plugin will be applied to your original domain as well.", "warning.developmentmode": "Development mode enabled, all traffic will bypass the Cloudflare cache.", "utils.utils.lastmodifieddate": "This settings was last changed {date}" diff --git a/src/constants/UrlPaths.js b/src/constants/UrlPaths.js index 1de5849..30ac3ab 100644 --- a/src/constants/UrlPaths.js +++ b/src/constants/UrlPaths.js @@ -13,3 +13,4 @@ export const SUPPORT_PAGE = 'https://support.cloudflare.com/hc/en-us/'; export const TERMS_AND_CONDITIONS_PAGE = 'https://www.cloudflare.com/terms'; export const PRIVACY_POLICY_PAGE = 'https://www.cloudflare.com/security-policy'; export const CLOUDFLARE_ACCOUNT_PAGE = 'https://www.cloudflare.com/a/account/my-account'; +export const CLOUDFLARE_ADD_SITE_PAGE = 'https://www.cloudflare.com/a/add-site'; diff --git a/src/containers/WaitForSettings/WaitForSettings.js b/src/containers/WaitForSettings/WaitForSettings.js index 5538222..fbfe63d 100644 --- a/src/containers/WaitForSettings/WaitForSettings.js +++ b/src/containers/WaitForSettings/WaitForSettings.js @@ -7,6 +7,7 @@ import { getPluginSettingsForZoneId } from '../../selectors/pluginSettings'; import { FormattedMessage, injectIntl } from 'react-intl'; import { getZoneAnalyticsForZoneId } from '../../selectors/zoneAnalytics'; import { getAllZoneSettingsForZoneId } from '../../selectors/zoneSettings'; +import { CLOUDFLARE_ADD_SITE_PAGE } from '../../constants/UrlPaths.js'; class WaitForSettings extends Component { render() { @@ -17,6 +18,7 @@ class WaitForSettings extends Component { zoneAnalytics } = this.props; let { settings, pluginSettings, analytics } = this.props; + const { formatMessage } = this.props.intl; let isSettingsLoaded = true; let isPluginSettingsLoaded = true; @@ -49,6 +51,9 @@ class WaitForSettings extends Component { isPluginSettingsLoaded && isAnalyticsLoaded; + // prettier-ignore + let link = (Cloudflare) ; + return (
{!isEverythingLoaded && @@ -57,7 +62,10 @@ class WaitForSettings extends Component { {!isEverythingLoaded && !isZoneOnCloudflare && - + } {isEverythingLoaded && isZoneOnCloudflare && this.props.children}
From 6679fc17794aeb82aa618baaaef873434adc7939 Mon Sep 17 00:00:00 2001 From: Furkan Yilmaz Date: Fri, 31 Mar 2017 18:04:46 +0100 Subject: [PATCH 2/5] PI-1033 delete prettier-ignore --- src/containers/WaitForSettings/WaitForSettings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/containers/WaitForSettings/WaitForSettings.js b/src/containers/WaitForSettings/WaitForSettings.js index fbfe63d..ba52f27 100644 --- a/src/containers/WaitForSettings/WaitForSettings.js +++ b/src/containers/WaitForSettings/WaitForSettings.js @@ -51,8 +51,9 @@ class WaitForSettings extends Component { isPluginSettingsLoaded && isAnalyticsLoaded; - // prettier-ignore - let link = (Cloudflare) ; + let link = ( + Cloudflare + ); return (
From a01288c2b1e6c0feb3d9ddc5569c66f41c6a8f0a Mon Sep 17 00:00:00 2001 From: Furkan Yilmaz Date: Fri, 31 Mar 2017 18:14:34 +0100 Subject: [PATCH 3/5] PI-1033 Updated to a better text than before --- lang/en.js | 2 +- src/containers/WaitForSettings/WaitForSettings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/en.js b/lang/en.js index 2f73009..2b89d20 100644 --- a/lang/en.js +++ b/lang/en.js @@ -230,7 +230,7 @@ "constants.plans.pro": "Pro plan", "constants.plans.biz": "Business plan", "constants.plans.ent": "Enterprise plan", - "errors.noActiveZoneSelected": "Please continue to {link} to set up this domain.", + "errors.noActiveZoneSelected": "It looks like {domain} isn't provisioned with Cloudflare. Please continue to {link} to provision this domain.", "warning.usingSubdomain": "You are using a subdomain for your site, but any Cloudflare settings applied via this plugin will be applied to your original domain as well.", "warning.developmentmode": "Development mode enabled, all traffic will bypass the Cloudflare cache.", "utils.utils.lastmodifieddate": "This settings was last changed {date}" diff --git a/src/containers/WaitForSettings/WaitForSettings.js b/src/containers/WaitForSettings/WaitForSettings.js index ba52f27..3737698 100644 --- a/src/containers/WaitForSettings/WaitForSettings.js +++ b/src/containers/WaitForSettings/WaitForSettings.js @@ -65,7 +65,7 @@ class WaitForSettings extends Component { } {isEverythingLoaded && isZoneOnCloudflare && this.props.children} From 40db1bd7a0f708bf20bed95916b790011108d667 Mon Sep 17 00:00:00 2001 From: Furkan Yilmaz Date: Fri, 31 Mar 2017 19:25:33 +0100 Subject: [PATCH 4/5] PI-1033 made it message more integration friendly --- .../WaitForSettings/WaitForSettings.js | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/containers/WaitForSettings/WaitForSettings.js b/src/containers/WaitForSettings/WaitForSettings.js index 3737698..e240731 100644 --- a/src/containers/WaitForSettings/WaitForSettings.js +++ b/src/containers/WaitForSettings/WaitForSettings.js @@ -7,17 +7,31 @@ import { getPluginSettingsForZoneId } from '../../selectors/pluginSettings'; import { FormattedMessage, injectIntl } from 'react-intl'; import { getZoneAnalyticsForZoneId } from '../../selectors/zoneAnalytics'; import { getAllZoneSettingsForZoneId } from '../../selectors/zoneSettings'; -import { CLOUDFLARE_ADD_SITE_PAGE } from '../../constants/UrlPaths.js'; +import { isDNSPageEnabled } from '../../selectors/config'; +import { push } from 'react-router-redux'; +import { Link } from 'react-router'; +import { + CLOUDFLARE_ADD_SITE_PAGE, + DOMAINS_OVERVIEW_PAGE +} from '../../constants/UrlPaths.js'; class WaitForSettings extends Component { + handleClick(path) { + let { dispatch } = this.props; + dispatch(push(path)); + } + render() { let { activeZone, zoneSettings, zonePluginSettings, - zoneAnalytics + zoneAnalytics, + settings, + pluginSettings, + analytics, + config } = this.props; - let { settings, pluginSettings, analytics } = this.props; const { formatMessage } = this.props.intl; let isSettingsLoaded = true; @@ -51,9 +65,16 @@ class WaitForSettings extends Component { isPluginSettingsLoaded && isAnalyticsLoaded; - let link = ( - Cloudflare + var link = ( + Cloudflare ); + if (isDNSPageEnabled(config)) { + link = ( + this.handleClick(DOMAINS_OVERVIEW_PAGE)}> + + + ); + } return (
@@ -85,7 +106,8 @@ function mapStateToProps(state) { activeZone: state.activeZone, zoneSettings: state.zoneSettings, zonePluginSettings: state.pluginSettings, - zoneAnalytics: state.zoneAnalytics + zoneAnalytics: state.zoneAnalytics, + config: state.config }; } export default injectIntl(connect(mapStateToProps)(WaitForSettings)); From 113c319730c333791a4b5c0abf50a569749df585 Mon Sep 17 00:00:00 2001 From: Furkan Yilmaz Date: Fri, 31 Mar 2017 19:47:03 +0100 Subject: [PATCH 5/5] =?UTF-8?q?PI-1033=20Another=20update=20on=20text?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lang/en.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/en.js b/lang/en.js index 2b89d20..a2e5a40 100644 --- a/lang/en.js +++ b/lang/en.js @@ -230,7 +230,7 @@ "constants.plans.pro": "Pro plan", "constants.plans.biz": "Business plan", "constants.plans.ent": "Enterprise plan", - "errors.noActiveZoneSelected": "It looks like {domain} isn't provisioned with Cloudflare. Please continue to {link} to provision this domain.", + "errors.noActiveZoneSelected": "It looks like your domain {domain} is not provisioned with Cloudflare. Please continue to {link} to secure and speed up your website.", "warning.usingSubdomain": "You are using a subdomain for your site, but any Cloudflare settings applied via this plugin will be applied to your original domain as well.", "warning.developmentmode": "Development mode enabled, all traffic will bypass the Cloudflare cache.", "utils.utils.lastmodifieddate": "This settings was last changed {date}"