This commit is contained in:
parent
c6521c7fcf
commit
f2566ae21d
1 changed files with 22 additions and 3 deletions
25
main.go
25
main.go
|
|
@ -171,11 +171,31 @@ func card(d templateData) ([]byte, error) {
|
|||
//}`
|
||||
|
||||
if d.Status == "success" {
|
||||
d.Add = "{\"decoratedText\": {\"startIcon\": {\"materialIcon\": {\"name\": \"check_circle\"}},\"text\": \"<b style='color: green;'>SUCCESS</b>\"}},"
|
||||
d.Add = `
|
||||
{
|
||||
"decoratedText": {
|
||||
"startIcon": {
|
||||
"materialIcon": {
|
||||
"name": "check_circle"
|
||||
}
|
||||
},
|
||||
"text": "<b style=\"color: green;\">SUCCESS</b>"
|
||||
}
|
||||
},`
|
||||
}
|
||||
|
||||
if d.Status == "failure" {
|
||||
d.Add = "{\"decoratedText\": {\"startIcon\": {\"materialIcon\": {\"name\": \"stop_circle\"}},\"text\": \"<b style='color: red;'>FAILURE</b>\"}},"
|
||||
d.Add = `
|
||||
{
|
||||
"decoratedText": {
|
||||
"startIcon": {
|
||||
"materialIcon": {
|
||||
"name": "stop_circle"
|
||||
}
|
||||
},
|
||||
"text": "<b style=\"color: red;\">FAILURE</b>"
|
||||
}
|
||||
},`
|
||||
}
|
||||
|
||||
tpl := `
|
||||
|
|
@ -188,7 +208,6 @@ func card(d templateData) ([]byte, error) {
|
|||
"title": "{{ .Title }}",
|
||||
"subtitle": "{{ .SubTitle }}",
|
||||
"imageUrl": "{{ .IconUrl }}",
|
||||
"imageStyle": "IMAGE",
|
||||
"imageType": "SQUARE"
|
||||
},
|
||||
"sections": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue