mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Move deviceSupportsApp into helper
This commit is contained in:
parent
8eaf958f7b
commit
6e65c498c8
2 changed files with 38 additions and 35 deletions
37
helpers/devices.js
Normal file
37
helpers/devices.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
import { getStatusName } from './statuses.js'
|
||||
|
||||
|
||||
export const macAppleSiliconStatuses = new Set([
|
||||
'native',
|
||||
'rosetta'
|
||||
])
|
||||
|
||||
export function deviceSupportsApp ( device, app ) {
|
||||
|
||||
// const statuses = {
|
||||
// '✅': 'native',
|
||||
// '✳️': 'rosetta',
|
||||
// '⏹': 'no-in-progress',
|
||||
// '🚫': 'no',
|
||||
// '🔶': 'unreported',
|
||||
// }
|
||||
const appStatus = getStatusName( app.text )
|
||||
|
||||
if ( device.type === 'intel') {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
if ( device.type === 'mac-apple-silicon') {
|
||||
|
||||
return macAppleSiliconStatuses.has( appStatus )
|
||||
}
|
||||
|
||||
// if ( device.type === 'ios') {
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
return false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue