mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-06 20:10:12 +02:00
move search button to top right of LibraryHeader
This commit is contained in:
-2
@@ -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 && <ListSearchInput />}
|
||||
<ListRefreshButton disabled={isEditMode} listKey={listKey} />
|
||||
<MoreButton onClick={handleMore} />
|
||||
</Group>
|
||||
|
||||
@@ -102,6 +102,7 @@ export const PlaylistDetailSongListHeader = ({
|
||||
type: LibraryItem.PLAYLIST,
|
||||
}}
|
||||
title={detailQuery?.data?.name || ''}
|
||||
topRight={<ListSearchInput />}
|
||||
>
|
||||
<LibraryHeaderMenu
|
||||
onPlay={(type) => handlePlay(type)}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<HTMLDivElement>,
|
||||
) => {
|
||||
const { t } = useTranslation();
|
||||
@@ -134,6 +143,7 @@ export const LibraryHeader = forwardRef(
|
||||
)}
|
||||
ref={ref}
|
||||
>
|
||||
{topRight && <div className={styles.topRight}>{topRight}</div>}
|
||||
<div
|
||||
className={styles.imageSection}
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user