refactor: cleanup some components

This commit is contained in:
Prayag Prajapati committed 2024-12-09 10:15:20 +05:30
1 parent 5d5f127525
commit 9dbe11ce23
12 files changed
+71 -40

No files matched your search

+1
View File
@@ -59,6 +59,7 @@ export const Route = createFileRoute("/_api")({
} else if (context.api) {
if (context.api.accessToken && location.pathname !== "/login/manual") {
try {
console.info("AccessToken", context.api.accessToken);
await getUserApi(context.api).getCurrentUser(); // Verify user is able to authenticate
} catch (error) {
console.error(error);
+1 -1
View File
@@ -1,4 +1,4 @@
import { AppBarBackOnly } from "@/components/appBar/backOnly";
import AppBarBackOnly from "@/components/appBar/backOnly";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import { Outlet, createFileRoute, redirect } from "@tanstack/react-router";
import React from "react";
+4 -9
View File
@@ -134,25 +134,20 @@ function LoginUser() {
}}
>
<AvatarImage userId={userId} />
<Typography
textAlign="center"
variant="h5"
sx={{ opacity: 0.8 }}
mb={2}
mt={2}
>
Login as{" "}
<div style={{ display: "inline-flex", margin: "1em 0" }}>
<Typography variant="h5">Login as</Typography>
<Typography
variant="h5"
style={{
display: "inline",
}}
ml={0.5}
fontWeight={700}
className="gradient-text"
>
{userName}
</Typography>
</Typography>
</div>
<form onSubmit={(e) => handleLogin.mutate(e)}>
<FormControl
variant="outlined"
+1 -1
View File
@@ -6,7 +6,7 @@ import Paper from "@mui/material/Paper";
import Typography from "@mui/material/Typography";
import { red } from "@mui/material/colors";
import { AppBarBackOnly } from "@/components/appBar/backOnly";
import AppBarBackOnly from "@/components/appBar/backOnly";
import {
delServer,
getAllServers,