# HG changeset patch # User Mikael Berthe # Date 1493664487 -7200 # Node ID ff88978ceb55af211bf58284c85b635bba0955d8 # Parent 5a0cb1e65e655ba117bc4e6ffc8183532887cf9e Update templates - Force IDs to be displayed as integers - Add media attachment URLs in statuses diff -r 5a0cb1e65e65 -r ff88978ceb55 templates/ansi-account.tmpl --- a/templates/ansi-account.tmpl Mon May 01 20:46:14 2017 +0200 +++ b/templates/ansi-account.tmpl Mon May 01 20:48:07 2017 +0200 @@ -1,4 +1,4 @@ -- Account ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} +- Account ID: {{color "red"}}{{.id|printf "%.0f"}}{{color "reset"}} {{color "magenta"}}@{{.username}}{{color "reset"}} UID: {{color "red"}}{{.acct}}{{color "reset"}} Display name: {{color "white,,bold"}}{{.display_name}}{{color "reset"}} Date: {{.created_at}} diff -r 5a0cb1e65e65 -r ff88978ceb55 templates/ansi-status.tmpl --- a/templates/ansi-status.tmpl Mon May 01 20:46:14 2017 +0200 +++ b/templates/ansi-status.tmpl Mon May 01 20:48:07 2017 +0200 @@ -1,4 +1,4 @@ -- Status ID: {{color "red"}}{{.id}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} +- Status ID: {{color "red"}}{{.id|printf "%.0f"}}{{color "reset"}} {{color "magenta"}}@{{.account.acct}}{{color "reset"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at}} URL: {{.url}} @@ -8,10 +8,22 @@ Spoiler: {{.}}{{end}} {{- if .reblog }}{{with .reblog}} {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}} - ID: {{.id}} + ID: {{.id|printf "%.0f"}} Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} Date: {{.created_at}} Message: {{color "blue"}}{{.content | fromhtml}}{{color "reset"}} +{{- range .media_attachments}} + - Attachment ID: {{.id|printf "%.0f"}} +{{- if .text_url}} + Text URL: {{.text_url}}{{else if .url}} + URL: {{.url}}{{else if .remote_url}} + Remote URL: {{.remote_url}}{{end}}{{end}} {{end}}{{else}} Message: {{color "blue"}}{{.content | fromhtml}}{{color "reset"}} +{{- range .media_attachments}} + - Attachment ID: {{.id|printf "%.0f"}} +{{- if .text_url}} + Text URL: {{.text_url}}{{else if .url}} + URL: {{.url}}{{else if .remote_url}} + Remote URL: {{.remote_url}}{{end}}{{end}} {{end -}}