Ennable unreported games

This commit is contained in:
Sam Carlton 2020-11-28 18:07:10 -06:00
parent 8012fcd92b
commit 704a71a855

View file

@ -18,6 +18,7 @@ import axios from 'axios'
const statusesTranslations = {
'Native': 'native',
'Rosetta': 'rosetta',
'': 'unreported'
// 'CrossOver': 'rosetta',
// '': 'no'
}
@ -29,6 +30,14 @@ const statusesMessages = {
// 'no': '🚫 No, not yet supported only works on Intel-based Macs'
}
function isUnknown(game) {
const playableStatus = game.Playable.toLowerCase()
return ![
'yes',
'no'
].includes(playableStatus)
}
function isPlayable(game) {
return game.Playable.toLowerCase() === 'yes'
}
@ -39,6 +48,8 @@ function environmentName(game) {
function getStatusText(game) {
if (isUnknown(game)) return '🔶 Unknown, more info needed'
if (isPlayable(game) === false) return '🚫 No, not yet supported only works on Intel-based Macs'
// Match status to Sheet Status
@ -47,6 +58,8 @@ function getStatusText(game) {
function parseStatus(game) {
if (isUnknown(game)) return 'unreported'
if (isPlayable(game) === false) return 'no'
// Match status to Sheet Status