Merge branch '1.0.0' into master

This commit is contained in:
Frikky
2020-07-27 19:36:58 +09:00
committed by GitHub
14 changed files with 526 additions and 363 deletions
+34 -4
View File
@@ -6,6 +6,9 @@ import {Link} from 'react-router-dom';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import MenuItem from '@material-ui/core/MenuItem';
import Select from '@material-ui/core/Select';
import Button from '@material-ui/core/Button';
import HomeIcon from '@material-ui/icons/Home';
import PolymerIcon from '@material-ui/icons/Polymer';
@@ -17,7 +20,8 @@ const hoverColor = "#f85a3e"
const hoverOutColor = "#e8eaf6"
const Header = props => {
const { globalUrl, isLoggedIn, removeCookie, homePage, isLoaded } = props;
const { globalUrl, isLoggedIn, removeCookie, homePage, isLoaded } = props;
const [HomeHoverColor, setHomeHoverColor] = useState(hoverOutColor);
const [SoarHoverColor, setSoarHoverColor] = useState(hoverOutColor);
@@ -100,7 +104,7 @@ const Header = props => {
// Handle top bar or something
const loginTextBrowser = !isLoggedIn ?
const loginTextBrowser = !isLoggedIn ?
<div style={{display: "flex"}}>
<List style={{display: "flex", flexDirect: "row"}} component="nav">
<ListItem style={{textAlign: "center", marginLeft: "0px"}}>
@@ -192,6 +196,32 @@ const Header = props => {
</Button>
</Link>
</ListItem>
{userdata === undefined || userdata.orgs.length <= 1 ? null :
<ListItem>
<Select
SelectDisplayProps={{
style: {
marginLeft: 10,
}
}}
value={userdata.selected_org}
fullWidth
style={{backgroundColor: surfaceColor, color: "white", height: "50px"}}
onChange={(e) => {
console.log("SET ORG TO ", e.target.value)
}}
>
{userdata.orgs.map(data => {
return (
<MenuItem key={data.id} style={{backgroundColor: inputColor, color: "white"}} value={data}>
{data.name}
</MenuItem>
)
})}
</Select>
</ListItem>
}
</List>
</div>
</div>
@@ -287,7 +317,7 @@ const Header = props => {
<div>
{loadedCheck}
</div>
);
};
)
}
export default Header;