|
|
@@ -8,8 +8,7 @@ import { getDirectory, getFilename } from "@opencode-ai/util/path"
|
|
|
|
|
|
const MAIN_WORKTREE = "main"
|
|
|
const CREATE_WORKTREE = "create"
|
|
|
-const ROOT_CLASS =
|
|
|
- "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"
|
|
|
+const ROOT_CLASS = "size-full flex flex-col"
|
|
|
|
|
|
interface NewSessionViewProps {
|
|
|
worktree: string
|
|
|
@@ -50,33 +49,40 @@ export function NewSessionView(props: NewSessionViewProps) {
|
|
|
|
|
|
return (
|
|
|
<div class={ROOT_CLASS}>
|
|
|
- <div class="text-20-medium text-text-weaker">{language.t("command.session.new")}</div>
|
|
|
- <div class="flex justify-center items-start gap-3 min-h-5">
|
|
|
- <Icon name="folder" size="small" class="mt-0.5 shrink-0" />
|
|
|
- <div class="text-12-medium text-text-weak select-text leading-5">
|
|
|
- {getDirectory(projectRoot())}
|
|
|
- <span class="text-text-strong">{getFilename(projectRoot())}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex justify-center items-start gap-3 min-h-5">
|
|
|
- <Icon name="branch" size="small" class="mt-0.5 shrink-0" />
|
|
|
- <div class="text-12-medium text-text-weak select-text leading-5">{label(current())}</div>
|
|
|
- </div>
|
|
|
- <Show when={sync.project}>
|
|
|
- {(project) => (
|
|
|
- <div class="flex justify-center items-start gap-3 min-h-5">
|
|
|
- <Icon name="pencil-line" size="small" class="mt-0.5 shrink-0" />
|
|
|
- <div class="text-12-medium text-text-weak leading-5">
|
|
|
- {language.t("session.new.lastModified")}
|
|
|
- <span class="text-text-strong">
|
|
|
- {DateTime.fromMillis(project().time.updated ?? project().time.created)
|
|
|
- .setLocale(language.intl())
|
|
|
- .toRelative()}
|
|
|
- </span>
|
|
|
+ <div class="h-12 shrink-0" aria-hidden />
|
|
|
+ <div class="flex-1 px-6 pb-30 flex items-center justify-center text-center">
|
|
|
+ <div class="w-full max-w-200 flex flex-col items-center text-center gap-4">
|
|
|
+ <div class="text-20-medium text-text-strong">{language.t("session.new.title")}</div>
|
|
|
+ <div class="w-full flex flex-col gap-4 items-center">
|
|
|
+ <div class="flex items-start justify-center gap-3 min-h-5">
|
|
|
+ <div class="text-12-medium text-text-weak select-text leading-5 min-w-0 max-w-160 break-words text-center">
|
|
|
+ {getDirectory(projectRoot())}
|
|
|
+ <span class="text-text-strong">{getFilename(projectRoot())}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div class="flex items-start justify-center gap-1.5 min-h-5">
|
|
|
+ <Icon name="branch" size="small" class="mt-0.5 shrink-0" />
|
|
|
+ <div class="text-12-medium text-text-weak select-text leading-5 min-w-0 max-w-160 break-words text-center">
|
|
|
+ {label(current())}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <Show when={sync.project}>
|
|
|
+ {(project) => (
|
|
|
+ <div class="flex items-start justify-center gap-3 min-h-5">
|
|
|
+ <div class="text-12-medium text-text-weak leading-5 min-w-0 max-w-160 break-words text-center">
|
|
|
+ {language.t("session.new.lastModified")}
|
|
|
+ <span class="text-text-strong">
|
|
|
+ {DateTime.fromMillis(project().time.updated ?? project().time.created)
|
|
|
+ .setLocale(language.intl())
|
|
|
+ .toRelative()}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </Show>
|
|
|
</div>
|
|
|
- )}
|
|
|
- </Show>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
)
|
|
|
}
|