mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-21 06:54:08 -07:00
Merge branch 'develop'
This commit is contained in:
commit
26b8873a22
4 changed files with 36 additions and 4 deletions
|
|
@ -47,6 +47,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
nativePercent: null,
|
nativePercent: null,
|
||||||
rosettaPercent: null,
|
rosettaPercent: null,
|
||||||
|
unreportedPercent: null,
|
||||||
unsupportedPercent: null
|
unsupportedPercent: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -70,6 +71,13 @@ export default {
|
||||||
percent: this.rosettaPercent,
|
percent: this.rosettaPercent,
|
||||||
verbiage: `run via Rosetta 2, `
|
verbiage: `run via Rosetta 2, `
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
textColor: 'text-orange-500',
|
||||||
|
bgColor: 'bg-orange-500',
|
||||||
|
emoji: '🔶',
|
||||||
|
percent: this.unreportedPercent,
|
||||||
|
verbiage: `need more info, `
|
||||||
|
},
|
||||||
{
|
{
|
||||||
textColor: 'text-red',
|
textColor: 'text-red',
|
||||||
bgColor: 'bg-red',
|
bgColor: 'bg-red',
|
||||||
|
|
@ -77,7 +85,15 @@ export default {
|
||||||
percent: this.unsupportedPercent,
|
percent: this.unsupportedPercent,
|
||||||
verbiage: `are not working. `
|
verbiage: `are not working. `
|
||||||
},
|
},
|
||||||
]
|
].filter( percentage => {
|
||||||
|
const isZero = (percentage.percent === 0)
|
||||||
|
const isUnreported = (percentage.emoji === '🔶')
|
||||||
|
|
||||||
|
// Filter out
|
||||||
|
if (isUnreported && isZero) return false
|
||||||
|
|
||||||
|
return true
|
||||||
|
})
|
||||||
},
|
},
|
||||||
nonEmptyPercentages () {
|
nonEmptyPercentages () {
|
||||||
return this.percentages.filter(percentage => {
|
return this.percentages.filter(percentage => {
|
||||||
|
|
@ -113,7 +129,9 @@ export default {
|
||||||
|
|
||||||
this.nativePercent = Number((( totals['native'] / this.total ) * 100).toFixed(1))
|
this.nativePercent = Number((( totals['native'] / this.total ) * 100).toFixed(1))
|
||||||
this.rosettaPercent = Number((( totals['rosetta'] / this.total ) * 100).toFixed(1))
|
this.rosettaPercent = Number((( totals['rosetta'] / this.total ) * 100).toFixed(1))
|
||||||
this.unsupportedPercent = Number((100 - (this.nativePercent + this.rosettaPercent)).toFixed(1))
|
this.unreportedPercent = Number((( totals['unreported'] / this.total ) * 100).toFixed(1))
|
||||||
|
|
||||||
|
this.unsupportedPercent = Number((100 - (this.nativePercent + this.rosettaPercent + this.unreportedPercent)).toFixed(1))
|
||||||
|
|
||||||
// console.log('this.nativePercent', this.nativePercent)
|
// console.log('this.nativePercent', this.nativePercent)
|
||||||
// console.log('this.unsupportedPercent', this.unsupportedPercent)
|
// console.log('this.unsupportedPercent', this.unsupportedPercent)
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import axios from 'axios'
|
||||||
const statusesTranslations = {
|
const statusesTranslations = {
|
||||||
'Native': 'native',
|
'Native': 'native',
|
||||||
'Rosetta': 'rosetta',
|
'Rosetta': 'rosetta',
|
||||||
|
'': 'unreported'
|
||||||
// 'CrossOver': 'rosetta',
|
// 'CrossOver': 'rosetta',
|
||||||
// '': 'no'
|
// '': 'no'
|
||||||
}
|
}
|
||||||
|
|
@ -29,6 +30,14 @@ const statusesMessages = {
|
||||||
// 'no': '🚫 No, not yet supported only works on Intel-based Macs'
|
// '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) {
|
function isPlayable(game) {
|
||||||
return game.Playable.toLowerCase() === 'yes'
|
return game.Playable.toLowerCase() === 'yes'
|
||||||
}
|
}
|
||||||
|
|
@ -39,6 +48,8 @@ function environmentName(game) {
|
||||||
|
|
||||||
|
|
||||||
function getStatusText(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'
|
if (isPlayable(game) === false) return '🚫 No, not yet supported only works on Intel-based Macs'
|
||||||
|
|
||||||
// Match status to Sheet Status
|
// Match status to Sheet Status
|
||||||
|
|
@ -47,6 +58,8 @@ function getStatusText(game) {
|
||||||
|
|
||||||
|
|
||||||
function parseStatus(game) {
|
function parseStatus(game) {
|
||||||
|
if (isUnknown(game)) return 'unreported'
|
||||||
|
|
||||||
if (isPlayable(game) === false) return 'no'
|
if (isPlayable(game) === false) return 'no'
|
||||||
|
|
||||||
// Match status to Sheet Status
|
// Match status to Sheet Status
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@ export default {
|
||||||
'✅': 'native',
|
'✅': 'native',
|
||||||
'✳️': 'rosetta',
|
'✳️': 'rosetta',
|
||||||
'⏹': 'no-in-progress',
|
'⏹': 'no-in-progress',
|
||||||
'🚫': 'no'
|
'🚫': 'no',
|
||||||
|
'🔶': 'unreported',
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ module.exports = {
|
||||||
'gold': 'rgb(255, 167, 102)',
|
'gold': 'rgb(255, 167, 102)',
|
||||||
// 'gold': 'rgb(222, 115, 90)',
|
// 'gold': 'rgb(222, 115, 90)',
|
||||||
|
|
||||||
'orange': 'rgb(222, 115, 90)',
|
// 'orange': '#ed8936',
|
||||||
|
|
||||||
'off_white': '#ecebe6',
|
'off_white': '#ecebe6',
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue