mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Add ListingDetails helper class
This commit is contained in:
parent
47b9c1afad
commit
2faae587f2
1 changed files with 32 additions and 0 deletions
32
helpers/listing-page.js
Normal file
32
helpers/listing-page.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
|
||||
import {
|
||||
getAppType
|
||||
} from './app-derived.js'
|
||||
|
||||
|
||||
export class ListingDetails {
|
||||
constructor ( listing ) {
|
||||
this.listing = listing
|
||||
|
||||
this.type = getAppType( listing )
|
||||
}
|
||||
|
||||
type = ''
|
||||
|
||||
get mainHeading () {
|
||||
if ( this.type === 'formula' ) {
|
||||
return `Does <code>${ this.listing.name }</code> work on Apple Silicon when installed via Homebrew?`
|
||||
}
|
||||
|
||||
return `Does ${ this.listing.name } work on Apple Silicon?`
|
||||
}
|
||||
|
||||
get subtitle () {
|
||||
return this.listing.text
|
||||
}
|
||||
|
||||
buildListingDetails ( listing ) {
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue