diff options
author | 2022-09-26 11:56:01 +0200 | |
---|---|---|
committer | 2022-09-26 11:56:01 +0200 | |
commit | c4a08292ee44bc731ff90bad18a3f37e5ee8ef22 (patch) | |
tree | 1726f8450ec37f744204a857c3be2bfab17f206c /web | |
parent | [bugfix] more nil checks baybeeeeeeeeeeeeeeeeeeee (#854) (diff) | |
download | gotosocial-c4a08292ee44bc731ff90bad18a3f37e5ee8ef22.tar.xz |
[feature] Show + federate emojis in accounts (#837)
* Start adding account emoji
* get emojis serialized + deserialized nicely
* update tests
* set / retrieve emojis on accounts
* show account emojis in web view
* fetch emojis from db based on ids
* fix typo in test
* lint
* fix pg migration
* update tests
* update emoji checking logic
* update comment
* clarify comments + add some spacing
* tidy up loops a lil (thanks kim)
Diffstat (limited to 'web')
-rw-r--r-- | web/template/profile.tmpl | 4 | ||||
-rw-r--r-- | web/template/status.tmpl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl index 22f192c06..9838e5b30 100644 --- a/web/template/profile.tmpl +++ b/web/template/profile.tmpl @@ -12,12 +12,12 @@ <div class="basic"> <div id="profile-basic-filler2"></div> <a href="{{.account.Avatar}}" class="avatar"><img src="{{.account.Avatar}}" alt="{{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}'s avatar"></a> - <div class="displayname">{{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}</div> + <div class="displayname">{{if .account.DisplayName}}{{emojify .account.Emojis (escape .account.DisplayName)}}{{else}}{{.account.Username}}{{end}}</div> <div class="username"><span>@{{.account.Username}}</span><span>@{{.instance.AccountDomain}}</span></div> </div> <div class="detailed"> <div class="bio"> - {{ if .account.Note }}{{ .account.Note | noescape }}{{else}}This GoToSocial user hasn't written a bio yet!{{end}} + {{ if .account.Note }}{{emojify .account.Emojis (noescape .account.Note)}}{{else}}This GoToSocial user hasn't written a bio yet!{{end}} </div> </div> <div class="accountstats"> diff --git a/web/template/status.tmpl b/web/template/status.tmpl index 16f724a94..c3b243445 100644 --- a/web/template/status.tmpl +++ b/web/template/status.tmpl @@ -1,6 +1,6 @@ <div class="contentgrid"> <a href="{{.Account.URL}}" class="avatar"><img src="{{.Account.Avatar}}" alt=""></a> - <a href="{{.Account.URL}}" class="displayname">{{if .Account.DisplayName}}{{.Account.DisplayName}}{{else}}{{.Account.Username}}{{end}}</a> + <a href="{{.Account.URL}}" class="displayname">{{if .Account.DisplayName}}{{emojify .Account.Emojis (escape .Account.DisplayName)}}{{else}}{{.Account.Username}}{{end}}</a> <a href="{{.Account.URL}}" class="username">@{{.Account.Acct}}</a> <div class="text"> {{if .SpoilerText}} |