feat(frontend): Entry details redesign, people filmography, calendar improvements
- EntryDetailsPage: sticky poster layout, centered max-w-4xl, director by-line with link, rating pills (IMDb/TMDB/You), quick actions under poster, RatingDialog with star UI, In Collections section using backdrops, EntrySettingsDialog with show_in_calendar / auto_sync / rating options - RatingDialog: new component with 10-star interactive rating - AddEntryToCollectionDialog: optimistic cache updates so checkbox state reflects immediately and In Collections section on entry details page refreshes - PersonDetailsPage: filmography section showing library vs. non-library entries via person.roles, TMDB combined credits for non-library titles - PersonTmdbRedirectPage: new redirect page for TMDB person IDs to local person ID - PeoplePage: fix person card links to use /people/tmdb/:tmdbId - CalendarPage: full-height layout, larger episode thumbnails, episode items clickable, improved tooltip, show_in_calendar backend filter - Fix useUpdateEntry to also invalidate entryKeys.all (favorite button reactivity) - Fix updateRatings API body wrapping - Add useUpdateEntryRatings, usePersonCredits, useFetchPersonByTmdbId hooks - Add getCollectionBackdropUrl to media-utils - Types: show_in_calendar, auto_sync on Entry; id on EntryRatings; roles on People - Backend: fix fetchPersonData alias in peopleService; remove duplicate getPersonCredits; add show_in_calendar filter to episodeService
This commit is contained in:
1 parent
11eab03987
commit
3ca24434d7
16 files changed
+857
-322
No files matched your search
@@ -66,8 +66,11 @@ export function useUpdateEntry() {
|
||||
mutationFn: ({ id, data }: { id: number; data: Partial<Entry> }) =>
|
||||
entriesApi.update(id, data),
|
||||
onSuccess: (entry) => {
|
||||
// Update library store immediately so the UI reflects the change
|
||||
updateEntry(entry.id, entry);
|
||||
// Invalidate both the detail query and the library list
|
||||
queryClient.invalidateQueries({ queryKey: entryKeys.detail(entry.id) });
|
||||
queryClient.invalidateQueries({ queryKey: entryKeys.all });
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -98,6 +101,24 @@ export function useRefreshEntry() {
|
||||
});
|
||||
}
|
||||
|
||||
export function useUpdateEntryRatings() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation({
|
||||
mutationFn: ({
|
||||
id,
|
||||
ratings,
|
||||
}: {
|
||||
id: number;
|
||||
ratings: Parameters<typeof entriesApi.updateRatings>[1];
|
||||
}) => entriesApi.updateRatings(id, ratings),
|
||||
onSuccess: (_data, { id }) => {
|
||||
queryClient.invalidateQueries({ queryKey: entryKeys.detail(id) });
|
||||
queryClient.invalidateQueries({ queryKey: entryKeys.all });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function useUploadMedia() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
|
||||
Reference in new issue
Block a user