mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(web): add sticky group headers to session list
This commit is contained in:
@@ -290,11 +290,11 @@ export function SessionList(props: {
|
||||
{groups.map((group) => {
|
||||
const isCollapsed = isGroupCollapsed(group)
|
||||
return (
|
||||
<div key={group.directory} className="border-b border-[var(--app-divider)]">
|
||||
<div key={group.directory}>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => toggleGroup(group.directory, isCollapsed)}
|
||||
className="flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[var(--app-secondary-bg)]"
|
||||
className="sticky top-0 z-10 flex w-full items-center gap-2 px-3 py-2 text-left bg-[var(--app-bg)] border-b border-[var(--app-divider)] transition-colors hover:bg-[var(--app-secondary-bg)]"
|
||||
>
|
||||
<ChevronIcon
|
||||
className="h-4 w-4 text-[var(--app-hint)]"
|
||||
@@ -310,7 +310,7 @@ export function SessionList(props: {
|
||||
</div>
|
||||
</button>
|
||||
{!isCollapsed ? (
|
||||
<div className="flex flex-col divide-y divide-[var(--app-divider)]">
|
||||
<div className="flex flex-col divide-y divide-[var(--app-divider)] border-b border-[var(--app-divider)]">
|
||||
{group.sessions.map((s) => (
|
||||
<SessionItem
|
||||
key={s.id}
|
||||
|
||||
Reference in New Issue
Block a user