Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

auto-fill search bar for token and wrap input fields in single div

mngshmcfe86b00aac3
diff --git a/infra/staff/src/App.css b/infra/staff/src/App.css
index cf3eeaf564..2cc6d55418 100644
--- a/infra/staff/src/App.css
+++ b/infra/staff/src/App.css
@@ -77,9 +77,9 @@
}
.text-fields {
- display: flex;
- justify-content: row;
- gap: 20px;
+ display: flex;
+ justify-content: row;
+ gap: 20px;
}
.fetch-button-container button {
background-color: #00b33c;
@@ -225,10 +225,10 @@
margin-top: 16px;
}
-/* MUi Component Custom CSS */
+/* MUi Component Custom CSS */
css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input {
- padding: none;
- margin: none;
+ padding: none;
+ margin: none;
}
/* Mobile */
@@ -249,7 +249,7 @@ css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input {
gap: 25px;
}
.text-fields {
- width: fit-content;
+ width: fit-content;
flex-direction: column;
gap: 20px;
justify-content: center;
diff --git a/infra/staff/src/App.tsx b/infra/staff/src/App.tsx
index 15a8b6fc31..04619cf2ea 100644
--- a/infra/staff/src/App.tsx
+++ b/infra/staff/src/App.tsx
@@ -228,11 +228,20 @@ const App: React.FC = () => {
const handleTabChange = (
_event: React.SyntheticEvent,
- newValue: number,
+ newValue: number,
) => {
setTabValue(newValue);
};
+ useEffect(() => {
+ const searchParam = new URLSearchParams(window.location.search)
+ const userToken = searchParam.get('token')
+
+ if (userToken) {
+ setLocalToken(userToken);
+ setToken(userToken);
+ }, [])
+
return (
<div className="container">
<div>
@@ -244,11 +253,10 @@ const App: React.FC = () => {
rel="noopener noreferrer"
className="link-text"
>
- Ente Dashboard
+ staff.ente.io
</a>
- <div class="text-fields">
- <TextField
-
+ <div className="text-fields">
+ <TextField
label="Token"
value={localToken}
onChange={(e) => {
@@ -272,7 +280,6 @@ const App: React.FC = () => {
/>
</div>
<div className="fetch-button-container">
-
<Button
variant="contained"
onClick={() => {