feat(desktop): polish inline session title editing (#34607)
This commit is contained in:
@@ -736,8 +736,9 @@ export function MessageTimeline(props: {
|
|||||||
if (!sessionID() || parentID()) return
|
if (!sessionID() || parentID()) return
|
||||||
setTitle({ editing: true, draft: titleLabel() ?? "" })
|
setTitle({ editing: true, draft: titleLabel() ?? "" })
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
titleRef?.focus()
|
if (!titleRef) return
|
||||||
titleRef?.select()
|
titleRef.focus()
|
||||||
|
titleRef.select()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1369,7 +1370,7 @@ export function MessageTimeline(props: {
|
|||||||
"pr-3": !settings.general.newLayoutDesigns(),
|
"pr-3": !settings.general.newLayoutDesigns(),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class="flex items-center min-w-0 grow-1">
|
<div class="flex items-center min-w-0 flex-1 w-full">
|
||||||
<Show when={parentID()}>
|
<Show when={parentID()}>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -1413,9 +1414,9 @@ export function MessageTimeline(props: {
|
|||||||
value={title.draft}
|
value={title.draft}
|
||||||
disabled={titleMutation.isPending}
|
disabled={titleMutation.isPending}
|
||||||
classList={{
|
classList={{
|
||||||
"text-14-medium text-text-strong grow-1 min-w-0 pl-1 ml-1": true,
|
"text-14-medium text-text-strong block": true,
|
||||||
"grow-1 min-w-0 pl-1 -ml-1 rounded-[6px]": !settings.general.newLayoutDesigns(),
|
"w-full flex-1 grow-1 min-w-0 pl-1 -ml-1 rounded-[6px]": !settings.general.newLayoutDesigns(),
|
||||||
"rounded-[6px] -ml-2 px-2 py-1 h-6 leading-4 focus:shadow-none focus:outline focus:outline-1 focus:outline-offset-[-1px] focus:outline-v2-border-border-focus":
|
"field-sizing-content self-start rounded-[6px] px-2 py-1 ":
|
||||||
settings.general.newLayoutDesigns(),
|
settings.general.newLayoutDesigns(),
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user