summaryrefslogtreecommitdiff
path: root/templates/account.html.ep
diff options
context:
space:
mode:
authorDerf Null <derf@finalrewind.org>2023-06-04 18:21:36 +0200
committerDerf Null <derf@finalrewind.org>2023-06-04 18:21:36 +0200
commit00eb6af1bd21df42fc41195ceed0fad73bbb5f27 (patch)
treeaea171b00a79681e403292b0ad06b01e5d9a21d1 /templates/account.html.ep
parent07fe4ecd1f73e7b111d4cd6f6bb8fd390b5f3151 (diff)
expose follows / social interaction in frontend
Diffstat (limited to 'templates/account.html.ep')
-rw-r--r--templates/account.html.ep95
1 files changed, 94 insertions, 1 deletions
diff --git a/templates/account.html.ep b/templates/account.html.ep
index ef6b847..bb03c7b 100644
--- a/templates/account.html.ep
+++ b/templates/account.html.ep
@@ -1,4 +1,4 @@
-% if (my $invalid = stash('invalid')) {
+% if (my $invalid = flash('invalid')) {
%= include '_invalid_input', invalid => $invalid
% }
@@ -19,6 +19,9 @@
% elsif ($success eq 'privacy') {
<span class="card-title">Einstellungen zu öffentlichen Account-Daten geändert</span>
% }
+ % elsif ($success eq 'social') {
+ <span class="card-title">Einstellungen zur Interaktionen mit anderen Accounts geändert</span>
+ % }
% elsif ($success eq 'traewelling') {
<span class="card-title">Träwelling-Verknüpfung aktualisiert</span>
% }
@@ -31,6 +34,9 @@
% elsif ($success eq 'webhook') {
<span class="card-title">Web Hook aktualisiert</span>
% }
+ % elsif ($success eq 'clear_notifications') {
+ <span class="card-title">Benachrichtigungen gelesen</span>
+ % }
</div>
</div>
</div>
@@ -78,6 +84,27 @@
</td>
</tr>
<tr>
+ <th scope="row">Interaktion</th>
+ <td>
+ <a href="/account/social"><i class="material-icons">edit</i></a>
+ % if ($acc->{accept_follows}) {
+ <span>Accounts können dir direkt folgen</span>
+ % }
+ % elsif ($acc->{accept_follow_requests}) {
+ <span>Accounts können dir auf Anfrage folgen
+ % if ($num_follow_requests == 1) {
+ – <a href="/account/social/follow-requests"><strong>eine</strong> offene Anfrage</a>
+ % } elsif ($num_follow_requests) {
+ – <a href="/account/social/follow-requests"><strong><%= $num_follow_requests %></strong> offene Anfragen</a>
+ % }
+ </span>
+ % }
+ % else {
+ <span style="color: #999999;">Accounts können dir nicht folgen</span>
+ % }
+ </td>
+ </tr>
+ <tr>
<th scope="row">Web Hook</th>
<td>
<a href="/account/hooks"><i class="material-icons">edit</i></a>
@@ -152,6 +179,72 @@
</div>
</div>
+% if ($num_follow_requests or $num_followers or $num_following or $num_blocked) {
+ <div class="row">
+ <div class="col s12">
+ <h2>Interaktion</h2>
+ <table class="striped">
+ <tr>
+ <th scope="row">Anfragen</th>
+ <td>
+ % if ($num_follow_requests == 0) {
+ <span style="color: #999999;">keine offen</span>
+ % }
+ % elsif ($num_follow_requests == 1) {
+ <a href="/account/social/follow-requests"><strong>ein</strong> Account</a>
+ % }
+ % else {
+ <a href="/account/social/follow-requests"><strong><%= $num_follow_requests %></strong> Accounts</a>
+ % }
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Dir folg<%= $num_followers == 1 ? 't' : 'en' %></th>
+ <td>
+ % if ($num_followers == 0) {
+ <span style="color: #999999;">keine Accounts</span>
+ % }
+ % elsif ($num_followers == 1) {
+ <a href="/account/social/followers"><strong>ein</strong> Account</a>
+ % }
+ % else {
+ <a href="/account/social/followers"><strong><%= $num_followers %></strong> Accounts</a>
+ % }
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Du folgst</th>
+ <td>
+ % if ($num_following == 0) {
+ <span style="color: #999999;">keinen Accounts</span>
+ % }
+ % elsif ($num_following == 1) {
+ <a href="/account/social/follows"><strong>einem</strong> Account</a>
+ % }
+ % else {
+ <a href="/account/social/follows"><strong><%= $num_following %></strong> Accounts</a>
+ % }
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Blockiert</th>
+ <td>
+ % if ($num_blocked == 0) {
+ <span style="color: #999999;">keine Accounts</span>
+ % }
+ % elsif ($num_blocked == 1) {
+ <a href="/account/social/blocks"><strong>ein</strong> Account</a>
+ % }
+ % else {
+ <a href="/account/social/blocks"><strong><%= $num_blocked %></strong> Accounts</a>
+ % }
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+% }
+
% my $token = stash('api_token') // {};
<div class="row">
<div class="col s12">