Public Access
feat(import): add the import page, multi-select add and the favorite platform
This commit is contained in:
1 parent
aa9e83e0cb
commit
14dd59f9e0
21 files changed
+1436
-48
No files matched your search
@@ -7,6 +7,12 @@ const JSON_HEADERS = {'Content-Type': 'application/json'};
|
||||
// positive keys; Auth also takes only those as background or banner.
|
||||
export const isSteamKey = (appid) => Number(appid) > 0;
|
||||
|
||||
// Core's limit of a game's platform (ManualGameUpdate.MAX_PLATFORM_LENGTH).
|
||||
export const MAX_PLATFORM_LENGTH = 32;
|
||||
|
||||
// Two decimals: then hoursToMinutes gives back the same minute.
|
||||
export const toHours = (minutes) => (minutes > 0 ? String(Math.round((minutes / 60) * 100) / 100) : '');
|
||||
|
||||
export const hoursToMinutes = (hours) => {
|
||||
const value = Number(String(hours).replace(',', '.'));
|
||||
return Number.isFinite(value) && value > 0 ? Math.round(value * 60) : 0;
|
||||
|
||||
Reference in new issue
Block a user