diff --git a/src/actors/LinkHandlerChild.ts b/src/actors/LinkHandlerChild.ts index 5eb00fc..155ded6 100644 --- a/src/actors/LinkHandlerChild.ts +++ b/src/actors/LinkHandlerChild.ts @@ -23,9 +23,7 @@ type PageShow = PageTransitionEvent & { type: 'pageshow' } type PageHide = PageTransitionEvent & { type: 'pagehide' } export class LinkHandlerChild extends JSWindowActorChild { - iconLoader = new FaviconLoader( - this, - ) as import('../modules/FaviconLoader.ts').FaviconLoader + iconLoader = new FaviconLoader(this) loadedTabIcon = false /** diff --git a/src/content/browser/components/customizableUI/Tabs.svelte b/src/content/browser/components/customizableUI/Tabs.svelte index b066bcd..e759cde 100644 --- a/src/content/browser/components/customizableUI/Tabs.svelte +++ b/src/content/browser/components/customizableUI/Tabs.svelte @@ -11,20 +11,69 @@ import Tab from '@browser/components/tabs/Tab.svelte' import UiItemBase from './UIItemBase.svelte' - import { selectedTabId, tabs } from '@browser/lib/window/tabs' + import { openTab, selectedTabId, tabs } from '@browser/lib/window/tabs' + import ToolbarButton from '@shared/components/ToolbarButton.svelte' + import { onMount } from 'svelte' export let component: ComponentId & TabsComponent export let root: Component + + let overflow = false + let arrowBox: HTMLElement + + onMount(() => { + arrowBox.addEventListener('overflow', () => (overflow = true)) + arrowBox.addEventListener('underflow', () => (overflow = false)) + }) e.preventDefault()}> - {#each $tabs as tab (tab.getId())} - - {/each} + + {#each $tabs as tab (tab.getId())} + + {/each} + + {#if !overflow} + openTab()}> + + + {/if} + + + {#if overflow} + openTab()}> + + + {/if} diff --git a/src/content/browser/components/tabs/Tab.svelte b/src/content/browser/components/tabs/Tab.svelte index 1e6b2c4..d8f7bf8 100644 --- a/src/content/browser/components/tabs/Tab.svelte +++ b/src/content/browser/components/tabs/Tab.svelte @@ -50,6 +50,9 @@ favicon {/if} {$title || $uri.asciiSpec} + + +