-
Notifications
You must be signed in to change notification settings - Fork 21
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9d4bead
PI-1033 more under stable message to users
6679fc1
PI-1033 delete prettier-ignore
a01288c
PI-1033 Updated to a better text than before
40db1bd
PI-1033 made it message more integration friendly
113c319
PI-1033 Another update on text…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,32 @@ import { getPluginSettingsForZoneId } from '../../selectors/pluginSettings'; | |
import { FormattedMessage, injectIntl } from 'react-intl'; | ||
import { getZoneAnalyticsForZoneId } from '../../selectors/zoneAnalytics'; | ||
import { getAllZoneSettingsForZoneId } from '../../selectors/zoneSettings'; | ||
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; | ||
let isPluginSettingsLoaded = true; | ||
|
@@ -49,6 +65,17 @@ class WaitForSettings extends Component { | |
isPluginSettingsLoaded && | ||
isAnalyticsLoaded; | ||
|
||
var link = ( | ||
<Link href={CLOUDFLARE_ADD_SITE_PAGE} target="_blank">Cloudflare</Link> | ||
); | ||
if (isDNSPageEnabled(config)) { | ||
link = ( | ||
<Link onClick={() => this.handleClick(DOMAINS_OVERVIEW_PAGE)}> | ||
<FormattedMessage id="container.dnsManagementPage.title" /> | ||
</Link> | ||
); | ||
} | ||
|
||
return ( | ||
<div> | ||
{!isEverythingLoaded && | ||
|
@@ -57,7 +84,10 @@ class WaitForSettings extends Component { | |
{!isEverythingLoaded && | ||
!isZoneOnCloudflare && | ||
<Text align="center"> | ||
<FormattedMessage id="errors.noActiveZoneSelected" /> | ||
<FormattedMessage | ||
id="errors.noActiveZoneSelected" | ||
values={{ link: link, domain: activeZone.name }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to add EDIT: NVM Im very dumb |
||
/> | ||
</Text>} | ||
{isEverythingLoaded && isZoneOnCloudflare && this.props.children} | ||
</div> | ||
|
@@ -76,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)); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do inline if case thing but prettier was complaining and couldn't figure out why. Then did this instead of
ignore-prettier