feat: add new about page
This commit is contained in:
9 files changed
+238
-48
No files matched your search
@@ -0,0 +1,42 @@
|
||||
.settings-about {
|
||||
&-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
&-logo{
|
||||
width: 60%;
|
||||
object-fit: cover;
|
||||
}
|
||||
&-table{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
max-width: 60%;
|
||||
margin-top: 2em;
|
||||
&-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.5em 1em;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.12);
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
max-width: 60%;
|
||||
margin-top: 2em;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
import { Fab, Link, Typography } from "@mui/material";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import React from "react";
|
||||
import blinkLogo from "@/assets/logoBlackTransparent.png";
|
||||
import { version } from "../../../../package.json";
|
||||
|
||||
import "./about.scss";
|
||||
import { useSuspenseQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getSystemInfoQueryOptions,
|
||||
getUpdateQueryOptions,
|
||||
} from "@/utils/queries/about";
|
||||
import { useApiInContext } from "@/utils/store/api";
|
||||
|
||||
export const Route = createFileRoute("/_api/settings/about")({
|
||||
component: RouteComponent,
|
||||
loader: async ({ context: { queryClient, api } }) => {
|
||||
await queryClient.ensureQueryData(getSystemInfoQueryOptions(api));
|
||||
await queryClient.ensureQueryData(getUpdateQueryOptions);
|
||||
},
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
const api = useApiInContext((s) => s.api);
|
||||
const systemInfo = useSuspenseQuery(getSystemInfoQueryOptions(api));
|
||||
const updateInfo = useSuspenseQuery(getUpdateQueryOptions);
|
||||
|
||||
return (
|
||||
<div className="settings-page-scrollY settings-about-container">
|
||||
{/* <Typography variant="h4">About</Typography> */}
|
||||
<img src={blinkLogo} alt="Blink" className="settings-about-logo" />
|
||||
<Typography sx={{ opacity: 0.8, marginTop: "-4em" }}>
|
||||
v{version}
|
||||
</Typography>
|
||||
<div className="settings-about-table">
|
||||
<div className="settings-about-table-row">
|
||||
<Typography variant="subtitle1">Server Name</Typography>
|
||||
<Typography variant="subtitle1">
|
||||
{systemInfo.data.ServerName}
|
||||
</Typography>
|
||||
</div>
|
||||
<div className="settings-about-table-row">
|
||||
<Typography variant="subtitle1">Jellyfin Version</Typography>
|
||||
<Typography variant="subtitle1">{systemInfo.data.Version}</Typography>
|
||||
</div>
|
||||
<div className="settings-about-table-row">
|
||||
<Typography variant="subtitle1">Update Available</Typography>
|
||||
<Typography variant="subtitle1">
|
||||
{updateInfo.data
|
||||
? `v${updateInfo.data.version}`
|
||||
: "No update available."}
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
<div className="settings-about-links">
|
||||
<Typography variant="h6" style={{ marginBottom: "0.5em" }}>
|
||||
Links
|
||||
</Typography>
|
||||
<Link href="https://github.com/prayag17/Blink">
|
||||
https://github.com/prayag17/Blink
|
||||
</Link>
|
||||
<Link href="https://jellyfin.org">https://jellyfin.org</Link>
|
||||
</div>
|
||||
<Fab
|
||||
LinkComponent={Link}
|
||||
href="https://github.com/sponsors/prayag17"
|
||||
variant="extended"
|
||||
target="_blank"
|
||||
color="primary"
|
||||
sx={{
|
||||
position: "fixed",
|
||||
bottom: "2em",
|
||||
right: "2em",
|
||||
}}
|
||||
>
|
||||
<span
|
||||
className="material-symbols-rounded fill"
|
||||
style={{
|
||||
marginRight: "0.25em",
|
||||
}}
|
||||
>
|
||||
volunteer_activism
|
||||
</span>
|
||||
Support
|
||||
</Fab>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user