From ae453835b4f931cc6240f8ce8e5c6b760c47b98e Mon Sep 17 00:00:00 2001 From: nekobit Date: Sat, 6 Aug 2022 17:41:35 +0000 Subject: [PATCH] Add content to Account page FossilOrigin-Name: ddb93098b95a7e750d80156451580be8a59a8471985b93ad00cf43e05a6e49dd --- perl/account.pm | 2 ++ src/account.c | 2 +- templates/account.tt | 30 ++++++++++++++++-------------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/perl/account.pm b/perl/account.pm index 981e016..7b7be68 100644 --- a/perl/account.pm +++ b/perl/account.pm @@ -7,6 +7,7 @@ use Exporter 'import'; our @EXPORT = qw( account content_statuses ); use template_helpers 'to_template'; +use l10n 'lang'; sub generate_account { @@ -15,6 +16,7 @@ sub generate_account my %vars = ( prefix => '', ssn => $ssn, + lang => \&lang, relationship => $relationship, content => $content, acct => $acct, diff --git a/src/account.c b/src/account.c index 86c84ad..a14b405 100644 --- a/src/account.c +++ b/src/account.c @@ -935,7 +935,7 @@ HV* perlify_relationship(const struct mstdnt_relationship* rel) hvstores_int(rel_hv, "notifying", MSTDNT_T_FLAG_ISSET(rel, MSTDNT_RELATIONSHIP_NOTIFYING)); hvstores_int(rel_hv, "blocking", MSTDNT_T_FLAG_ISSET(rel, MSTDNT_RELATIONSHIP_BLOCKING)); hvstores_int(rel_hv, "domain_blocking", MSTDNT_T_FLAG_ISSET(rel, MSTDNT_RELATIONSHIP_DOMAIN_BLOCKING)); - hvstores_str(rel_hv, "blocked_by", rel->id); + hvstores_str(rel_hv, "blocked_by", MSTDNT_T_FLAG_ISSET(rel, MSTDNT_RELATIONSHIP_BLOCKED_BY)); return rel_hv; } diff --git a/templates/account.tt b/templates/account.tt index 78435d5..c12d05d 100644 --- a/templates/account.tt +++ b/templates/account.tt @@ -3,11 +3,11 @@ [% END %] [% IF acct.id == ssn.account.id %] [% END %]
@@ -24,26 +24,26 @@ Menu
- + [% lang('TAB_STATUSES') %] [% acct.statuses_count %] - + [% lang('TAB_FOLLOWING') %] [% acct.following_count %] - + [% lang('TAB_FOLLOWERS') %] [% acct.followers_count %] @@ -64,21 +64,23 @@
- + - + - + - +