Skip to content

Commit f21de0e

Browse files
committed
feat(anchor-tabs): use home icon for bind marker and menu entry
- Always use the "home" icon for the corner marker; distinguish the navigated-away state with the accent colour instead of swapping to the "undo" icon. - Use the "home" icon for the Bind URL context-menu entry as well (it previously showed "undo" in the unbound state).
1 parent 45e0ab2 commit f21de0e

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/services/menu.fg.options.tabs.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export const tabsMenuOptions: Record<string, () => MenuOption | MenuOption[] | u
266266
if (!firstTab) return
267267
return {
268268
label: translate('menu.tab.' + (firstTab.anchorUrl ? 'unanchor' : 'anchor')),
269-
icon: firstTab.anchorUrl ? 'icon_home' : 'icon_undo',
269+
icon: 'icon_home',
270270
onClick: firstTab.anchorUrl
271271
? () => Tabs.unanchorTabs(selected)
272272
: () => Tabs.anchorTabs(selected),

‎src/sidebar/components/tab.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
svg.progress-spinner(v-else): use(href="#icon_hourglass")
5151
.child-count(v-if="tab.reactive.folded && tab.reactive.branchLen") {{tab.reactive.branchLen}}
5252
.bind-mark(v-if="tab.reactive.anchored")
53-
svg.bind-mark-icon: use(:href="tab.reactive.anchoredAway ? '#icon_undo' : '#icon_home'")
53+
svg.bind-mark-icon: use(href="#icon_home")
5454
.audio(
5555
v-if="tab.reactive.mediaAudible || tab.reactive.mediaMuted || tab.reactive.mediaPaused"
5656
@mousedown.stop.prevent="onAudioMouseDown($event, tab)"

‎src/styles/sidebar/tab.styl‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@
712712
.Tab[data-active="true"] .bind-mark-icon
713713
fill: var(--tabs-activated-fg)
714714

715+
// Navigated away from the bound URL — highlight the marker with the accent
716+
.Tab[data-anchored-away="true"] .bind-mark-icon
717+
fill: var(--accent)
718+
715719
// ---
716720
// -- Keyframes
717721
// -

0 commit comments

Comments
 (0)