Add app status property

This commit is contained in:
Sam Carlton 2020-09-21 18:50:47 -05:00
parent 71700f292b
commit 37d427dec1

View file

@ -6,6 +6,14 @@ import slugify from 'slugify'
const md = new MarkdownIt() const md = new MarkdownIt()
const statuses = {
'✅': 'yes',
'✳️': 'yes-but',
'⏹': 'in-progress',
'🚫': 'no'
}
const getTokenLinks = function ( childTokens ) { const getTokenLinks = function ( childTokens ) {
const tokenList = [] const tokenList = []
@ -98,8 +106,19 @@ export default async function () {
lower: true lower: true
}) })
let status = 'unknown'
for (const statusKey in statuses) {
if (text.includes(statusKey)) {
status = statuses[statusKey]
break
}
}
appList.push({ appList.push({
name, name,
status,
url, url,
text, text,
slug: appSlug, slug: appSlug,