Migrate to mantine v6 (#15)

* Add letter spacing to cell text

* Set window control height in px

* Add temp unused routes

* Migrate text title font weights

* Bump mantine to v6 alpha

* Migrate modals / notifications

* Increase header bar to 65px

* Adjust play button props

* Migrate various components

* Migrate various pages and root styles

* Adjust default badge padding

* Fix sidebar spacing

* Fix list header badges

* Adjust default theme
This commit is contained in:
Jeff 2023-01-28 20:46:07 -08:00 committed by GitHub
parent 768269f074
commit 44a4b88809
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 1301 additions and 349 deletions

View file

@ -0,0 +1,83 @@
import { useParams } from 'react-router';
import { AlbumListSort, SortOrder, SongListSort } from '/@/renderer/api/types';
import { VirtualGridContainer } from '/@/renderer/components';
import { useAlbumList } from '/@/renderer/features/albums';
import { AnimatedPage } from '/@/renderer/features/shared';
import { useSongList } from '/@/renderer/features/songs';
// import { useSongListStore } from '/@/renderer/store';
// import { usePlayQueueAdd } from '/@/renderer/features/player';
// import { Play } from '/@/renderer/types';
// import { useAlbumArtistDetail } from '/@/renderer/features/artists/queries/album-artist-detail-query';
const AlbumArtistDetailDiscographyRoute = () => {
const { albumArtistId } = useParams() as { albumArtistId: string };
// const albumArtistQuery = useAlbumArtistDetail({ id: albumArtistId });
const albumsQuery = useAlbumList({
jfParams: { artistIds: albumArtistId },
ndParams: { artist_id: albumArtistId },
sortBy: AlbumListSort.YEAR,
sortOrder: SortOrder.DESC,
startIndex: 0,
});
const songsQuery = useSongList(
{
albumIds: albumsQuery.data?.items?.map((album) => album.id),
sortBy: SongListSort.ALBUM,
sortOrder: SortOrder.ASC,
startIndex: 0,
},
{
enabled: !albumsQuery.isLoading,
},
);
// const page = useSongListStore();
// const handlePlayQueueAdd = usePlayQueueAdd();
if (albumsQuery.isLoading || songsQuery.isLoading) return null;
// const handlePlay = (play: Play, data: any[]) => {
// handlePlayQueueAdd?.({
// byData: data,
// play,
// });
// };
return (
<AnimatedPage>
<VirtualGridContainer>
{/* <AlbumArtistDiscographyHeader />
<PageHeader>
<Group
position="apart"
w="100%"
>
{albumArtistQuery?.data?.name || ''}
<Group spacing="xs">
<Button
compact
radius="xl"
variant="subtle"
>
<RiListUnordered size="1.5em" />
</Button>
<Button
compact
radius="xl"
variant="subtle"
>
<RiLayoutGridFill size="1.5em" />
</Button>
</Group>
</Group>
</PageHeader> *
<AlbumArtistDiscographyDetailList /> */}
</VirtualGridContainer>
</AnimatedPage>
);
};
export default AlbumArtistDetailDiscographyRoute;

View file

@ -4,16 +4,38 @@ import { AnimatedPage } from '/@/renderer/features/shared';
import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact';
import { useRef } from 'react';
import { AlbumArtistListContent } from '/@/renderer/features/artists/components/album-artist-list-content';
import { useAlbumArtistList } from '/@/renderer/features/artists/queries/album-artist-list-query';
import { useAlbumArtistListStore } from '/@/renderer/store';
const AlbumArtistListRoute = () => {
const gridRef = useRef<VirtualInfiniteGridRef | null>(null);
const tableRef = useRef<AgGridReactType | null>(null);
const page = useAlbumArtistListStore();
const filters = page.filter;
const itemCountCheck = useAlbumArtistList(
{
limit: 1,
startIndex: 0,
...filters,
},
{
cacheTime: 1000 * 60 * 60 * 2,
staleTime: 1000 * 60 * 60 * 2,
},
);
const itemCount =
itemCountCheck.data?.totalRecordCount === null
? undefined
: itemCountCheck.data?.totalRecordCount;
return (
<AnimatedPage>
<VirtualGridContainer>
<AlbumArtistListHeader
gridRef={gridRef}
itemCount={itemCount}
tableRef={tableRef}
/>
<AlbumArtistListContent