Disable login/save (#778)
This commit is contained in:
parent
597a6637cb
commit
9fe34504e9
2 changed files with 6 additions and 3 deletions
|
@ -15,6 +15,8 @@ import {
|
|||
const triangleUrl = require('../images/down-filled-triangle.svg');
|
||||
const logoUrl = require('../images/p5js-logo-small.svg');
|
||||
|
||||
const __process = (typeof global !== 'undefined' ? global : window).process;
|
||||
|
||||
class Nav extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
@ -150,7 +152,7 @@ class Nav extends React.PureComponent {
|
|||
New
|
||||
</button>
|
||||
</li>
|
||||
{ (!this.props.project.owner || this.isUserOwner()) &&
|
||||
{ __process.env.LOGIN_ENABLED && (!this.props.project.owner || this.isUserOwner()) &&
|
||||
<li className="nav__dropdown-item">
|
||||
<button
|
||||
onClick={() => {
|
||||
|
@ -460,7 +462,7 @@ class Nav extends React.PureComponent {
|
|||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{ !this.props.user.authenticated &&
|
||||
{ __process.env.LOGIN_ENABLED && !this.props.user.authenticated &&
|
||||
<ul className="nav__items-right" title="user-menu">
|
||||
<li className="nav__item">
|
||||
<p>
|
||||
|
@ -470,7 +472,7 @@ class Nav extends React.PureComponent {
|
|||
</p>
|
||||
</li>
|
||||
</ul>}
|
||||
{ this.props.user.authenticated &&
|
||||
{ __process.env.LOGIN_ENABLED && this.props.user.authenticated &&
|
||||
<ul className="nav__items-right" title="user-menu">
|
||||
<li className="nav__item">
|
||||
<span>Hello, {this.props.user.username}!</span>
|
||||
|
|
|
@ -29,6 +29,7 @@ export function renderIndex() {
|
|||
window.process.env.AWS_REGION = '${process.env.AWS_REGION}';
|
||||
window.process.env.FORCE_TO_HTTPS = ${process.env.FORCE_TO_HTTPS === 'false' ? false : undefined};
|
||||
window.process.env.CLIENT = true;
|
||||
window.process.env.LOGIN_ENABLED = ${process.env.LOGIN_ENABLED === 'false' ? false : true}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
Loading…
Reference in a new issue