mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
fix bug, adjust finance card
This commit is contained in:
parent
adbc3a9d33
commit
e1652dcfd8
2 changed files with 4 additions and 15 deletions
|
@ -178,11 +178,11 @@ function createSearchResultPage(context, result, doodle){
|
|||
break;
|
||||
case SEARCH_CARD_TYPES.DATA_FINANCE:
|
||||
res = createEmbed("default", context, {
|
||||
description: `-# $${result.finance.ticker} (${result.finance.exchange})\n${result.finance.title}\n# ${result.finance.price}$\n**${result.finance.change}**`,
|
||||
description: `-# $${result.finance.ticker} (${result.finance.exchange}) ${result.finance.time}\n${result.finance.title}\n# ${result.finance.price}$\n**${result.finance.change}**\n\n${link(result.card.disclaimer.url, `${result.card.disclaimer.label} ${icon("link_open_external")}`, result.card.disclaimer.label)}`,
|
||||
footer: {
|
||||
// TODO: googlefinance Static Asset
|
||||
iconUrl: STATICS.google,
|
||||
text: `${result.finance.time} • Google Finance • ${context.application.name}`
|
||||
text: `Google Finance • ${context.application.name}`
|
||||
}
|
||||
})
|
||||
default:
|
||||
|
|
|
@ -169,17 +169,6 @@ function createSearchResultPage(context, result, doodle){
|
|||
footer: renderFooter(context, doodle)
|
||||
})
|
||||
break;
|
||||
case SEARCH_CARD_TYPES.DATA_GENERIC:
|
||||
res = createEmbed("default", context, {
|
||||
description: `-# ${result.fact.category} > ${result.fact.type}\n# ${result.fact.result}`,
|
||||
thumbnail: {
|
||||
url: result.card.thumbnail
|
||||
},
|
||||
footer: renderFooter(context, doodle)
|
||||
})
|
||||
|
||||
if(result.fact.icon) res.thumbnail = { url: result.fact.icon }
|
||||
break;
|
||||
case SEARCH_CARD_TYPES.DATA_GENERIC:
|
||||
res = createEmbed("default", context, {
|
||||
description: `-# ${result.fact.category} › **${result.fact.type}**\n# ${result.fact.result}`,
|
||||
|
@ -191,11 +180,11 @@ function createSearchResultPage(context, result, doodle){
|
|||
break;
|
||||
case SEARCH_CARD_TYPES.DATA_FINANCE:
|
||||
res = createEmbed("default", context, {
|
||||
description: `-# $${result.finance.ticker} (${result.finance.exchange})\n${result.finance.title}\n# ${result.finance.price}$\n**${result.finance.change}**`,
|
||||
description: `-# $${result.finance.ticker} (${result.finance.exchange}) ${result.finance.time}\n${result.finance.title}\n# ${result.finance.price}$\n**${result.finance.change}**\n\n${link(result.card.disclaimer.url, `${result.card.disclaimer.label} ${icon("link_open_external")}`, result.card.disclaimer.label)}`,
|
||||
footer: {
|
||||
// TODO: googlefinance Static Asset
|
||||
iconUrl: STATICS.google,
|
||||
text: `${result.finance.time} • Google Finance • ${context.application.name}`
|
||||
text: `Google Finance • ${context.application.name}`
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue