mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-15 09:12:43 +02:00
frontend: react+mui (#3004)
* mui v5 wip * wip * wip * wip * use compressor for all controlplane endpoints * wip * wip * add deps * fix authenticate URL * fix test * fix test * fix build * maybe fix build * fix integration test * remove image asset test * add yarn.lock
This commit is contained in:
parent
64d8748251
commit
2824faecbf
84 changed files with 13373 additions and 1455 deletions
35
ui/src/components/Header.tsx
Normal file
35
ui/src/components/Header.tsx
Normal file
|
@ -0,0 +1,35 @@
|
|||
import CsrfInput from "./CsrfInput";
|
||||
import Logo from "./Logo";
|
||||
import AppBar from "@mui/material/AppBar";
|
||||
import Box from "@mui/material/Box";
|
||||
import Button from "@mui/material/Button";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import React, { FC } from "react";
|
||||
|
||||
type HeaderProps = {
|
||||
csrfToken: string;
|
||||
signOutUrl: string;
|
||||
};
|
||||
const Header: FC<HeaderProps> = ({ csrfToken, signOutUrl }) => {
|
||||
return (
|
||||
<AppBar position="sticky">
|
||||
<Toolbar>
|
||||
<a href="/.pomerium">
|
||||
<Logo />
|
||||
</a>
|
||||
<Box flexGrow={1} />
|
||||
{signOutUrl ? (
|
||||
<form action={signOutUrl}>
|
||||
<CsrfInput csrfToken={csrfToken} />
|
||||
<Button variant="text" color="inherit" type="submit">
|
||||
Logout
|
||||
</Button>
|
||||
</form>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
);
|
||||
};
|
||||
export default Header;
|
Loading…
Add table
Add a link
Reference in a new issue