diff --git a/dist/treebird.css b/dist/treebird.css index e4d0920..ff3d8bb 100644 --- a/dist/treebird.css +++ b/dist/treebird.css @@ -411,6 +411,14 @@ table.present th, table.present td color: #666; } +.fancy-error-subtext +{ + display: block; + margin: 12px 24px 0 24px; + font-size: 1rem; + color: #222; +} + .fancy-error-kaomoji { display: block; @@ -842,7 +850,8 @@ input[type=checkbox].hidden:not(:checked) + .reply-form /*************************** * Statuses * **************************/ -.status +.status, +.notification-regular { padding: 11px; padding-bottom: 6px; @@ -1021,6 +1030,12 @@ input[type=checkbox].hidden:not(:checked) + .reply-form padding: 0 0 0 10px; } +.notification-regular .notification-content +{ + margin-top: 4px; + font-size: 14px; +} + .status .status-info > table.ui-table { width: 100%; @@ -1082,11 +1097,11 @@ input[type=checkbox].hidden:not(:checked) + .reply-form min-width: 0; } -.status .notification-text-group-with-icon .username -{ - /* UNDO */ - vertical-align: unset; -} +/* .status .notification-text-group-with-icon .username */ +/* { */ +/* /\* UNDO *\/ */ +/* vertical-align: unset; */ +/* } */ .status .status-content { @@ -1519,6 +1534,11 @@ p} background: linear-gradient(#aa0000, #600000); } +.action +{ + vertical-align: middle; +} + /**************** * Statusbox * ****************/ @@ -2248,7 +2268,7 @@ input[type=checkbox].hidden:not(:checked) + .list-edit-content { color: #ccc; font-size: 8px; - margin: unset;e + margin: unset; } #instance-panel + .mini-links diff --git a/perl/account.pm b/perl/account.pm index b2e593a..51ac417 100644 --- a/perl/account.pm +++ b/perl/account.pm @@ -1,6 +1,7 @@ package account; use strict; use warnings; +use Data::Dumper; use Exporter 'import'; @@ -9,7 +10,7 @@ our @EXPORT = qw( account content_statuses ); use template_helpers 'to_template'; use l10n 'lang'; use status 'generate_status'; -use string_helpers qw( simple_escape emojify ); +use string_helpers qw( simple_escape emojify random_error_kaomoji ); use navigation 'generate_navigation'; sub generate_account @@ -40,7 +41,9 @@ sub content_statuses acct => $acct, statuses => $statuses, create_status => sub { generate_status($ssn, $data, shift); }, - nav => generate_navigation($ssn, $data, $statuses->[0]->{id}, $statuses->[-1]->{id}), + # Make subroutine so Perl doesn't autovivify + nav => sub { generate_navigation($ssn, $data, $statuses->[0]->{id}, $statuses->[-1]->{id}) }, + random_error_kaomoji => \&random_error_kaomoji, ); generate_account($ssn, $data, $acct, $relationship, to_template(\%vars, \$data->{'account_statuses.tt'})); diff --git a/perl/icons.pm b/perl/icons.pm index 93e095e..aab079f 100644 --- a/perl/icons.pm +++ b/perl/icons.pm @@ -42,6 +42,8 @@ sub get_icon_svg unlisted => '', public => '', + + follow => '', ); $res{$_[0]}; diff --git a/perl/notifications.pm b/perl/notifications.pm index e071a6b..869caa9 100644 --- a/perl/notifications.pm +++ b/perl/notifications.pm @@ -8,6 +8,7 @@ our @EXPORT = qw( generate_notification_compact content_notifications ); use template_helpers 'to_template'; use status 'generate_status'; use string_helpers qw( random_error_kaomoji ); +use icons 'get_icon'; sub generate_notification_compact { @@ -31,6 +32,7 @@ sub content_notifications ssn => $ssn, notifs => $notifs, create_status => sub { generate_status($ssn, $data, shift, shift); }, + icon => \&get_icon, random_error_kaomoji => \&random_error_kaomoji, ); diff --git a/perl/string_helpers.pm b/perl/string_helpers.pm index a3a60bf..09fdf4b 100644 --- a/perl/string_helpers.pm +++ b/perl/string_helpers.pm @@ -56,6 +56,7 @@ sub emojify sub format_username { my $account = shift; + return unless $account; #TODO ESCAPE DISPLAY NAME emojify(simple_escape($account->{display_name}), $account->{emojis}); diff --git a/src/account.c b/src/account.c index a14b405..fcaa75c 100644 --- a/src/account.c +++ b/src/account.c @@ -246,7 +246,7 @@ static char* account_statuses_cb(HV* session_hv, XPUSHs(newRV_noinc((SV*)perlify_relationship(rel))); else ARG_UNDEFINED(); - if (statuses) + if (statuses && statuses_len) XPUSHs(newRV_noinc((SV*)perlify_statuses(statuses, statuses_len))); else ARG_UNDEFINED(); diff --git a/templates/account_statuses.tt b/templates/account_statuses.tt index 711e104..e025b2b 100644 --- a/templates/account_statuses.tt +++ b/templates/account_statuses.tt @@ -2,7 +2,11 @@ [% FOREACH i IN statuses %] [% create_status(i) %] [% END %] - [% nav %] + [% nav() %] [% ELSE %] -
No statuses...
++ + | +
+
+
+
+ [% icon('follow') %]
+
+ |
+