GeezerVison is showing github.com — tui: align session empty states (#16412) · Luminger/opencode@6b99dd5
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: packages/app/src/components/session/session-new-view.tsx +33-27Lines changed: 33 additions & 27 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,8 +8,7 @@ import { getDirectory, getFilename } from "@opencode-ai/util/path" | 8 | 8 |
| 9 | 9 | const MAIN_WORKTREE = "main" | 10 | 10 | const CREATE_WORKTREE = "create" | 11 | | -const ROOT_CLASS = | 12 | | - "size-full flex flex-col justify-end items-start gap-4 flex-[1_0_0] self-stretch max-w-200 mx-auto 2xl:max-w-[1000px] px-6 pb-16" | | 11 | +const ROOT_CLASS = "size-full flex flex-col" | 13 | 12 |
| 14 | 13 | interface NewSessionViewProps { | 15 | 14 | worktree: string | @@ -50,33 +49,40 @@ export function NewSessionView(props: NewSessionViewProps) { | 50 | 49 |
| 51 | 50 | return ( | 52 | 51 | <div class={ROOT_CLASS}> | 53 | | - <div class="text-20-medium text-text-weaker">{language.t("command.session.new")}</div> | 54 | | - <div class="flex justify-center items-start gap-3 min-h-5"> | 55 | | - <Icon name="folder" size="small" class="mt-0.5 shrink-0" /> | 56 | | - <div class="text-12-medium text-text-weak select-text leading-5"> | 57 | | - {getDirectory(projectRoot())} | 58 | | - <span class="text-text-strong">{getFilename(projectRoot())}</span> | 59 | | - </div> | 60 | | - </div> | 61 | | - <div class="flex justify-center items-start gap-3 min-h-5"> | 62 | | - <Icon name="branch" size="small" class="mt-0.5 shrink-0" /> | 63 | | - <div class="text-12-medium text-text-weak select-text leading-5">{label(current())}</div> | 64 | | - </div> | 65 | | - <Show when={sync.project}> | 66 | | - {(project) => ( | 67 | | - <div class="flex justify-center items-start gap-3 min-h-5"> | 68 | | - <Icon name="pencil-line" size="small" class="mt-0.5 shrink-0" /> | 69 | | - <div class="text-12-medium text-text-weak leading-5"> | 70 | | - {language.t("session.new.lastModified")} | 71 | | - <span class="text-text-strong"> | 72 | | - {DateTime.fromMillis(project().time.updated ?? project().time.created) | 73 | | - .setLocale(language.intl()) | 74 | | - .toRelative()} | 75 | | - </span> | | 52 | + <div class="h-12 shrink-0" aria-hidden /> | | 53 | + <div class="flex-1 px-6 pb-30 flex items-center justify-center text-center"> | | 54 | + <div class="w-full max-w-200 flex flex-col items-center text-center gap-4"> | | 55 | + <div class="text-20-medium text-text-strong">{language.t("session.new.title")}</div> | | 56 | + <div class="w-full flex flex-col gap-4 items-center"> | | 57 | + <div class="flex items-start justify-center gap-3 min-h-5"> | | 58 | + <div class="text-12-medium text-text-weak select-text leading-5 min-w-0 max-w-160 break-words text-center"> | | 59 | + {getDirectory(projectRoot())} | | 60 | + <span class="text-text-strong">{getFilename(projectRoot())}</span> | | 61 | + </div> | 76 | 62 | </div> | | 63 | + <div class="flex items-start justify-center gap-1.5 min-h-5"> | | 64 | + <Icon name="branch" size="small" class="mt-0.5 shrink-0" /> | | 65 | + <div class="text-12-medium text-text-weak select-text leading-5 min-w-0 max-w-160 break-words text-center"> | | 66 | + {label(current())} | | 67 | + </div> | | 68 | + </div> | | 69 | + <Show when={sync.project}> | | 70 | + {(project) => ( | | 71 | + <div class="flex items-start justify-center gap-3 min-h-5"> | | 72 | + <div class="text-12-medium text-text-weak leading-5 min-w-0 max-w-160 break-words text-center"> | | 73 | + {language.t("session.new.lastModified")} | | 74 | + <span class="text-text-strong"> | | 75 | + {DateTime.fromMillis(project().time.updated ?? project().time.created) | | 76 | + .setLocale(language.intl()) | | 77 | + .toRelative()} | | 78 | + </span> | | 79 | + </div> | | 80 | + </div> | | 81 | + )} | | 82 | + </Show> | 77 | 83 | </div> | 78 | | - )} | 79 | | - </Show> | | 84 | + </div> | | 85 | + </div> | 80 | 86 | </div> | 81 | 87 | ) | 82 | 88 | } |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/ar.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -456,6 +456,7 @@ export const dict = { | 456 | 456 | "session.todo.title": "المهام", | 457 | 457 | "session.todo.collapse": "طي", | 458 | 458 | "session.todo.expand": "توسيع", | | 459 | + "session.new.title": "ابنِ أي شيء", | 459 | 460 | "session.new.worktree.main": "الفرع الرئيسي", | 460 | 461 | "session.new.worktree.mainWithBranch": "الفرع الرئيسي ({{branch}})", | 461 | 462 | "session.new.worktree.create": "إنشاء شجرة عمل جديدة", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/br.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -459,6 +459,7 @@ export const dict = { | 459 | 459 | "session.todo.title": "Tarefas", | 460 | 460 | "session.todo.collapse": "Recolher", | 461 | 461 | "session.todo.expand": "Expandir", | | 462 | + "session.new.title": "Crie qualquer coisa", | 462 | 463 | "session.new.worktree.main": "Branch principal", | 463 | 464 | "session.new.worktree.mainWithBranch": "Branch principal ({{branch}})", | 464 | 465 | "session.new.worktree.create": "Criar novo worktree", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/bs.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -515,6 +515,7 @@ export const dict = { | 515 | 515 | "session.todo.collapse": "Sažmi", | 516 | 516 | "session.todo.expand": "Proširi", | 517 | 517 |
| | 518 | + "session.new.title": "Napravi bilo šta", | 518 | 519 | "session.new.worktree.main": "Glavna grana", | 519 | 520 | "session.new.worktree.mainWithBranch": "Glavna grana ({{branch}})", | 520 | 521 | "session.new.worktree.create": "Kreiraj novi worktree", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/da.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -510,6 +510,7 @@ export const dict = { | 510 | 510 | "session.todo.collapse": "Skjul", | 511 | 511 | "session.todo.expand": "Udvid", | 512 | 512 |
| | 513 | + "session.new.title": "Byg hvad som helst", | 513 | 514 | "session.new.worktree.main": "Hovedgren", | 514 | 515 | "session.new.worktree.mainWithBranch": "Hovedgren ({{branch}})", | 515 | 516 | "session.new.worktree.create": "Opret nyt worktree", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/de.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -467,6 +467,7 @@ export const dict = { | 467 | 467 | "session.todo.title": "Aufgaben", | 468 | 468 | "session.todo.collapse": "Einklappen", | 469 | 469 | "session.todo.expand": "Ausklappen", | | 470 | + "session.new.title": "Baue, was du willst", | 470 | 471 | "session.new.worktree.main": "Haupt-Branch", | 471 | 472 | "session.new.worktree.mainWithBranch": "Haupt-Branch ({{branch}})", | 472 | 473 | "session.new.worktree.create": "Neuen Worktree erstellen", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/en.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -531,6 +531,7 @@ export const dict = { | 531 | 531 | "session.todo.collapse": "Collapse", | 532 | 532 | "session.todo.expand": "Expand", | 533 | 533 |
| | 534 | + "session.new.title": "Build anything", | 534 | 535 | "session.new.worktree.main": "Main branch", | 535 | 536 | "session.new.worktree.mainWithBranch": "Main branch ({{branch}})", | 536 | 537 | "session.new.worktree.create": "Create new worktree", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/es.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -516,6 +516,7 @@ export const dict = { | 516 | 516 | "session.todo.collapse": "Contraer", | 517 | 517 | "session.todo.expand": "Expandir", | 518 | 518 |
| | 519 | + "session.new.title": "Construye lo que quieras", | 519 | 520 | "session.new.worktree.main": "Rama principal", | 520 | 521 | "session.new.worktree.mainWithBranch": "Rama principal ({{branch}})", | 521 | 522 | "session.new.worktree.create": "Crear nuevo árbol de trabajo", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/fr.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -463,6 +463,7 @@ export const dict = { | 463 | 463 | "session.todo.title": "Tâches", | 464 | 464 | "session.todo.collapse": "Réduire", | 465 | 465 | "session.todo.expand": "Développer", | | 466 | + "session.new.title": "Créez ce que vous voulez", | 466 | 467 | "session.new.worktree.main": "Branche principale", | 467 | 468 | "session.new.worktree.mainWithBranch": "Branche principale ({{branch}})", | 468 | 469 | "session.new.worktree.create": "Créer un nouvel arbre de travail", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/ja.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -457,6 +457,7 @@ export const dict = { | 457 | 457 | "session.todo.title": "ToDo", | 458 | 458 | "session.todo.collapse": "折りたたむ", | 459 | 459 | "session.todo.expand": "展開", | | 460 | + "session.new.title": "何でも作る", | 460 | 461 | "session.new.worktree.main": "メインブランチ", | 461 | 462 | "session.new.worktree.mainWithBranch": "メインブランチ ({{branch}})", | 462 | 463 | "session.new.worktree.create": "新しいワークツリーを作成", | |
|