From 7e45b6a638439e03ce429e5316044a20547aa710 Mon Sep 17 00:00:00 2001 From: ValueOn AG Date: Mon, 16 Mar 2026 22:55:27 +0100 Subject: [PATCH] enhanced mobile view --- src/pages/Login.module.css | 80 ++++-- src/pages/Login.tsx | 9 +- src/pages/PasswordResetRequest.module.css | 80 ++++-- src/pages/PasswordResetRequest.tsx | 9 +- src/pages/Register.module.css | 80 ++++-- src/pages/Register.tsx | 9 +- src/pages/Reset.module.css | 80 ++++-- src/pages/Reset.tsx | 18 +- src/pages/views/workspace/WorkspaceInput.tsx | 33 ++- src/pages/views/workspace/WorkspacePage.tsx | 278 +++++++++++++++---- 10 files changed, 489 insertions(+), 187 deletions(-) diff --git a/src/pages/Login.module.css b/src/pages/Login.module.css index 4394f61..a66ca81 100644 --- a/src/pages/Login.module.css +++ b/src/pages/Login.module.css @@ -1,16 +1,21 @@ .container { display: flex; - min-height: 100vh; - + min-height: 100dvh; font-family: "DM Sans", sans-serif; color: var(--color-bg); } +@supports not (min-height: 100dvh) { + .container { + min-height: 100vh; + } +} + .mainContent { flex: 1; display: flex; flex-direction: column; - padding: 3rem; + padding: 2.5rem 2rem; background-color: var(--color-bg); } @@ -18,39 +23,28 @@ display: flex; flex-direction: column; align-items: center; + width: 100%; flex: 1; } -.logoText { - - font-size: 35px; +.logo { display: flex; + justify-content: center; align-items: center; - letter-spacing: -0.5px; - font-weight: 200; + width: 100%; } -.logoPower { - color: var(--color-text); -} - -.logoOn { - color: var(--color-secondary); - font-weight: 700; -} - -.logo img { - height: 40px; +.logoImage { + height: 44px; + width: auto; + object-fit: contain; } .loginBox { - - background-color: var(--color-bg); - width: 25%; + width: min(100%, 460px); height: auto; - - margin-top: 5%; + margin-top: 2rem; padding: 2rem; border-radius: 25px; @@ -297,3 +291,41 @@ button:disabled { .passwordResetLink .textButton:hover { color: var(--color-secondary); } + +@media (max-width: 768px) { + .mainContent { + padding: 1rem; + } + + .logoImage { + height: 40px; + } + + .loginBox { + width: 100%; + margin-top: 1.25rem; + padding: 1.25rem; + border-radius: 20px; + } + + .registerLink { + flex-wrap: wrap; + text-align: center; + } +} + +@media (max-width: 420px) { + .mainContent { + padding: 0.75rem; + } + + .loginBox { + padding: 1rem; + border-radius: 16px; + } + + .input, + .button { + height: 48px; + } +} diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index d06bca0..f5673ee 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -108,10 +108,11 @@ function Login() {
-
- Power - On -
+ PowerOn
diff --git a/src/pages/PasswordResetRequest.module.css b/src/pages/PasswordResetRequest.module.css index b5fcf44..7b12a8b 100644 --- a/src/pages/PasswordResetRequest.module.css +++ b/src/pages/PasswordResetRequest.module.css @@ -1,16 +1,21 @@ .container { display: flex; - min-height: 100vh; - + min-height: 100dvh; font-family: "DM Sans", sans-serif; color: var(--color-bg); } +@supports not (min-height: 100dvh) { + .container { + min-height: 100vh; + } +} + .mainContent { flex: 1; display: flex; flex-direction: column; - padding: 3rem; + padding: 2.5rem 2rem; background-color: var(--color-bg); } @@ -18,39 +23,28 @@ display: flex; flex-direction: column; align-items: center; + width: 100%; flex: 1; } -.logoText { - - font-size: 35px; +.logo { display: flex; + justify-content: center; align-items: center; - letter-spacing: -0.5px; - font-weight: 200; + width: 100%; } -.logoPower { - color: var(--color-text); -} - -.logoOn { - color: var(--color-secondary); - font-weight: 700; -} - -.logo img { - height: 40px; +.logoImage { + height: 44px; + width: auto; + object-fit: contain; } .loginBox { - - background-color: var(--color-bg); - width: 25%; + width: min(100%, 460px); height: auto; - - margin-top: 5%; + margin-top: 2rem; padding: 2rem; border-radius: 25px; @@ -240,3 +234,41 @@ button:disabled { .infoMessage p { margin: 0; } + +@media (max-width: 768px) { + .mainContent { + padding: 1rem; + } + + .logoImage { + height: 40px; + } + + .loginBox { + width: 100%; + margin-top: 1.25rem; + padding: 1.25rem; + border-radius: 20px; + } + + .registerLink { + flex-wrap: wrap; + text-align: center; + } +} + +@media (max-width: 420px) { + .mainContent { + padding: 0.75rem; + } + + .loginBox { + padding: 1rem; + border-radius: 16px; + } + + .input, + .button { + height: 48px; + } +} diff --git a/src/pages/PasswordResetRequest.tsx b/src/pages/PasswordResetRequest.tsx index 6923655..74e4bc0 100644 --- a/src/pages/PasswordResetRequest.tsx +++ b/src/pages/PasswordResetRequest.tsx @@ -54,10 +54,11 @@ function PasswordResetRequest() {
-
- Power - On -
+ PowerOn
diff --git a/src/pages/Register.module.css b/src/pages/Register.module.css index e42373d..a0350a7 100644 --- a/src/pages/Register.module.css +++ b/src/pages/Register.module.css @@ -1,16 +1,21 @@ .container { display: flex; - min-height: 100vh; - + min-height: 100dvh; font-family: "DM Sans", sans-serif; color: var(--color-bg); } +@supports not (min-height: 100dvh) { + .container { + min-height: 100vh; + } +} + .mainContent { flex: 1; display: flex; flex-direction: column; - padding: 3rem; + padding: 2.5rem 2rem; background-color: var(--color-bg); } @@ -18,39 +23,28 @@ display: flex; flex-direction: column; align-items: center; + width: 100%; flex: 1; } -.logoText { - - font-size: 35px; +.logo { display: flex; + justify-content: center; align-items: center; - letter-spacing: -0.5px; - font-weight: 200; + width: 100%; } -.logoPower { - color: var(--color-text); -} - -.logoOn { - color: var(--color-secondary); - font-weight: 700; -} - -.logo img { - height: 40px; +.logoImage { + height: 44px; + width: auto; + object-fit: contain; } .loginBox { - - background-color: var(--color-bg); - width: 25%; + width: min(100%, 460px); height: auto; - - margin-top: 5%; + margin-top: 2rem; padding: 2rem; border-radius: 25px; @@ -273,3 +267,41 @@ button:disabled { .infoMessage p { margin: 0; } + +@media (max-width: 768px) { + .mainContent { + padding: 1rem; + } + + .logoImage { + height: 40px; + } + + .loginBox { + width: 100%; + margin-top: 1.25rem; + padding: 1.25rem; + border-radius: 20px; + } + + .registerLink { + flex-wrap: wrap; + text-align: center; + } +} + +@media (max-width: 420px) { + .mainContent { + padding: 0.75rem; + } + + .loginBox { + padding: 1rem; + border-radius: 16px; + } + + .input, + .button { + height: 48px; + } +} diff --git a/src/pages/Register.tsx b/src/pages/Register.tsx index a3c1403..8c71330 100644 --- a/src/pages/Register.tsx +++ b/src/pages/Register.tsx @@ -137,10 +137,11 @@ function Register() {
-
- Power - On -
+ PowerOn
diff --git a/src/pages/Reset.module.css b/src/pages/Reset.module.css index 401c409..18bda8b 100644 --- a/src/pages/Reset.module.css +++ b/src/pages/Reset.module.css @@ -1,16 +1,21 @@ .container { display: flex; - min-height: 100vh; - + min-height: 100dvh; font-family: "DM Sans", sans-serif; color: var(--color-bg); } +@supports not (min-height: 100dvh) { + .container { + min-height: 100vh; + } +} + .mainContent { flex: 1; display: flex; flex-direction: column; - padding: 3rem; + padding: 2.5rem 2rem; background-color: var(--color-bg); } @@ -18,39 +23,28 @@ display: flex; flex-direction: column; align-items: center; + width: 100%; flex: 1; } -.logoText { - - font-size: 35px; +.logo { display: flex; + justify-content: center; align-items: center; - letter-spacing: -0.5px; - font-weight: 200; + width: 100%; } -.logoPower { - color: var(--color-text); -} - -.logoOn { - color: var(--color-secondary); - font-weight: 700; -} - -.logo img { - height: 40px; +.logoImage { + height: 44px; + width: auto; + object-fit: contain; } .loginBox { - - background-color: var(--color-bg); - width: 25%; + width: min(100%, 460px); height: auto; - - margin-top: 5%; + margin-top: 2rem; padding: 2rem; border-radius: 25px; @@ -234,3 +228,41 @@ button:disabled { font-family: var(--font-family); margin-bottom: 10px; } + +@media (max-width: 768px) { + .mainContent { + padding: 1rem; + } + + .logoImage { + height: 40px; + } + + .loginBox { + width: 100%; + margin-top: 1.25rem; + padding: 1.25rem; + border-radius: 20px; + } + + .registerLink { + flex-wrap: wrap; + text-align: center; + } +} + +@media (max-width: 420px) { + .mainContent { + padding: 0.75rem; + } + + .loginBox { + padding: 1rem; + border-radius: 16px; + } + + .input, + .button { + height: 48px; + } +} diff --git a/src/pages/Reset.tsx b/src/pages/Reset.tsx index 617ef01..6f9eb1a 100644 --- a/src/pages/Reset.tsx +++ b/src/pages/Reset.tsx @@ -96,10 +96,11 @@ function Reset() {
-
- Power - On -
+ PowerOn
@@ -135,10 +136,11 @@ function Reset() {
-
- Power - On -
+ PowerOn
diff --git a/src/pages/views/workspace/WorkspaceInput.tsx b/src/pages/views/workspace/WorkspaceInput.tsx index 6ff1095..b400553 100644 --- a/src/pages/views/workspace/WorkspaceInput.tsx +++ b/src/pages/views/workspace/WorkspaceInput.tsx @@ -44,6 +44,7 @@ interface WorkspaceInputProps { uploading?: boolean; selectedProviders?: string[]; onProvidersChange?: (providers: string[]) => void; + isMobile?: boolean; } export const WorkspaceInput: React.FC = ({ @@ -59,6 +60,7 @@ export const WorkspaceInput: React.FC = ({ uploading = false, selectedProviders = [], onProvidersChange, + isMobile = false, }) => { const [prompt, setPrompt] = useState(''); const [showAutocomplete, setShowAutocomplete] = useState(false); @@ -267,6 +269,8 @@ export const WorkspaceInput: React.FC = ({ : []; const hasAttachments = attachedFileIds.length > 0 || attachedDataSourceIds.length > 0; + const _horizontalPadding = isMobile ? 12 : 24; + const _controlSize = isMobile ? 38 : 40; return (
= ({ {/* Pending uploaded files */} {pendingFiles.length > 0 && (
= ({ {/* Attachment bar */} {hasAttachments && (
= ({
= ({ )} {/* Main input row */} -
+