Show boosts
FossilOrigin-Name: 449baa1ea91a5f5404f938a8e210262840fbfe7d01b4de7f38efdee0de3eba8f
This commit is contained in:
parent
03e62a5e51
commit
82ca6009ae
4 changed files with 24 additions and 4 deletions
|
@ -15,11 +15,21 @@ use template_helpers 'to_template';
|
|||
sub generate_status
|
||||
{
|
||||
my ($ssn, $data, $status) = @_;
|
||||
my $boost_acct;
|
||||
|
||||
# Move status reference for boosts and keep account
|
||||
# I hate this design but blame MastoAPI, not me.
|
||||
if ($status->{reblog})
|
||||
{
|
||||
$boost_acct = $status->{account};
|
||||
$status = $status->{reblog};
|
||||
}
|
||||
|
||||
my %vars = (
|
||||
prefix => '',
|
||||
ssn => $ssn,
|
||||
status => $status,
|
||||
boost => $boost_acct,
|
||||
data => $data,
|
||||
# Functions
|
||||
icon => \&get_icon,
|
||||
|
|
|
@ -1044,7 +1044,7 @@ HV* perlify_status(const struct mstdnt_status* status)
|
|||
hvstores_int(status_hv, "reblogs_count", status->reblogs_count);
|
||||
hvstores_int(status_hv, "favourites_count", status->favourites_count);
|
||||
hvstores_int(status_hv, "replies_count", status->replies_count);
|
||||
hvstores_ref(status_hv, "status", perlify_status(status->reblog));
|
||||
hvstores_ref(status_hv, "reblog", perlify_status(status->reblog));
|
||||
hvstores_ref(status_hv, "application", perlify_application(status->application));
|
||||
hvstores_ref(status_hv, "media_attachments",
|
||||
perlify_attachments(status->media_attachments, status->media_attachments_len));
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[% IF statuses %]
|
||||
[% FOREACH i IN statuses %]
|
||||
[% create_status(i) %]
|
||||
asd
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
<p>No statuses...</p>
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
<input type="checkbox" class="status-hide" id="status-toggle-[% status.id %]" {{ %s:thread_hidden }}>
|
||||
<input type="checkbox" class="status-hide" id="status-toggle-[% status.id %]"[% IF status.muted %] checked[% END %]>
|
||||
<div class="status" id="[% status.id %]">
|
||||
[% notif_info %]
|
||||
[% IF boost %]
|
||||
<div class="notification-info">
|
||||
<img src="[% boost.avatar %]" loading="lazy" class="avatar">
|
||||
<div class="notification-user">
|
||||
<span class="notification-text-group-with-icon">
|
||||
<span class="username">[% format_username(boost) %]</span>
|
||||
<span class="action">repeated</span>
|
||||
</span>
|
||||
[%# TODO the icon... %]
|
||||
</div>
|
||||
</div>
|
||||
[% END %]
|
||||
<table class="status-table ui-table">
|
||||
<tr>
|
||||
<td class="pfp-td {{%s:is_cat}} {{%s:is_bun}}">
|
||||
|
|
Loading…
Reference in a new issue