GeezerVison is showing github.com — fix(browser): the new tab page's prompt sits 80 pt below the top as o… · anomalyco/opencode-rune@93f2096
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: plugins/browser/panel.luau +15-17Lines changed: 15 additions & 17 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -462,19 +462,19 @@ end | 462 | 462 | -- The new tab page: Open a page and what it's for, top-aligned; or the newest visits. | 463 | 463 | local function home(env: Env, view: View, tab: BrowserTab, width: number): ui.Node | 464 | 464 | local visits = env.visits() | 465 | | - -- `panel.tsx:1474-1477`: the sign-in offer heads the new tab page while it offers. | | 465 | + -- `panel.tsx:1474-1477`: the sign-in offer heads the new tab page while it offers. With no offer the page holds | | 466 | + -- nothing above the prompt: a `ui.spacer` stand-in is flexible space and pushed the prompt to the pane's bottom. | 466 | 467 | local offer = if env.signIns then env.signIns(view, tab, "card") else nil | | 468 | + local items: { ui.Node } = if offer then { offer } else {} | 467 | 469 | if #visits == 0 then | 468 | | - return ui.col({ key = "browser-home", dir = "auto", w = "full", grow = 1, minH = 0, scrollY = true, align = "center" }, { | 469 | | - offer or ui.spacer({ w = 0, h = 0 } :: any), | 470 | | - ui.col({ w = "full", maxW = 360, px = 24, pt = 80, gap = 16, align = "center" }, { | 471 | | - ui.icon("outline-globe", { size = 20, color = "icon-weak" }), | 472 | | - ui.col({ w = "full", gap = 8, align = "center" }, { | 473 | | - ui.text(env.I18n:T("home.title"), { size = 13, weight = "medium", lineHeight = 16, color = "text-chrome", textAlign = "center" }), | 474 | | - ui.text(env.I18n:T("home.description"), { size = 13, weight = "regular", lineHeight = 16, color = "text-muted", textAlign = "center", wrap = true }), | 475 | | - }), | | 470 | + table.insert(items, ui.col({ key = "browser-home-prompt", w = "full", maxW = 360, px = 24, pt = 80, gap = 16, align = "center" }, { | | 471 | + ui.icon("outline-globe", { size = 20, color = "icon-weak" }), | | 472 | + ui.col({ w = "full", gap = 8, align = "center" }, { | | 473 | + ui.text(env.I18n:T("home.title"), { size = 13, weight = "medium", lineHeight = 16, color = "text-chrome", textAlign = "center" }), | | 474 | + ui.text(env.I18n:T("home.description"), { size = 13, weight = "regular", lineHeight = 16, color = "text-muted", textAlign = "center", wrap = true }), | 476 | 475 | }), | 477 | | - }) | | 476 | + })) | | 477 | + return ui.col({ key = "browser-home", dir = "auto", w = "full", grow = 1, minH = 0, scrollY = true, align = "center" }, items) | 478 | 478 | end | 479 | 479 | local listW = math.min(608, width) - 48 | 480 | 480 | local rows: { ui.Node } = {} | @@ -486,13 +486,11 @@ local function home(env: Env, view: View, tab: BrowserTab, width: number): ui.No | 486 | 486 | env.act("go", tab, visit.url) | 487 | 487 | end)) | 488 | 488 | end | 489 | | - return ui.col({ key = "browser-home", dir = "auto", w = "full", grow = 1, minH = 0, scrollY = true, align = "center" }, { | 490 | | - offer or ui.spacer({ w = 0, h = 0 } :: any), | 491 | | - ui.col({ w = "full", maxW = 608, px = 24, pt = 48, pb = 40, gap = 16 }, { | 492 | | - ui.text(env.I18n:T("home.recent"), { size = 13, weight = "regular", lineHeight = 16, color = "text-muted" }), | 493 | | - ui.col({ w = "full", gap = 8 }, rows), | 494 | | - }), | 495 | | - }) | | 489 | + table.insert(items, ui.col({ key = "browser-home-recent", w = "full", maxW = 608, px = 24, pt = 48, pb = 40, gap = 16 }, { | | 490 | + ui.text(env.I18n:T("home.recent"), { size = 13, weight = "regular", lineHeight = 16, color = "text-muted" }), | | 491 | + ui.col({ w = "full", gap = 8 }, rows), | | 492 | + })) | | 493 | + return ui.col({ key = "browser-home", dir = "auto", w = "full", grow = 1, minH = 0, scrollY = true, align = "center" }, items) | 496 | 494 | end | 497 | 495 |
| 498 | 496 | -- Plain-language failed-load error page (`failure.ts`, `failure-view.tsx`, `story-browser-load-failed-dark.png`). | |
|