From f02307ff2aee70ef4d66615d87f6f92a648318b9 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Wed, 11 Feb 2026 21:32:43 -0800 Subject: [PATCH] move search button to top right of LibraryHeader --- .../playlist-detail-song-list-header-filters.tsx | 2 -- .../components/playlist-detail-song-list-header.tsx | 1 + .../shared/components/library-header.module.css | 7 +++++++ .../features/shared/components/library-header.tsx | 12 +++++++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/renderer/features/playlists/components/playlist-detail-song-list-header-filters.tsx b/src/renderer/features/playlists/components/playlist-detail-song-list-header-filters.tsx index dc15d93c9..ea00bba78 100644 --- a/src/renderer/features/playlists/components/playlist-detail-song-list-header-filters.tsx +++ b/src/renderer/features/playlists/components/playlist-detail-song-list-header-filters.tsx @@ -16,7 +16,6 @@ import { playlistsQueries } from '/@/renderer/features/playlists/api/playlists-a import { ListConfigMenu } from '/@/renderer/features/shared/components/list-config-menu'; import { ListDisplayTypeToggleButton } from '/@/renderer/features/shared/components/list-display-type-toggle-button'; import { ListRefreshButton } from '/@/renderer/features/shared/components/list-refresh-button'; -import { ListSearchInput } from '/@/renderer/features/shared/components/list-search-input'; import { ListSortByDropdown } from '/@/renderer/features/shared/components/list-sort-by-dropdown'; import { ListSortOrderToggleButton } from '/@/renderer/features/shared/components/list-sort-order-toggle-button'; import { MoreButton } from '/@/renderer/features/shared/components/more-button'; @@ -115,7 +114,6 @@ export const PlaylistDetailSongListHeaderFilters = ({ disabled={isEditMode} listKey={ItemListKey.PLAYLIST_SONG} /> - {!collapsed && } diff --git a/src/renderer/features/playlists/components/playlist-detail-song-list-header.tsx b/src/renderer/features/playlists/components/playlist-detail-song-list-header.tsx index 97a6f3aa8..5f539cf60 100644 --- a/src/renderer/features/playlists/components/playlist-detail-song-list-header.tsx +++ b/src/renderer/features/playlists/components/playlist-detail-song-list-header.tsx @@ -102,6 +102,7 @@ export const PlaylistDetailSongListHeader = ({ type: LibraryItem.PLAYLIST, }} title={detailQuery?.data?.name || ''} + topRight={} > handlePlay(type)} diff --git a/src/renderer/features/shared/components/library-header.module.css b/src/renderer/features/shared/components/library-header.module.css index 2acfa6891..1a058e567 100644 --- a/src/renderer/features/shared/components/library-header.module.css +++ b/src/renderer/features/shared/components/library-header.module.css @@ -1,3 +1,10 @@ +.top-right { + position: absolute; + top: var(--theme-spacing-lg); + right: var(--theme-spacing-md); + z-index: 20; +} + .library-header { position: relative; display: grid; diff --git a/src/renderer/features/shared/components/library-header.tsx b/src/renderer/features/shared/components/library-header.tsx index 88d4aa8fb..4135d8ee8 100644 --- a/src/renderer/features/shared/components/library-header.tsx +++ b/src/renderer/features/shared/components/library-header.tsx @@ -46,11 +46,20 @@ interface LibraryHeaderProps { }; loading?: boolean; title: string; + topRight?: ReactNode; } export const LibraryHeader = forwardRef( ( - { children, compact, containerClassName, imageUrl, item, title }: LibraryHeaderProps, + { + children, + compact, + containerClassName, + imageUrl, + item, + title, + topRight, + }: LibraryHeaderProps, ref: Ref, ) => { const { t } = useTranslation(); @@ -134,6 +143,7 @@ export const LibraryHeader = forwardRef( )} ref={ref} > + {topRight &&
{topRight}
}
{