go-toast

Send toast notifications in Windows
Log | Files | Refs | README | LICENSE

commit 168cfffb5c062da0b9ae30c935a8d4abe959abf8
parent 56524118f5e005e869d00441c73a75f8bd6cb352
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date:   Mon,  7 Oct 2024 15:31:58 +1000

tmpl: support more styling features

- hero icon
- icon cropping
- embolden the title text
- action-input matching via hint-inputId

Diffstat:
Mtmpl/xml.go.tmpl | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tmpl/xml.go.tmpl b/tmpl/xml.go.tmpl @@ -2,11 +2,14 @@ <toast activationType="{{.ActivationType}}" launch="{{.ActivationArguments}}" duration="{{.Duration}}"> <visual> <binding template="ToastGeneric"> + {{if .HeroIcon}} + <image placement="hero" src="{{.HeroIcon}}" /> + {{end}} {{if .Icon}} - <image placement="appLogoOverride" src="{{.Icon}}" /> + <image placement="appLogoOverride" src="{{.Icon}}" {{if .IconCrop}} hint-crop="{{.IconCrop}}" {{end}} /> {{end}} {{if .Title}} - <text><![CDATA[{{.Title}}]]></text> + <text hint-maxLines="1"><![CDATA[{{.Title}}]]></text> {{end}} {{if .Body}} <text><![CDATA[{{.Body}}]]></text> @@ -28,7 +31,7 @@ </input> {{end}} {{range .Actions}} - <action activationType="{{.Type}}" content="{{.Content}}" arguments="{{.Arguments}}" /> + <action activationType="{{.Type}}" content="{{.Content}}" arguments="{{.Arguments}}" {{if .InputID}} hint-inputId="{{.InputID}}" {{end}} /> {{end}} </actions> {{end}}