[dashboard] Remove token field (#4819)

This commit is contained in:
Neeraj
2025-01-24 10:51:14 +05:30
committed by GitHub
2 changed files with 1 additions and 43 deletions

View File

@@ -24,12 +24,10 @@
.link-text {
display: flex;
align-items: center;
padding: 0 16px; /* Add padding for better appearance */
text-decoration: none; /* Remove underline */
color: inherit; /* Inherit color from parent */
font-weight: bold; /* Make the text bold */
font-size: 40px;
margin-bottom: 25px;
}
.duckie-container {
@@ -62,7 +60,7 @@
flex-direction: column;
align-items: center;
justify-content: space-around;
marign: 20px;
margin: 20px;
}
.horizontal-group {

View File

@@ -1,4 +1,3 @@
import { Link } from "@mui/material";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import CircularProgress from "@mui/material/CircularProgress";
@@ -233,7 +232,6 @@ const App: React.FC = () => {
) => {
setTabValue(newValue);
};
useEffect(() => {
const searchParam = new URLSearchParams(window.location.search);
const userToken = searchParam.get("token");
@@ -241,23 +239,9 @@ const App: React.FC = () => {
if (userToken) {
setLocalToken(userToken);
setToken(userToken);
const editToken = document.getElementById(":r1:");
if (editToken instanceof HTMLInputElement) {
editToken.readOnly = true;
}
}
}, []);
const updateToken = () => {
const editToken = document.getElementById(":r1:");
if (editToken instanceof HTMLInputElement) {
editToken.readOnly = false;
// Change focus to token field
editToken.focus();
}
};
return (
<div className="container">
<div>
@@ -272,30 +256,6 @@ const App: React.FC = () => {
staff.ente.io
</a>
<div className="text-fields">
<div
style={{
display: "flex",
flexDirection: "column",
}}
>
<TextField
label="Token"
value={localToken}
onChange={(e) => {
setLocalToken(e.target.value);
setToken(e.target.value);
}}
size="medium"
className="text-field-token"
style={{ maxWidth: "parent" }}
/>
<Link
style={{ textAlign: "left" }}
onClick={updateToken}
>
Update Token?
</Link>
</div>
<TextField
label="Email"
value={localEmail}