mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-21 11:05:36 +02:00
Add Links to useful ressources (GitHub, Swagger Doc)
This commit is contained in:
@ -1,14 +1,15 @@
|
|||||||
import Sheet from "@mui/joy/Sheet";
|
import Sheet from "@mui/joy/Sheet";
|
||||||
import {Box, Stack, Typography} from "@mui/joy";
|
import {Box, Link, Stack, Typography} from "@mui/joy";
|
||||||
import {ReactElement} from "react";
|
import {ReactElement} from "react";
|
||||||
import './Header.css';
|
import './Header.css';
|
||||||
|
import { GitHub } from "@mui/icons-material";
|
||||||
|
|
||||||
export default function Header({children} : {children? : ReactElement<any, any> | ReactElement<any,any>[] | undefined}) : ReactElement {
|
export default function Header({children} : {children? : ReactElement<any, any> | ReactElement<any,any>[] | undefined}) : ReactElement {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Sheet className={"header"} sx={{position: "sticky !important", zIndex: 100}}>
|
<Sheet className={"header"} sx={{position: "sticky !important", zIndex: 100}}>
|
||||||
<Stack direction={"row"} spacing={2} sx={{width: "100%"}}>
|
<Stack direction={"row"} spacing={2} sx={{width: "100%", alignItems: "center"}}>
|
||||||
<img src={"/blahaj.png"} style={{cursor: "grab"}}/>
|
<img src={"/blahaj.png"} style={{cursor: "grab", maxHeight: "100%"}}/>
|
||||||
<Typography level={"h2"} sx={{
|
<Typography level={"h2"} sx={{
|
||||||
background: "linear-gradient(110deg, var(--joy-palette-primary-solidBg), var(--joy-palette-success-400))",
|
background: "linear-gradient(110deg, var(--joy-palette-primary-solidBg), var(--joy-palette-success-400))",
|
||||||
WebkitBackgroundClip: "text",
|
WebkitBackgroundClip: "text",
|
||||||
@ -16,6 +17,8 @@ export default function Header({children} : {children? : ReactElement<any, any>
|
|||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
cursor: "default"
|
cursor: "default"
|
||||||
}}>Tranga</Typography>
|
}}>Tranga</Typography>
|
||||||
|
<Link href={"https://github.com/C9Glax/tranga"} color={"neutral"} height={"min-content"} ><GitHub /> Server</Link>
|
||||||
|
<Link href={"https://github.com/C9Glax/tranga-website"} color={"neutral"} height={"min-content"} ><GitHub /> Website</Link>
|
||||||
<Box sx={{flexGrow: 1}} />
|
<Box sx={{flexGrow: 1}} />
|
||||||
{children}
|
{children}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
@ -6,7 +6,8 @@ import {
|
|||||||
AccordionGroup,
|
AccordionGroup,
|
||||||
AccordionSummary, CircularProgress, ColorPaletteProp,
|
AccordionSummary, CircularProgress, ColorPaletteProp,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
DialogTitle, Input
|
DialogTitle, Input,
|
||||||
|
Link, Stack
|
||||||
} from "@mui/joy";
|
} from "@mui/joy";
|
||||||
import './Settings.css';
|
import './Settings.css';
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
@ -20,6 +21,7 @@ import ChapterNamingScheme from "./Components/Settings/ChapterNamingScheme.tsx";
|
|||||||
import AprilFoolsMode from './Components/Settings/AprilFoolsMode.tsx';
|
import AprilFoolsMode from './Components/Settings/AprilFoolsMode.tsx';
|
||||||
import RequestLimits from "./Components/Settings/RequestLimits.tsx";
|
import RequestLimits from "./Components/Settings/RequestLimits.tsx";
|
||||||
import FlareSolverr from "./Components/Settings/FlareSolverr.tsx";
|
import FlareSolverr from "./Components/Settings/FlareSolverr.tsx";
|
||||||
|
import {Article} from '@mui/icons-material';
|
||||||
|
|
||||||
const checkConnection = async (apiUri: string): Promise<boolean> =>{
|
const checkConnection = async (apiUri: string): Promise<boolean> =>{
|
||||||
return fetch(`${apiUri}/swagger/v2/swagger.json`,
|
return fetch(`${apiUri}/swagger/v2/swagger.json`,
|
||||||
@ -116,6 +118,9 @@ export default function Settings({open, setOpen, setApiUri, setConnected}:{open:
|
|||||||
<RequestLimits backendSettings={backendSettings} />
|
<RequestLimits backendSettings={backendSettings} />
|
||||||
<FlareSolverr backendSettings={backendSettings} />
|
<FlareSolverr backendSettings={backendSettings} />
|
||||||
</AccordionGroup>
|
</AccordionGroup>
|
||||||
|
<Stack spacing={2} direction="row">
|
||||||
|
<Link href={apiUri + "/swagger"}><Article />Swagger Doc</Link>
|
||||||
|
</Stack>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user