Browse Source

adjust menu buttons

imwald
Silberengel 1 week ago
parent
commit
fc60aaaba5
  1. 4
      src/lib/utils.ts
  2. 2
      src/pages/primary/NoteListPage/index.tsx

4
src/lib/utils.ts

@ -105,10 +105,6 @@ export function nearestScrollportRoot(el: HTMLElement | null): Element | undefin
return undefined return undefined
} }
function rectsOverlap(a: DOMRectReadOnly, b: DOMRectReadOnly): boolean {
return a.bottom > b.top && a.top < b.bottom && a.right > b.left && a.left < b.right
}
/** True when `el` intersects the viewport or its nearest scrollport (with margin). */ /** True when `el` intersects the viewport or its nearest scrollport (with margin). */
export function elementIsNearVisibleScrollport(el: HTMLElement, marginPx: number): boolean { export function elementIsNearVisibleScrollport(el: HTMLElement, marginPx: number): boolean {
const elRect = el.getBoundingClientRect() const elRect = el.getBoundingClientRect()

2
src/pages/primary/NoteListPage/index.tsx

@ -179,6 +179,7 @@ function NoteListPageTitlebar({
<Flame /> <Flame />
</Button> </Button>
) : null} ) : null}
<LibraryTitlebarButton />
</div> </div>
<div className="flex min-h-0 min-w-0 items-center justify-center gap-0.5 px-0.5"> <div className="flex min-h-0 min-w-0 items-center justify-center gap-0.5 px-0.5">
<button <button
@ -194,7 +195,6 @@ function NoteListPageTitlebar({
<Logo className="max-h-7 w-full min-w-0 object-contain object-center sm:max-h-8" /> <Logo className="max-h-7 w-full min-w-0 object-contain object-center sm:max-h-8" />
</button> </button>
<DiscussionsTitlebarButton /> <DiscussionsTitlebarButton />
<LibraryTitlebarButton />
<Button <Button
variant="ghost" variant="ghost"
size="titlebar-icon" size="titlebar-icon"

Loading…
Cancel
Save