mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
implement dictionary search card
This commit is contained in:
parent
e0f1ae0dd0
commit
48939503f7
3 changed files with 25 additions and 0 deletions
|
@ -200,6 +200,16 @@ function createSearchResultPage(context, result, doodle){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
break;
|
||||||
|
case SEARCH_CARD_TYPES.DATA_DICTIONARY:
|
||||||
|
res = createEmbed("default", context, {
|
||||||
|
description: `**${result.dictionary.term}**\n-# ${result.dictionary.phonetics} • ${result.dictionary.word_type}\n\n${result.dictionary.definition}\n\n-# ${result.dictionary.attribution}`,
|
||||||
|
footer: {
|
||||||
|
iconUrl: STATICS.googledictionary,
|
||||||
|
text: `Dictionary • ${context.application.name}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SEARCH_CARD_TYPES.PIVOT_IMAGES:
|
case SEARCH_CARD_TYPES.PIVOT_IMAGES:
|
||||||
res = createEmbed("default", context, {
|
res = createEmbed("default", context, {
|
||||||
|
|
|
@ -202,6 +202,16 @@ function createSearchResultPage(context, result, doodle){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
break;
|
||||||
|
case SEARCH_CARD_TYPES.DATA_DICTIONARY:
|
||||||
|
res = createEmbed("default", context, {
|
||||||
|
description: `**${result.dictionary.term}**\n-# ${result.dictionary.phonetics} • ${result.dictionary.word_type}\n\n${result.dictionary.definition}\n\n-# ${result.dictionary.attribution}`,
|
||||||
|
footer: {
|
||||||
|
iconUrl: STATICS.googledictionary,
|
||||||
|
text: `Dictionary • ${context.application.name}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SEARCH_CARD_TYPES.PIVOT_IMAGES:
|
case SEARCH_CARD_TYPES.PIVOT_IMAGES:
|
||||||
res = createEmbed("default", context, {
|
res = createEmbed("default", context, {
|
||||||
|
|
|
@ -68,6 +68,10 @@ const Statics = Object.freeze({
|
||||||
file: "brands/google.png",
|
file: "brands/google.png",
|
||||||
revision: 2
|
revision: 2
|
||||||
},
|
},
|
||||||
|
googledictionary: {
|
||||||
|
file: "brands/googledictionary.png",
|
||||||
|
revision: 0
|
||||||
|
},
|
||||||
googlefinance: {
|
googlefinance: {
|
||||||
file: "brands/googlefinance.png",
|
file: "brands/googlefinance.png",
|
||||||
revision: 0
|
revision: 0
|
||||||
|
@ -234,6 +238,7 @@ module.exports.STATICS = Object.freeze({
|
||||||
genius: staticAsset(Statics.brands.genius),
|
genius: staticAsset(Statics.brands.genius),
|
||||||
google: staticAsset(Statics.brands.google),
|
google: staticAsset(Statics.brands.google),
|
||||||
googlelens: staticAsset(Statics.brands.googlelens),
|
googlelens: staticAsset(Statics.brands.googlelens),
|
||||||
|
googledictionary: staticAsset(Statics.brands.googledictionary),
|
||||||
googlefinance: staticAsset(Statics.brands.googlefinance),
|
googlefinance: staticAsset(Statics.brands.googlefinance),
|
||||||
googlemaps: staticAsset(Statics.brands.googlemaps),
|
googlemaps: staticAsset(Statics.brands.googlemaps),
|
||||||
googletranslate: staticAsset(Statics.brands.googletranslate),
|
googletranslate: staticAsset(Statics.brands.googletranslate),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue