summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-05-10 19:03:18 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-05-10 19:03:18 +0200
commit269b8536f42ee7b872f112c31490f2a44e345f23 (patch)
treef8921e41da29469cd74674a0cff921656bb6d652 /templates
parent3f4cf9ee42eb1c8be01ccefb9b396cebe1213413 (diff)
Add webhook to account page
Diffstat (limited to 'templates')
-rw-r--r--templates/account.html.ep31
1 files changed, 28 insertions, 3 deletions
diff --git a/templates/account.html.ep b/templates/account.html.ep
index 7baacbe..05e0447 100644
--- a/templates/account.html.ep
+++ b/templates/account.html.ep
@@ -8,10 +8,16 @@
<div class="card green darken-4">
<div class="card-content white-text">
% if ($success eq 'mail') {
- <span class="card-title">Mail-Adresse erfolgreich geändert</span>
+ <span class="card-title">Mail-Adresse geändert</span>
% }
% elsif ($success eq 'password') {
- <span class="card-title">Passwort erfolgreich geändert</span>
+ <span class="card-title">Passwort geändert</span>
+ % }
+ % elsif ($success eq 'privacy') {
+ <span class="card-title">Einstellungen zu öffentliche Account-Daten geändert</span>
+ % }
+ % elsif ($success eq 'webhook') {
+ <span class="card-title">Web Hook aktualisiert</span>
% }
</div>
</div>
@@ -21,6 +27,7 @@
<h1>Account</h1>
% my $acc = current_user();
+% my $hook = get_webhook();
<div class="row">
<div class="col s12">
<table class="striped">
@@ -41,7 +48,7 @@
<td>
<a href="/account/privacy"><i class="material-icons">edit</i></a>
% if ($acc->{is_public} == 0) {
- Keine
+ <span style="color: #999999;">Keine</span>
% }
% if ($acc->{is_public} & 0x02) {
Aktueller Status
@@ -49,6 +56,24 @@
</td>
</tr>
<tr>
+ <th scope="row">Web Hook</th>
+ <td>
+ <a href="/account/hooks"><i class="material-icons">edit</i></a>
+ % if ($hook->{enabled} == 0) {
+ <span style="color: #999999;">Nicht eingerichtet</span>
+ % }
+ % elsif ($hook->{latest_run}->epoch == 0) {
+ Aktiv, noch nicht ausgeführt
+ % }
+ % elsif ($hook->{errored}) {
+ Aktiv, fehlerhaft <i class="material-icons">error</i>
+ % }
+ % else {
+ Aktiv
+ % }
+ </td>
+ </tr>
+ <tr>
<th scope="row">Registriert am</th>
<td><%= $acc->{registered_at}->strftime('%d.%m.%Y %H:%M') %></td>
</tr>