go-toast

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

xml.go.tmpl (1411B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <toast activationType="{{.ActivationType}}" launch="{{.ActivationArguments}}" duration="{{.Duration}}">
      3     <visual>
      4         <binding template="ToastGeneric">
      5             {{if .HeroIcon}}
      6             <image placement="hero" src="{{.HeroIcon}}" />
      7             {{end}}
      8             {{if .Icon}}
      9             <image placement="appLogoOverride" src="{{.Icon}}" {{if .IconCrop}} hint-crop="{{.IconCrop}}" {{end}} />
     10             {{end}}
     11             {{if .Title}}
     12             <text hint-maxLines="1"><![CDATA[{{.Title}}]]></text>
     13             {{end}}
     14             {{if .Body}}
     15             <text><![CDATA[{{.Body}}]]></text>
     16             {{end}}
     17         </binding>
     18     </visual>
     19     {{if ne .Audio "silent"}}
     20 	<audio src="{{.Audio}}" loop="{{.Loop}}" />
     21 	{{else}}
     22 	<audio silent="true" />
     23 	{{end}}
     24     {{if .Actions}}
     25     <actions>
     26         {{range .Inputs}}
     27         <input id="{{.ID}}" title="{{.Title}}" placeHolderContent="{{.Placeholder}}" {{if .Selections}} type="selection" {{else}} type="text" {{end}}>
     28             {{range .Selections}}
     29             <selection id="{{.ID}}" content="{{.Content}}" />
     30             {{end}}
     31         </input>
     32         {{end}}
     33         {{range .Actions}}
     34         <action activationType="{{.Type}}" content="{{.Content}}" arguments="{{.Arguments}}" {{if .InputID}} hint-inputId="{{.InputID}}" {{end}} />
     35         {{end}}
     36     </actions>
     37     {{end}}
     38 </toast>