Public Access
feat(dashboard): playtime chart, recently played and a playing hint
The dashboard shows the playtime of the last 30 days and Steam's recently played games. The detail page offers to set a backlog game to Playing when Steam reports recent playtime; unsaved edits in the backlog card stay.
This commit is contained in:
1 parent
d4c0f8d8f3
commit
89c5ba5253
11 files changed
+334
-15
No files matched your search
@@ -13,6 +13,18 @@ export const toBacklogRequest = ({status, rating, notes, priority}) => ({
|
||||
priority: priority === NO_PRIORITY ? null : priority,
|
||||
});
|
||||
|
||||
/**
|
||||
* PUT /api/library/games/{appid}/backlog. The caller handles the response status.
|
||||
*
|
||||
* @param entry a backlog entry in request form, see toBacklogRequest
|
||||
*/
|
||||
export const saveBacklogEntry = (appid, entry) =>
|
||||
fetch(`${import.meta.env.VITE_CORE_API_URL}/api/library/games/${appid}/backlog`, {
|
||||
method: 'PUT',
|
||||
headers: {'Authorization': `Bearer ${localStorage.getItem('tbp_jwt')}`, 'Content-Type': 'application/json'},
|
||||
body: JSON.stringify(entry),
|
||||
});
|
||||
|
||||
export const libraryQuery = ({page, size, sort, status, q}) => {
|
||||
const params = new URLSearchParams({page: String(page), size: String(size), sort});
|
||||
if (status) params.set('status', status);
|
||||
|
||||
Reference in new issue
Block a user