Skip to content
This repository has been archived by the owner on Oct 6, 2019. It is now read-only.

Update "About" information for DNN Platform to be more relevant and current #1094

Merged
merged 4 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ const licensingActions = {
}
});
};
},

getServerInfo(callback) {
return (dispatch) => {
ApplicationService.getServerInfo(data => {
dispatch({
type: ActionTypes.RETRIEVED_SERVER_INFO,
data: {
productVersion: data.ProductVersion
}
});
if (callback) {
callback(data);
}
});
};
}
};

Expand Down
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("https://github.com/dnnsoftware/Dnn.Platform", "_blank");
}

onUpgradeClick() {
window.open("http://www.dnnsoftware.com/about/contact-dnn", "_blank");
onCommunityClick() {
window.open("https://dnncommunity.org", "_blank");
}

onDocCenterClick() {
window.open("http://www.dnnsoftware.com/docs/", "_blank");
onDocsClick() {
window.open("https://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>
);
}

componentDidMount() {
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);
Original file line number Diff line number Diff line change
@@ -1,54 +1,35 @@
@import "~@dnnsoftware/dnn-react-common/styles/index";
:local(.licensingPlatform) {
border-bottom: none;
.licenses-header-row {
border-bottom: 1px solid @alto;
padding: 10px 0 10px 0;
width: 100%;
float: left;
.intro-header-row {
padding: 10px;
float: right;
overflow: hidden;
margin-top: 5px;
color: @mountainMist;
.header-LicenseType {
width: 15%;
float: left;
font-weight: bolder;
padding-left: 20px;
}
.header-InvoiceNumber {
width: 27%;
float: left;
font-weight: bolder;
}
.header-WebServer {
width: 15%;
float: left;
font-weight: bolder;
}
.header-Activated {
width: 15%;
float: left;
font-weight: bolder;
}
.header-Expires {
width: 25%;
float: left;
font-weight: bolder;
}
border-left: 1px solid @alto;
border-bottom: 1px solid @alto;
}
.nolicense {
.intro {
text-align: center;
padding: 100px 0 20px 0;
padding: 50px 0;
border: 1px solid @alto;
.nolicense-header {
.intro-header {
margin: 0 0 15px 0;
font-size: 25px;
color: @thunder;
}
.nolicense-body {
.intro-body {
font-size: 15px;
color: @mountainMist;
margin: 0 0 100px 0;
margin: 0 50px;
}
.dnn-technology-editorial-icon {
width: 250px;
float: right;
margin: 0 20px;
/*> svg {
width: 250px;
}*/
}
}
.links-wrapper {
Expand All @@ -57,12 +38,11 @@
border: 1.5px solid @alto;
font-weight: bolder;
display: flex;
.link-evoq-wrapper {
border-right: 1px solid @alto;
.link-github-wrapper {
float: left;
width: 265px;
margin: 25px 0;
.link-evoq {
.link-github {
height: 100%;
cursor: pointer;
float: left;
Expand All @@ -74,29 +54,28 @@
border: 1px solid @cerulean;
background-color: @alabaster;
}
.link-evoq-header {
.link-github-header {
margin: 10px 0 20px 0;
color: @thunder;
}
.link-evoq-desc {
.link-github-desc {
margin: 0 25px 20px 25px;
}
.star-icon {
.github-icon {
margin-top: 10px;
> svg {
width: 80px;
height: 80px;
fill: @seagull;
}
}
}
}
.link-upgrade-wrapper {
.link-community-wrapper {
border-right: 1px solid @alto;
float: left;
width: 264px;
margin: 25px 0;
.link-upgrade {
.link-community {
height: 100%;
cursor: pointer;
float: left;
Expand All @@ -108,26 +87,27 @@
border: 1px solid @cerulean;
background-color: @alabaster;
}
.link-upgrade-header {
.link-community-header {
margin: -10px 0 20px 0;
color: @thunder;
}
.link-upgrade-desc {
.link-community-desc {
margin: 0 25px 20px 25px;
}
.evoq-icon {
.dnn-icon {
> svg {
width: 110px;
height: 110px;
}
}
}
}
.link-doc-wrapper {
.link-docs-wrapper {
border-right: 1px solid @alto;
float: left;
width: 265px;
margin: 25px 0;
.link-doc {
.link-docs {
height: 100%;
cursor: pointer;
float: left;
Expand All @@ -139,19 +119,17 @@
border: 1px solid @cerulean;
background-color: @alabaster;
}
.link-doc-header {
.link-docs-header {
margin: 10px 0 20px 0;
color: @thunder;
}
.link-doc-desc {
.link-docs-desc {
margin: 0 25px 20px 25px;
}
.info-icon {
margin-top: 10px;
.docs-icon {
margin-top: 20px;
> svg {
width: 80px;
height: 80px;
fill: @seagull;
height: 69px;
}
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading