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

PI-1033 more under stable message to users #115

Merged
merged 5 commits into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": "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}"
Expand Down
1 change: 1 addition & 0 deletions src/constants/UrlPaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
11 changes: 10 additions & 1 deletion src/containers/WaitForSettings/WaitForSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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;
Expand Down Expand Up @@ -49,6 +51,10 @@ class WaitForSettings extends Component {
isPluginSettingsLoaded &&
isAnalyticsLoaded;

let link = (
<a href={CLOUDFLARE_ADD_SITE_PAGE} target="_blank">Cloudflare</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ isDNSPageEnabled(config) ? DNS_PAGE : CLOUDFLARE_ADD_SITE_PAGE }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh nice idea.

Copy link
Contributor Author

@thellimist thellimist Mar 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took longer than expected :/
40db1bd

);

return (
<div>
{!isEverythingLoaded &&
Expand All @@ -57,7 +63,10 @@ class WaitForSettings extends Component {
{!isEverythingLoaded &&
!isZoneOnCloudflare &&
<Text align="center">
<FormattedMessage id="errors.noActiveZoneSelected" />
<FormattedMessage
id="errors.noActiveZoneSelected"
values={{ link: link, domain: activeZone.name }}
Copy link
Contributor

@jwineman jwineman Mar 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to add domain here too.

EDIT: NVM Im very dumb

/>
</Text>}
{isEverythingLoaded && isZoneOnCloudflare && this.props.children}
</div>
Expand Down