Public Access
feat(sync): add Set to 100% button for all-unlocked games
The sync details show a Set to 100% button for ALL_UNLOCKED games. The button uses the existing status PUT, checks points, and reloads the Dashboard. Refs #21
This commit is contained in:
1 parent
c966877b23
commit
bbc707de87
11 files changed
+210
-7
No files matched your search
@@ -3,12 +3,13 @@ import {apiFetch} from './api.js';
|
||||
const CORE = () => import.meta.env.VITE_CORE_API_URL;
|
||||
|
||||
// The order of the groups in the details.
|
||||
const KINDS = ['ADDED', 'REMOVED', 'PLAYTIME', 'ACHIEVEMENTS', 'STATUS'];
|
||||
const KINDS = ['ALL_UNLOCKED', 'ADDED', 'REMOVED', 'PLAYTIME', 'ACHIEVEMENTS', 'STATUS'];
|
||||
|
||||
/**
|
||||
* `{syncedAt, startedBy, seen, importedGames, changes: [{kind, appid, name, imageUrl, amount, fromStatus, toStatus}]}`,
|
||||
* or null when the user has no result (204) or the answer is not 200. PLAYTIME: amount in minutes, ACHIEVEMENTS:
|
||||
* amount is the number of new unlocks.
|
||||
* amount is the number of new unlocks. ALL_UNLOCKED: the sync unlocked the last
|
||||
* achievement; gone once the game is COMPLETED.
|
||||
*/
|
||||
export async function fetchSyncChanges() {
|
||||
const response = await apiFetch(`${CORE()}/api/library/sync-changes`);
|
||||
|
||||
Reference in new issue
Block a user