mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Add ratings support (#21)
* Update rating types for multiserver support * Add rating mutation * Add rating support to table views * Add rating support on playerbar * Add hovercard component * Handle rating from context menu - Improve context menu components - Allow left / right icons - Allow nested menus * Add selected item count * Fix context menu auto direction * Add transition and move portal for context menu * Re-use context menu for all item dropdowns * Add ratings to detail pages / double click to clear * Bump react-query package
This commit is contained in:
@@ -718,6 +718,15 @@ export const usePlayerStore = create<PlayerSlice>()(
|
||||
}
|
||||
}
|
||||
|
||||
const currentSongId = get().current.song?.id;
|
||||
if (currentSongId && ids.includes(currentSongId)) {
|
||||
set((state) => {
|
||||
if (state.current.song) {
|
||||
state.current.song.userRating = rating;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return foundUniqueIds;
|
||||
},
|
||||
setRepeat: (type: PlayerRepeat) => {
|
||||
|
||||
Reference in New Issue
Block a user