From 918f752b1c6ef07614882506a433e89f6f23fdcb Mon Sep 17 00:00:00 2001 From: weishu Date: Tue, 6 Jan 2026 10:31:46 +0800 Subject: [PATCH] refactor: move Server button into help links section below login form Reorganizes the LoginPrompt layout by moving the Server button from an absolute-positioned top-right corner into the main content flow as a text link in a new "Help links" section below the login form. Also adds a "Needs help?" link pointing to the documentation. This reduces visual clutter, improves hierarchy by grouping related actions, and provides better guidance for new users. --- web/src/components/LoginPrompt.tsx | 122 +++++++++++++++-------------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/web/src/components/LoginPrompt.tsx b/web/src/components/LoginPrompt.tsx index 70cbbfe0..bebd4708 100644 --- a/web/src/components/LoginPrompt.tsx +++ b/web/src/components/LoginPrompt.tsx @@ -98,66 +98,6 @@ export function LoginPrompt(props: LoginPromptProps) { return (
- {!isBindMode && ( -
- - - - - - - Server URL - - Set the hapi server origin for API and live updates. - - -
-
- Current: {serverSummary} -
-
- - { - setServerInput(e.target.value) - setServerError(null) - }} - placeholder="https://hapi.example.com" - className="w-full px-3 py-2.5 rounded-lg border border-[var(--app-border)] bg-[var(--app-bg)] text-[var(--app-fg)] placeholder:text-[var(--app-hint)] focus:outline-none focus:ring-2 focus:ring-[var(--app-button)] focus:border-transparent" - /> -
- Use http(s) only. Any path is ignored. -
-
- - {serverError && ( -
- {serverError} -
- )} - -
- {props.serverUrl && ( - - )} - -
-
-
-
-
- )}
{/* Header */}
@@ -203,6 +143,68 @@ export function LoginPrompt(props: LoginPromptProps) { )} + + {/* Help links */} + {!isBindMode && ( +
+ + Needs help? + + + + + + + + Server URL + + Set the hapi server origin for API and live updates. + + +
+
+ Current: {serverSummary} +
+
+ + { + setServerInput(e.target.value) + setServerError(null) + }} + placeholder="https://hapi.example.com" + className="w-full px-3 py-2.5 rounded-lg border border-[var(--app-border)] bg-[var(--app-bg)] text-[var(--app-fg)] placeholder:text-[var(--app-hint)] focus:outline-none focus:ring-2 focus:ring-[var(--app-button)] focus:border-transparent" + /> +
+ Use http(s) only. Any path is ignored. +
+
+ + {serverError && ( +
+ {serverError} +
+ )} + +
+ {props.serverUrl && ( + + )} + +
+
+
+
+
+ )}
{/* Footer */}