.idea + minor bugfixes
This commit is contained in:
6
fileControlPanel/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
fileControlPanel/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
@@ -4,6 +4,7 @@ import API from "./api";
|
||||
import Icon from "./elements/icon";
|
||||
import {FileBrowser} from "./elements/file-browser";
|
||||
import {TokenList} from "./elements/token-list";
|
||||
import {Link} from "react-router-dom";
|
||||
|
||||
class FileControlPanel extends React.Component {
|
||||
|
||||
@@ -134,6 +135,7 @@ class FileControlPanel extends React.Component {
|
||||
const self = this;
|
||||
const errorMessageShown = !!this.state.errorMessage;
|
||||
|
||||
// still loading
|
||||
if (!this.state.loaded) {
|
||||
|
||||
let checkUser = true;
|
||||
@@ -165,7 +167,9 @@ class FileControlPanel extends React.Component {
|
||||
}
|
||||
|
||||
return <>Loading… <Icon icon={"spinner"} /></>;
|
||||
} else if (this.api.loggedIn || this.state.token.valid) {
|
||||
}
|
||||
// access granted
|
||||
else if (this.api.loggedIn || this.state.token.valid) {
|
||||
let selectedIds = this.getSelectedIds();
|
||||
let directories = this.getDirectories();
|
||||
let tokenList = (this.api.loggedIn) ?
|
||||
@@ -205,6 +209,9 @@ class FileControlPanel extends React.Component {
|
||||
<div className={"alert alert-danger mt-2"} hidden={!errorMessageShown}>
|
||||
{ this.state.errorMessage }
|
||||
</div>
|
||||
<div className={"mt-3"}>
|
||||
Or either <a href={"/admin"}>login</a> to access the file control panel.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>;
|
||||
|
||||
Reference in New Issue
Block a user