mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
remove legacy icons
This commit is contained in:
parent
25519241ae
commit
4658fef772
2 changed files with 14 additions and 92 deletions
|
@ -1,13 +1,13 @@
|
|||
const { ICONS, REDESIGN_ICONS } = require('../constants')
|
||||
const { ICONS } = require('../constants')
|
||||
|
||||
module.exports.icon = function(icon){
|
||||
if(!REDESIGN_ICONS[icon]) return ICONS.question.replace(/:[a-z1-9_]*:/, ':i:')
|
||||
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')
|
||||
if(!ICONS[icon]) return ICONS.question.replace(/:[a-z1-9_]*:/, ':i:')
|
||||
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')
|
||||
}
|
||||
|
||||
module.exports.weatherIcon = function(icon){
|
||||
if(!REDESIGN_ICONS["weather_" + icon]) return REDESIGN_ICONS["calendar"].replace(/:[a-z1-9_]*:/, ':i:')
|
||||
return REDESIGN_ICONS["weather_" + icon].replace(/:[a-z1-9_]*:/, ':i:')
|
||||
if(!ICONS["weather_" + icon]) return ICONS["calendar"].replace(/:[a-z1-9_]*:/, ':i:')
|
||||
return ICONS["weather_" + icon].replace(/:[a-z1-9_]*:/, ':i:')
|
||||
}
|
||||
|
||||
module.exports.highlight = function(content = ""){
|
||||
|
@ -38,19 +38,19 @@ module.exports.smallPill = function(content = ""){
|
|||
}
|
||||
|
||||
module.exports.iconPill = function(icon, content = ""){
|
||||
if(!REDESIGN_ICONS[icon]) icon = "question"
|
||||
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " **` " + content.toString().replace(/\`/g, 'ˋ') + " `**"
|
||||
if(!ICONS[icon]) icon = "question"
|
||||
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " **` " + content.toString().replace(/\`/g, 'ˋ') + " `**"
|
||||
}
|
||||
|
||||
module.exports.smallIconPill = function(icon, content = ""){
|
||||
if(!REDESIGN_ICONS[icon]) icon = "question"
|
||||
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " ` " + content.toString().replace(/\`/g, 'ˋ') + " `"
|
||||
if(!ICONS[icon]) icon = "question"
|
||||
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " ` " + content.toString().replace(/\`/g, 'ˋ') + " `"
|
||||
}
|
||||
|
||||
module.exports.iconLinkPill = function(icon, url, content = "", tooltip = ""){
|
||||
if(!REDESIGN_ICONS[icon]) icon = "question"
|
||||
if(!ICONS[icon]) icon = "question"
|
||||
if(tooltip.length) tooltip = ` '${tooltip}'`
|
||||
if(content) return `${REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')} [**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url}${tooltip})`
|
||||
if(content) return `${ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')} [**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url}${tooltip})`
|
||||
return url
|
||||
}
|
||||
module.exports.linkPill = function(url, content = "", tooltip = ""){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue