Просмотр исходного кода

fix: toggle timestamps now properly hides/shows timestamps when toggled (resolves #5142) (#5145)

Ariane Emory 2 месяцев назад
Родитель
Сommit
4cf2322b7f
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

+ 6 - 6
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -1049,12 +1049,12 @@ function UserMessage(props: {
               <Show
                 when={queued()}
                 fallback={
-                  <span style={{ fg: theme.textMuted }}>
-                    {ctx.usernameVisible() ? " · " : " "}
-                    {ctx.showTimestamps()
-                      ? Locale.todayTimeOrDateTime(props.message.time.created)
-                      : Locale.time(props.message.time.created)}
-                  </span>
+                  <Show when={ctx.showTimestamps()}>
+                    <span style={{ fg: theme.textMuted }}>
+                      {ctx.usernameVisible() ? " · " : " "}
+                      {Locale.todayTimeOrDateTime(props.message.time.created)}
+                    </span>
+                  </Show>
                 }
               >
                 <span style={{ bg: theme.accent, fg: theme.backgroundPanel, bold: true }}> QUEUED </span>