mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -04:00
add color picker card
This commit is contained in:
parent
0f2ac4f8a9
commit
0a36fbe67b
2 changed files with 20 additions and 0 deletions
|
@ -32,6 +32,7 @@ const SEARCH_CARD_TYPES = {
|
||||||
UNIT_CONVERTER: 6,
|
UNIT_CONVERTER: 6,
|
||||||
DICTIONARY: 7,
|
DICTIONARY: 7,
|
||||||
FUNBOX_COIN_FLIP: 10,
|
FUNBOX_COIN_FLIP: 10,
|
||||||
|
FUNBOX_COLOR_PICKER: 11,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: create a favicon() util
|
// TODO: create a favicon() util
|
||||||
|
@ -142,6 +143,15 @@ function createSearchResultPage(context, result, doodle){
|
||||||
footer: renderFooter(context, doodle)
|
footer: renderFooter(context, doodle)
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
|
case SEARCH_CARD_TYPES.FUNBOX_COLOR_PICKER:
|
||||||
|
res = createEmbed("default", context, {
|
||||||
|
description: `### ${result.card.title}\n${result.card.components.map((c)=>`${pill(c.label)} ${smallPill(c.content)}`).join('\n')}`,
|
||||||
|
thumbnail: {
|
||||||
|
url: result.card.thumbnail
|
||||||
|
},
|
||||||
|
footer: renderFooter(context, doodle)
|
||||||
|
})
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type)
|
res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -33,6 +33,7 @@ const SEARCH_CARD_TYPES = {
|
||||||
UNIT_CONVERTER: 6,
|
UNIT_CONVERTER: 6,
|
||||||
DICTIONARY: 7,
|
DICTIONARY: 7,
|
||||||
FUNBOX_COIN_FLIP: 10,
|
FUNBOX_COIN_FLIP: 10,
|
||||||
|
FUNBOX_COLOR_PICKER: 11,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: create a favicon() util
|
// TODO: create a favicon() util
|
||||||
|
@ -142,6 +143,15 @@ function createSearchResultPage(context, result, doodle){
|
||||||
footer: renderFooter(context, doodle)
|
footer: renderFooter(context, doodle)
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
|
case SEARCH_CARD_TYPES.FUNBOX_COLOR_PICKER:
|
||||||
|
res = createEmbed("default", context, {
|
||||||
|
description: `### ${result.card.title}\n${result.card.components.map((c)=>`${pill(c.label)} ${smallPill(c.content)}`).join('\n')}`,
|
||||||
|
thumbnail: {
|
||||||
|
url: result.card.thumbnail
|
||||||
|
},
|
||||||
|
footer: renderFooter(context, doodle)
|
||||||
|
})
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type)
|
res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue