aboutsummaryrefslogtreecommitdiff
path: root/views/manage.html
diff options
context:
space:
mode:
authorFChannel <>2022-05-02 17:43:39 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit328c9150228156c04d1045469c7dbcd7b5f4fedf (patch)
treeae4e281b4e0b6df3c54919756d55bfeff90f0ef0 /views/manage.html
parent62edcb3745f414212ee102c13429056f02cf31bd (diff)
admin auth and manage page working for initial pass through
Diffstat (limited to 'views/manage.html')
-rw-r--r--views/manage.html65
1 files changed, 65 insertions, 0 deletions
diff --git a/views/manage.html b/views/manage.html
new file mode 100644
index 0000000..af887e3
--- /dev/null
+++ b/views/manage.html
@@ -0,0 +1,65 @@
+<div style="text-align: center; margin: 0 auto; width: 400px;">
+ <h1>Manage /{{ .page.Board.Name }}/</h1>
+ <!-- <div><a href="/{{ .Key }}/deleteboard?name={{ .Board.Name }}">[Delete Board]</a></div> -->
+ <ul style="display: inline-block; padding: 0;">
+ {{ if .page.IsLocal }}
+ <li style="display: inline-block;">[<a href="#following"> Subscribed </a>]</li>
+ <li style="display: inline-block;">[<a href="#followers"> Subscribers </a>]</li>
+ {{ end }}
+ <li style="display: inline-block;">[<a href="#reported"> Reported </a>]</li>
+ </ul>
+</div>
+[<a href="/{{ .page.Board.Name }}">Return</a>]
+{{ $actor := .page.Board.Actor.Id }}
+{{ $board := .page.Board }}
+{{ $key := .page.Key }}
+{{ if .page.IsLocal }}
+<div id="following" class="box2" style="margin-bottom: 25px; margin-top: 5px; padding: 12px;">
+ <h4 style="margin: 0; margin-bottom: 5px;">Following</h4>
+ [{{ if .page.AutoSubscribe }}<a title="Auto Follow is On" href="/autosubscribe?board={{ .page.Board.Name }}">Toggle Auto Follow Off{{ else }}<a title="Auto Follow is Off" href="/autosubscribe?board={{ .page.Board.Name }}">Toggle Auto Follow On{{ end }}</a>]
+ <form id="follow-form" action="/{{ .page.Key }}/{{ .page.Board.Name }}/follow" method="post" enctype="application/x-www-form-urlencoded" style="margin-top: 5px;">
+ <input id="follow" name="follow" style="margin-bottom: 5px;" size="35" placeholder="https://fchan.xyz/g"></input>
+ <input type="submit" value="Follow"><br>
+ <input type="hidden" name="actor" value="{{ $board.Actor.Id }}">
+ </form>
+ <div style="margin-bottom: 12px; color: grey;">also https://fchan.xyz/g/following or https://fchan.xyz/g/followers</div>
+ <ul style="display: inline-block; padding: 0; margin: 0; list-style-type: none;">
+ {{ range .page.Following }}
+ <li>[<a href="/{{ $key }}/{{ $board.Name }}/follow?follow={{ . }}&actor={{ $actor }}">Unsubscribe</a>]<a href="{{ . }}">{{ . }}</a></li>
+ {{ end }}
+ </ul>
+</div>
+
+<div id="followers" class="box2" style="margin-bottom: 25px; padding: 12px;">
+ <h4 style="margin: 0; margin-bottom: 5px;">Followers</h4>
+ <ul style="display: inline-block; padding: 0; margin: 0; list-style-type: none;">
+ {{ range .page.Followers }}
+ <li><a href="{{ . }}">{{ . }}</a></li>
+ {{ end }}
+ </ul>
+</div>
+{{ end }}
+
+<div id="reported" class="box2" style="margin-bottom: 25px; padding: 12px;">
+ <h4 style="margin: 0; margin-bottom: 5px;">Reported</h4>
+ <ul style="display: inline-block; padding: 0; margin: 0; list-style-type: none;">
+ {{ $domain := .page.Domain }}
+ {{ range .page.Reported }}
+ <li><a id="rpost" post="{{ .ID }}" href=""></a> - <b>{{ .Count }}</b><span> "{{ .Reason }}" </span> [<a href="/delete?id={{ .ID }}&board={{ $board.Name }}&manage=t">Remove Post</a>] [<a href="/deleteattach?id={{ .ID }}&board={{ $board.Name }}&manage=t">Remove Attachment</a>] [<a href="/report?id={{ .ID }}&close=1&board={{ $board.Name }}">Close</a>]</li>
+ {{ end }}
+ </ul>
+</div>
+
+{{ template "partials/footer" .page }}
+{{ template "partials/general_scripts" .page }}
+
+<script>
+ var reported = document.querySelectorAll('#rpost');
+ var reportedArray = [].slice.call(reported);
+
+ reportedArray.forEach(function(r, i){
+ var id = r.getAttribute("post")
+ r.innerText = "/" + {{ .page.Board.Name }} + "/" + shortURL("{{ .page.Board.Actor.Id }}", id)
+ r.href = {{ .page.Domain }} + "/" + {{ .page.Board.Name }} + "/" + shortURL("{{ .page.Board.Actor.Id }}", id)
+ })
+</script>