This repository has been archived by the owner on Oct 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Update "About" information for DNN Platform to be more relevant and current #1094
Merged
mitchelsellers
merged 4 commits into
dnnsoftware:release/3.0.x
from
david-poindexter:issue-81a
Aug 12, 2019
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
69abada
Update to include relevant information and links for DNN Platform
david-poindexter 74fe6cc
Update local resource file to include new content
david-poindexter 9b77fec
Update URLs to be absolute instead of using protocol-relative URLs
david-poindexter a92ccfe
Moved UNSAFE_componentWillMount to componentDidMount
david-poindexter 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
100 changes: 55 additions & 45 deletions
100
...Content/Dnn.PersonaBar.Extensions/WebApps/Licensing.Web/src/components/platform/index.jsx
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 |
---|---|---|
@@ -1,91 +1,101 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
import { connect } from "react-redux"; | ||
import { | ||
licensing as LicensingActions | ||
} from "../../actions"; | ||
import "./style.less"; | ||
import resx from "../../resources"; | ||
import styles from "./style.less"; | ||
|
||
/*eslint-disable quotes*/ | ||
const starIcon = require(`!raw-loader!./../svg/star_circle.svg`).default; | ||
const evoqIcon = require(`!raw-loader!./../svg/evoq.svg`).default; | ||
const infoIcon = require(`!raw-loader!./../svg/info_circle.svg`).default; | ||
const dnnTechnologyEditorialIcon = require(`!raw-loader!./../svg/dnn_technology_editorial.svg`).default; | ||
const githubIcon = require(`!raw-loader!./../svg/github.svg`).default; | ||
const dnnIcon = require(`!raw-loader!./../svg/dnn_logo_primary.svg`).default; | ||
const docsIcon = require(`!raw-loader!./../svg/dnn_docs_logo.svg`).default; | ||
|
||
class Platform extends Component { | ||
constructor() { | ||
super(); | ||
} | ||
|
||
renderHeader() { | ||
let tableFields = []; | ||
tableFields.push({ "name": resx.get("LicenseType.Header"), "id": "LicenseType" }); | ||
tableFields.push({ "name": resx.get("InvoiceNumber.Header"), "id": "InvoiceNumber" }); | ||
tableFields.push({ "name": resx.get("WebServer.Header"), "id": "WebServer" }); | ||
tableFields.push({ "name": resx.get("Activated.Header"), "id": "Activated" }); | ||
tableFields.push({ "name": resx.get("Expires.Header"), "id": "Expires" }); | ||
|
||
let tableHeaders = tableFields.map((field) => { | ||
let className = "header-" + field.id; | ||
return <div className={className} key={"header-" + field.id}> | ||
<span>{field.name}</span> | ||
</div>; | ||
}); | ||
return <div className="licenses-header-row">{tableHeaders}</div>; | ||
renderVersion() { | ||
return <div className="intro-header-row">{this.props.productVersion}</div>; | ||
} | ||
|
||
onEvoqClick() { | ||
window.open("http://www.dnnsoftware.com/cms-features", "_blank"); | ||
onGitHubClick() { | ||
window.open("//github.com/dnnsoftware/Dnn.Platform", "_blank"); | ||
} | ||
|
||
onUpgradeClick() { | ||
window.open("http://www.dnnsoftware.com/about/contact-dnn", "_blank"); | ||
onCommunityClick() { | ||
window.open("//dnncommunity.org", "_blank"); | ||
} | ||
|
||
onDocCenterClick() { | ||
window.open("http://www.dnnsoftware.com/docs/", "_blank"); | ||
onDocsClick() { | ||
window.open("//dnndocs.com", "_blank"); | ||
} | ||
|
||
/* eslint-disable react/no-danger */ | ||
renderLinks() { | ||
return ( | ||
<div className="links-wrapper"> | ||
<div className="link-evoq-wrapper"> | ||
<div className="link-evoq" onClick={this.onEvoqClick.bind(this) }> | ||
<div className="star-icon" dangerouslySetInnerHTML={{ __html: starIcon }} /> | ||
<div className="link-evoq-header">{resx.get("CheckOutEvoq.Header") }</div> | ||
<div className="link-evoq-desc">{resx.get("CheckOutEvoq") }</div> | ||
<div className="link-docs-wrapper" title={resx.get("Docs.Header")} onClick={this.onDocsClick.bind(this) }> | ||
<div className="link-docs"> | ||
<div className="docs-icon" dangerouslySetInnerHTML={{ __html: docsIcon }} /> | ||
<div className="link-docs-header">{resx.get("Docs.Header") }</div> | ||
<div className="link-docs-desc">{resx.get("Docs") }</div> | ||
</div> | ||
</div> | ||
<div className="link-upgrade-wrapper"> | ||
<div className="link-upgrade" onClick={this.onUpgradeClick.bind(this) }> | ||
<div className="evoq-icon" dangerouslySetInnerHTML={{ __html: evoqIcon }} /> | ||
<div className="link-upgrade-header">{resx.get("UpgradeToEvoq.Header") }</div> | ||
<div className="link-upgrade-desc">{resx.get("UpgradeToEvoq") }</div> | ||
<div className="link-community-wrapper"> | ||
<div className="link-community" title={resx.get("Community.Header")} onClick={this.onCommunityClick.bind(this) }> | ||
<div className="dnn-icon" dangerouslySetInnerHTML={{ __html: dnnIcon }} /> | ||
<div className="link-community-header">{resx.get("Community.Header") }</div> | ||
<div className="link-community-desc">{resx.get("Community") }</div> | ||
</div> | ||
</div> | ||
<div className="link-doc-wrapper" onClick={this.onDocCenterClick.bind(this) }> | ||
<div className="link-doc"> | ||
<div className="info-icon" dangerouslySetInnerHTML={{ __html: infoIcon }} /> | ||
<div className="link-doc-header">{resx.get("DocumentCenter.Header") }</div> | ||
<div className="link-doc-desc">{resx.get("DocumentCenter") }</div> | ||
<div className="link-github-wrapper"> | ||
<div className="link-github" title={resx.get("GitHub.Header")} onClick={this.onGitHubClick.bind(this)}> | ||
<div className="github-icon" dangerouslySetInnerHTML={{ __html: githubIcon }} /> | ||
<div className="link-github-header">{resx.get("GitHub.Header")}</div> | ||
<div className="link-github-desc">{resx.get("GitHub")}</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
UNSAFE_componentWillMount() { | ||
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. Can you move this into componentDidMount to avoid the soon to be deprecated method usage ? 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. Yes, great suggestion - thanks @valadas - standby for a new commit. 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. Okay, new commit pushed. |
||
const {props} = this; | ||
props.dispatch(LicensingActions.getServerInfo()); | ||
} | ||
|
||
/*eslint no-mixed-spaces-and-tabs: "error"*/ | ||
render() { | ||
return ( | ||
<div className={styles.licensingPlatform}> | ||
<div> | ||
{this.renderHeader() } | ||
<div className="nolicense"> | ||
<div className="nolicense-header">{resx.get("NoLicense.Header") }</div> | ||
<div className="nolicense-body">{resx.get("NoLicense") }</div> | ||
</div> | ||
{this.renderVersion()} | ||
<div className="intro"> | ||
<div className="dnn-technology-editorial-icon" dangerouslySetInnerHTML={{ __html: dnnTechnologyEditorialIcon }} /> | ||
<div className="intro-header">{resx.get("Intro.Header") }</div> | ||
<div className="intro-body">{resx.get("Intro") }</div> | ||
</div> | ||
</div> | ||
{this.renderLinks() } | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Platform; | ||
Platform.propTypes = { | ||
dispatch: PropTypes.func.isRequired, | ||
productVersion: PropTypes.string | ||
}; | ||
|
||
function mapStateToProps(state) { | ||
return { | ||
productVersion: state.licensing.productVersion | ||
}; | ||
} | ||
|
||
export default connect(mapStateToProps)(Platform); |
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
3 changes: 3 additions & 0 deletions
3
...ersonaBar.Extensions/WebApps/Licensing.Web/src/components/svg/dnn_docs_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...onaBar.Extensions/WebApps/Licensing.Web/src/components/svg/dnn_logo_primary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
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.
Should we add https to these links since they are external so we avoid a redirect from http to https ?
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.
Okay, yes...after a bit of research, it appears using protocol-relative URLs is an anti-pattern. I will push a new commit with this change shortly. Thanks @valadas!
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.
Just pushed a new commit to address this concern.