refactor: cleanup some components
This commit is contained in:
12 files changed
+71
-40
No files matched your search
@@ -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,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";
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user