feat: search field of the history panel stands out (recess, focus border, magnifier)

Co-Authored-By: Ovis Fast (Claude) <[email protected]>
This commit is contained in:
FactorandOvis Fast committed 2026-11-19 12:34:00 +01:00
1 parent 44521e478d
commit 02d579c8b8
4 files changed
+87

No files matched your search

+11
View File
@@ -32,6 +32,8 @@ const TEXT_HEIGHT = 34;
* query: string,
* index: number,
* input: object,
* searchFocused: boolean,
* fieldBackground: string,
* scroll: object,
* isFavorite: (text:string) => boolean,
* }} view
@@ -83,12 +85,21 @@ function renderTop(t, view, on) {
.children([
renderTab(t, "history", `Historia ${counts.history}`, view.tab === "history", on),
renderTab(t, "favorites", `Ulubione ${counts.favorites}`, view.tab === "favorites", on),
// The search field: a darker recess with a border that lights up while
// the field has the keyboard (the `.hsearch` of the mockup).
h_flex()
.id("composer-panel-search")
.flex_1()
.min_w(0)
.h(30)
.px(10)
.items_center()
.gap(6)
.rounded(8)
.bg(view.fieldBackground)
.border_1()
.border_color(view.searchFocused ? t.accent : t.input)
.child(div().flex_none().text_size(13).text_color(t.dim).child("⌕"))
.child(Input.new(view.input).flex_1().min_w(0).text_size(12.5))
.when(view.query !== "", (el) =>
el.child(