From 079a84fc82678b04f8317018a3f94128106a097a Mon Sep 17 00:00:00 2001 From: mngshm Date: Mon, 6 Jan 2025 19:13:01 +0530 Subject: [PATCH 01/15] refactor: reomve unnecessary stylesheet --- infra/staff/src/App.css | 113 ++++++++++++++++------------------------ infra/staff/src/App.tsx | 12 +++-- 2 files changed, 53 insertions(+), 72 deletions(-) diff --git a/infra/staff/src/App.css b/infra/staff/src/App.css index 38580a25684..ec7df397e9a 100644 --- a/infra/staff/src/App.css +++ b/infra/staff/src/App.css @@ -1,36 +1,14 @@ .container { - position: relative; /* Ensure the parent is relatively positioned */ - height: 100vh; /* Full viewport height */ - width: 100vw; /* Full viewport width */ - display: flex; - justify-content: center; - align-items: center; + max-width: 1200px; + height: auto; + align-items: center; + margin: 0 auto; } .center-table { display: table; } -.input-form { - display: flex; - flex-direction: column; - align-items: center; -} - -.horizontal-group { - position: absolute; /* Use absolute positioning */ - top: 32px; /* 32px below the top of the page */ - left: 32px; /* 32px from the leftmost edge of the page */ - right: 32px; - display: flex; - align-items: center; /* Align items vertically centered */ - gap: 20px; /* Adjust the gap between elements as needed */ - background-color: #fafafa; - height: 104px; - width: 1375px; - border-radius: 10px; -} - .fetch-button-container button { background-color: #00b33c; color: white; @@ -85,30 +63,23 @@ justify-content: center; align-items: center; } -.container { - position: relative; /* Ensure the parent is relatively positioned */ - height: 100vh; /* Full viewport height */ - width: 100vw; /* Full viewport width */ - display: flex; - flex-direction: column; /* Add this */ - justify-content: center; /* Center vertically */ - align-items: center; /* Center horizontally */ -} .input-form { display: flex; flex-direction: column; align-items: center; - z-index: 1; /* Ensure form is on top */ + justify-content: space-around; } .horizontal-group { display: flex; align-items: center; - gap: 20px; /* Adjust the gap between elements as needed */ - background-color: #fafafa; + background-color: #fcfcfc; padding: 20px; /* Add padding around content */ border-radius: 10px; + margin-top: 90px; + width: 1200px; + justify-content: center; } .fetch-button-container button { @@ -124,21 +95,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; -} - -.text-field-token { - margin-left: 70px !important; /* Adjust margin for Token field */ -} - -.text-field-email { - margin-left: 50px !important; /* Adjust margin for Email field */ + font-size: 30px; } .center-content { @@ -181,20 +141,11 @@ margin-bottom: 20px; /* Add space between form and tabs */ } -.horizontal-group { - display: flex; - align-items: center; - gap: 20px; /* Adjust the gap between elements as needed */ - background-color: #fafafa; - padding: 20px; /* Add padding around content */ - border-radius: 10px; -} - .fetch-button-container button { background-color: #00b33c; color: white; border: none; - width: 199px; + width: 150px; height: 56px; } @@ -313,10 +264,6 @@ min-height: 100vh; } -.input-form { - margin-bottom: 16px; -} - .content-container { display: flex; flex-direction: column; @@ -325,11 +272,6 @@ margin-top: 150px; } -.horizontal-group { - display: flex; - align-items: center; -} - .fetch-button-container { margin-right: 10px; margin-left: 10px; @@ -345,3 +287,36 @@ font-weight: bold; margin-top: 16px; } + +/* Mobile */ +@media screen and (max-width: 475px) { + .link-text { + font-size: 25px; + text-align: center; + } + .input-form { + max-width: 400px; + align-items: center; + gap: 20px; + flex-direction: row; + } + .text-field-token { + + } + .horizontal-group { + width: 500px; + flex-direction: column; + } +} + +@media screen and (max-width: 576px) { + +} + +@media screen and (max-width: 900px) { + +} + +@media screen and (max-width: 1200px) { + +} diff --git a/infra/staff/src/App.tsx b/infra/staff/src/App.tsx index c610ac9aa48..cecbeca28f5 100644 --- a/infra/staff/src/App.tsx +++ b/infra/staff/src/App.tsx @@ -234,6 +234,7 @@ const App: React.FC = () => { return (
+
{ }} size="medium" className="text-field-token" - style={{ width: "350px" }} + style={{ maxWidth: "parent" }} /> { }} size="medium" className="text-field-email" - style={{ width: "350px" }} + style={{ width: "parent" }} />
+
{loading ? ( ) : error ? (
{error}
From cf6cd23ea4506af5f516168920763b67e211d6b5 Mon Sep 17 00:00:00 2001 From: mngshm Date: Tue, 7 Jan 2025 10:11:06 +0530 Subject: [PATCH 02/15] fix: formatting --- infra/staff/src/App.css | 44 ++++++++--------- infra/staff/src/App.tsx | 107 +++++++++++++++++++++------------------- 2 files changed, 75 insertions(+), 76 deletions(-) diff --git a/infra/staff/src/App.css b/infra/staff/src/App.css index ec7df397e9a..1ebb973048c 100644 --- a/infra/staff/src/App.css +++ b/infra/staff/src/App.css @@ -1,8 +1,8 @@ .container { - max-width: 1200px; - height: auto; - align-items: center; - margin: 0 auto; + max-width: 1200px; + height: auto; + align-items: center; + margin: 0 auto; } .center-table { @@ -290,33 +290,29 @@ /* Mobile */ @media screen and (max-width: 475px) { - .link-text { - font-size: 25px; - text-align: center; - } - .input-form { - max-width: 400px; - align-items: center; - gap: 20px; - flex-direction: row; - } - .text-field-token { - - } - .horizontal-group { - width: 500px; - flex-direction: column; - } + .link-text { + font-size: 25px; + text-align: center; + } + .input-form { + max-width: 400px; + align-items: center; + gap: 20px; + flex-direction: row; + } + .text-field-token { + } + .horizontal-group { + width: 500px; + flex-direction: column; + } } @media screen and (max-width: 576px) { - } @media screen and (max-width: 900px) { - } @media screen and (max-width: 1200px) { - } diff --git a/infra/staff/src/App.tsx b/infra/staff/src/App.tsx index cecbeca28f5..98e1725ac28 100644 --- a/infra/staff/src/App.tsx +++ b/infra/staff/src/App.tsx @@ -234,66 +234,69 @@ const App: React.FC = () => { return (
-
-
-
- - staff.ente.sh - +
+ +
+ + staff.ente.sh + - { - setLocalToken(e.target.value); - setToken(e.target.value); - }} - size="medium" - className="text-field-token" - style={{ maxWidth: "parent" }} - /> - { - setLocalEmail(e.target.value); - setEmail(e.target.value); - }} - size="medium" - className="text-field-email" - style={{ width: "parent" }} - /> -
- + size="medium" + className="text-field-email" + style={{ width: "parent" }} + /> +
+ +
-
- +
{loading ? ( ) : error ? ( From f0789b1fca0cfea54e5a5516fe5b7c333197ebaf Mon Sep 17 00:00:00 2001 From: mngshm Date: Tue, 7 Jan 2025 17:40:59 +0530 Subject: [PATCH 03/15] pushing staged changes --- infra/staff/src/App.css | 102 +++++++++++----------------------------- infra/staff/src/App.tsx | 54 +++++++++++---------- 2 files changed, 56 insertions(+), 100 deletions(-) diff --git a/infra/staff/src/App.css b/infra/staff/src/App.css index 1ebb973048c..cf3eeaf5640 100644 --- a/infra/staff/src/App.css +++ b/infra/staff/src/App.css @@ -15,7 +15,6 @@ border: none; width: 199px; height: 56px; - margin-left: 20px; } .fetch-button-container button:hover { @@ -30,15 +29,9 @@ color: inherit; /* Inherit color from parent */ font-weight: bold; /* Make the text bold */ font-size: 40px; + margin-bottom: 25px; } -.text-field-token { - margin-left: 70px !important; /* Adjust margin for Token field */ -} - -.text-field-email { - margin-left: 20px !important; /* Adjust margin for Email field */ -} .duckie-container { position: absolute; top: 50%; @@ -69,6 +62,7 @@ flex-direction: column; align-items: center; justify-content: space-around; + marign: 20px; } .horizontal-group { @@ -79,9 +73,14 @@ border-radius: 10px; margin-top: 90px; width: 1200px; - justify-content: center; + justify-content: space-around; } +.text-fields { + display: flex; + justify-content: row; + gap: 20px; +} .fetch-button-container button { background-color: #00b33c; color: white; @@ -94,13 +93,6 @@ background-color: #007c6c; } -.link-text { - text-decoration: none; /* Remove underline */ - color: inherit; /* Inherit color from parent */ - font-weight: bold; /* Make the text bold */ - font-size: 30px; -} - .center-content { display: flex; justify-content: center; @@ -117,30 +109,6 @@ align-items: center; } -/* Example CSS to maintain tabs fixed position */ -.tabs-container { - position: sticky; - top: 20px; /* Adjust as needed */ - z-index: 1000; /* Ensure tabs are above other content */ -} -.container { - position: relative; /* Ensure the parent is relatively positioned */ - height: 100vh; /* Full viewport height */ - width: 100vw; /* Full viewport width */ - display: flex; - flex-direction: column; /* Ensure children stack vertically */ - justify-content: center; /* Center vertically */ - align-items: center; /* Center horizontally */ -} - -.input-form { - display: flex; - flex-direction: column; - align-items: center; - z-index: 1; /* Ensure form is on top */ - margin-bottom: 20px; /* Add space between form and tabs */ -} - .fetch-button-container button { background-color: #00b33c; color: white; @@ -153,24 +121,6 @@ background-color: #007c6c; } -.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; -} - -.text-field-token { - margin-left: 70px !important; /* Adjust margin for Token field */ -} - -.text-field-email { - margin-left: 50px !important; /* Adjust margin for Email field */ -} - .center-content { display: flex; justify-content: center; @@ -187,14 +137,6 @@ align-items: center; } -.tabs-container { - position: sticky; /* Make the tabs sticky */ - top: 0; /* Stick to the top of the viewport */ - z-index: 1000; /* Ensure tabs are above other content */ - background-color: #fafafa; /* Optional: Add background color to tabs */ - padding: 10px 20px; /* Optional: Add padding for better appearance */ - border-bottom: 1px solid #ccc; /* Optional: Add bottom border */ -} .dialog-popup-container { /* Styles for the overlay/background */ position: fixed; @@ -268,8 +210,8 @@ display: flex; flex-direction: column; align-items: center; + gap: 25px; width: 100%; - margin-top: 150px; } .fetch-button-container { @@ -277,21 +219,22 @@ margin-left: 10px; } -.text-field-token, -.text-field-email { - margin: 0 8px; -} - .error-message { color: red; font-weight: bold; margin-top: 16px; } +/* MUi Component Custom CSS */ +css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + padding: none; + margin: none; +} + /* Mobile */ @media screen and (max-width: 475px) { .link-text { - font-size: 25px; + font-size: 30px; text-align: center; } .input-form { @@ -300,11 +243,20 @@ gap: 20px; flex-direction: row; } - .text-field-token { - } .horizontal-group { width: 500px; flex-direction: column; + gap: 25px; + } + .text-fields { + width: fit-content; + flex-direction: column; + gap: 20px; + justify-content: center; + } + .text-fields label { + padding: 0; + margin: none; } } diff --git a/infra/staff/src/App.tsx b/infra/staff/src/App.tsx index 98e1725ac28..15a8b6fc31b 100644 --- a/infra/staff/src/App.tsx +++ b/infra/staff/src/App.tsx @@ -227,7 +227,8 @@ const App: React.FC = () => { const handleTabChange = ( _event: React.SyntheticEvent, - newValue: number, + + newValue: number, ) => { setTabValue(newValue); }; @@ -243,32 +244,35 @@ const App: React.FC = () => { rel="noopener noreferrer" className="link-text" > - staff.ente.sh + Ente Dashboard - - { - setLocalToken(e.target.value); - setToken(e.target.value); - }} - size="medium" - className="text-field-token" - style={{ maxWidth: "parent" }} - /> - { - setLocalEmail(e.target.value); - setEmail(e.target.value); - }} - size="medium" - className="text-field-email" - style={{ width: "parent" }} - /> +
+ { + setLocalToken(e.target.value); + setToken(e.target.value); + }} + size="medium" + className="text-field-token" + style={{ maxWidth: "parent" }} + /> + { + setLocalEmail(e.target.value); + setEmail(e.target.value); + }} + size="medium" + className="text-field-email" + style={{ width: "parent" }} + /> +
+