mirror of
https://github.com/He4eT/tabswitcher.git
synced 2026-05-05 01:17:23 +00:00
pages/search: indicator for discarded tabs
This commit is contained in:
parent
bd95d1c114
commit
bcf56cf841
4 changed files with 25 additions and 1 deletions
|
|
@ -8,10 +8,14 @@ const tabView = (result) => {
|
|||
const [label, title, url] =
|
||||
result.map((field) => fuzzysort.highlight(field))
|
||||
|
||||
const tooltip = (tab.discarded ? `[discarded] ` : '')
|
||||
+ `${tab.title}\n${tab.url}`
|
||||
|
||||
return `
|
||||
<button class='tab' data-id='${tab.id}'>
|
||||
<button class='tab' data-id='${tab.id}' title='${tooltip}'>
|
||||
<span class='label'>${label ?? tab.label}</span>
|
||||
<img class='favicon' src='${tab.favIconUrl ?? defaultFavicon}'/>
|
||||
<div class='indicator ${tab.discarded ? 'discarded' : 'active'}'></div>
|
||||
<span class='title'>${title ?? tab.title}</span>
|
||||
<span class='url'>${url ?? tab.url}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export const init = ({
|
|||
})
|
||||
|
||||
const pickFields = (tab) => [
|
||||
'discarded',
|
||||
'favIconUrl',
|
||||
'id',
|
||||
'label',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue