From d216567c02298afbcdaaf66f4bb7297cb0bc4e02 Mon Sep 17 00:00:00 2001 From: sagit <36596628+Sagit-chu@users.noreply.github.com> Date: Fri, 20 Feb 2026 18:31:39 +0800 Subject: [PATCH] fix(frontend): switch grouped forward view to full list (#161) * fix(frontend): left-align announcement logo in homepage banner * fix(frontend): keep multiselect panels floating and preserve summaries * fix(frontend): rebalance config card header spacing * fix(frontend): normalize formatting and fix multiselect modal behavior * fix(frontend): polish batch actions and sharing page guidance * fix(frontend): switch grouped forward view to full list * fix(backend): switch diagnosis internet target to bing * style(frontend): beautify forward group view list display * style: remove 'x' suffix from traffic ratio input and center config alert * fix(ui): expand exit node select upwards in modal * style: fix vertical alignment of logo and title in announcement banner --- .../internal/http/handler/control_plane.go | 6 +- vite-frontend/src/pages/config.tsx | 24 +- .../components/announcement-banner.tsx | 10 +- vite-frontend/src/pages/forward.tsx | 498 ++++++++++-------- vite-frontend/src/pages/node.tsx | 2 +- vite-frontend/src/pages/panel-sharing.tsx | 4 +- vite-frontend/src/pages/tunnel.tsx | 137 +++-- .../src/shadcn-bridge/heroui/date-picker.tsx | 121 ++--- .../src/shadcn-bridge/heroui/select.tsx | 11 +- .../src/shadcn-bridge/heroui/table.tsx | 28 +- 10 files changed, 429 insertions(+), 412 deletions(-) diff --git a/go-backend/internal/http/handler/control_plane.go b/go-backend/internal/http/handler/control_plane.go index ebedd86..e34aff3 100644 --- a/go-backend/internal/http/handler/control_plane.go +++ b/go-backend/internal/http/handler/control_plane.go @@ -481,7 +481,7 @@ func (h *Handler) diagnoseTunnelRuntime(tunnelID int64) (map[string]interface{}, case 1: for _, inNode := range inNodes { description := fmt.Sprintf("入口(%s)->外网", inNode.NodeName) - h.appendPathDiagnosis(&results, nodeCache, inNode.NodeID, "www.google.com", 443, description, map[string]interface{}{ + h.appendPathDiagnosis(&results, nodeCache, inNode.NodeID, "www.bing.com", 443, description, map[string]interface{}{ "fromChainType": 1, }) } @@ -534,14 +534,14 @@ func (h *Handler) diagnoseTunnelRuntime(tunnelID int64) (map[string]interface{}, for _, outNode := range outNodes { description := fmt.Sprintf("出口(%s)->外网", outNode.NodeName) - h.appendPathDiagnosis(&results, nodeCache, outNode.NodeID, "www.google.com", 443, description, map[string]interface{}{ + h.appendPathDiagnosis(&results, nodeCache, outNode.NodeID, "www.bing.com", 443, description, map[string]interface{}{ "fromChainType": 3, }) } default: for _, inNode := range inNodes { description := fmt.Sprintf("入口(%s)->外网", inNode.NodeName) - h.appendPathDiagnosis(&results, nodeCache, inNode.NodeID, "www.google.com", 443, description, map[string]interface{}{ + h.appendPathDiagnosis(&results, nodeCache, inNode.NodeID, "www.bing.com", 443, description, map[string]interface{}{ "fromChainType": 1, }) } diff --git a/vite-frontend/src/pages/config.tsx b/vite-frontend/src/pages/config.tsx index 8d862b5..87148e0 100644 --- a/vite-frontend/src/pages/config.tsx +++ b/vite-frontend/src/pages/config.tsx @@ -149,7 +149,7 @@ const getInitialConfigs = (): Record => { initialConfigs[key] = cachedValue; } }); - } catch {} + } catch { } return initialConfigs; }; @@ -528,11 +528,10 @@ export default function ConfigPage() { - { - const nextValue = event.target.value; - - setTextValue(nextValue); - notifyNativeDateChange(nextValue); - }} - /> - - ) : ( - { - notifyNativeDateChange(event.target.value); - }} - /> - )} + : undefined + } + /> ); } diff --git a/vite-frontend/src/shadcn-bridge/heroui/select.tsx b/vite-frontend/src/shadcn-bridge/heroui/select.tsx index 8ceaa79..7c8f07d 100644 --- a/vite-frontend/src/shadcn-bridge/heroui/select.tsx +++ b/vite-frontend/src/shadcn-bridge/heroui/select.tsx @@ -37,6 +37,7 @@ export interface SelectProps extends FieldMetaProps { selectionMode?: SelectionMode; size?: "sm" | "md" | "lg"; variant?: string; + dropdownPlacement?: "bottom" | "top"; } export interface SelectItemProps { @@ -163,6 +164,7 @@ export function Select({ selectedKeys, selectionMode = "single", size, + dropdownPlacement = "bottom", }: SelectProps) { const generatedId = React.useId(); const options = React.useMemo( @@ -284,9 +286,16 @@ export function Select({ return null; } + const placementClasses = dropdownPlacement === "top" + ? "bottom-full mb-1" + : "top-full mt-1"; + return (
({}); @@ -24,7 +28,13 @@ export function Table({ ...props }: TableProps) { return ( - +
@@ -151,11 +161,23 @@ export function TableColumn({ } export function TableRow({ className, ...props }: React.ComponentProps<"tr">) { + const { trClassName } = React.useContext(TableStyleContext); + return ( - + ); } export function TableCell({ className, ...props }: React.ComponentProps<"td">) { - return ; + const { tdClassName } = React.useContext(TableStyleContext); + + return ( + + ); }