Skip to content

Commit 4cc8fe9

Browse files
committed
[frontend] chore: bump dreamland
1 parent a801212 commit 4cc8fe9

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

frontend/src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ export const App: Component = function (cx) {
1111
<div id="app">
1212
<ThemeVars colors={use(config.theme)} />
1313
<Tabs
14-
tabs={use(browser.tabs).bind()}
15-
activetab={use(browser.activetab).bind()}
14+
tabs={use(browser.tabs)}
15+
activetab={use(browser.activetab)}
1616
addTab={() => {
1717
browser.newTab(new URL("puter://newtab"), true);
1818
}}
1919
destroyTab={(tab: Tab) => {
2020
browser.destroyTab(tab);
2121
}}
2222
/>
23-
<Omnibox tab={use(browser.activetab).bind()} />
23+
<Omnibox tab={use(browser.activetab)} />
2424
{cx.children}
2525
</div>
2626
);

frontend/src/components/Omnibox.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,23 @@ export const UrlInput: Component<
190190
src={item.favicon || "/vite.svg"}
191191
alt="favicon"
192192
/>
193-
{(item.title && <span class="description">{item.title} - </span>) ||
193+
{(item.title && (
194+
<span class="description">
195+
{item.title.startsWith(this.input.value) ? (
196+
<>
197+
<span>
198+
{item.title.substring(0, this.input.value.length)}
199+
</span>
200+
<span style="font-weight: normal; opacity: 0.7;">
201+
{item.title.substring(this.input.value.length)}
202+
</span>
203+
</>
204+
) : (
205+
<span>item.title</span>
206+
)}
207+
<span>{" - "}</span>
208+
</span>
209+
)) ||
194210
""}
195211
<span class="url">{trimUrl(item.url)}</span>
196212
</div>
@@ -200,8 +216,8 @@ export const UrlInput: Component<
200216
<IconButton icon={iconShield}></IconButton>
201217
{use(this.active).andThen(
202218
<input
203-
this={use(this.input).bind()}
204-
value={use(this.value).bind()}
219+
this={use(this.input)}
220+
value={use(this.value)}
205221
on:keydown={(e: KeyboardEvent) => {
206222
if (e.key === "ArrowDown") {
207223
e.preventDefault();

frontend/src/components/TabStrip.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,8 @@ export const Tabs: Component<
451451
let tabcache = {};
452452

453453
return (
454-
<div this={use(this.container).bind()}>
455-
<div class="extra left" this={use(this.leftEl).bind()}></div>
454+
<div this={use(this.container)}>
455+
<div class="extra left" this={use(this.leftEl)}></div>
456456
{use(this.tabs).mapEach((tab) =>
457457
memoize(
458458
() => (
@@ -471,10 +471,10 @@ export const Tabs: Component<
471471
tabcache
472472
)
473473
)}
474-
<div class="extra after" this={use(this.afterEl).bind()}>
474+
<div class="extra after" this={use(this.afterEl)}>
475475
<IconButton icon={iconAdd} click={this.addTab}></IconButton>
476476
</div>
477-
<div class="extra right" this={use(this.rightEl).bind()}></div>
477+
<div class="extra right" this={use(this.rightEl)}></div>
478478
</div>
479479
);
480480
};

0 commit comments

Comments
 (0)