tavern/templates/configure.html

129 lines
6.1 KiB
HTML

{{define "head"}}{{end}}
{{define "footer_script"}}{{end}}
{{define "content"}}
<div class="row pt-3">
<div class="col">
<h1 class="pb-1">Settings</h1>
<form method="POST" action="{{ url "configure_user" }}">
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="checked"
id="userReplyCollectionUpdates" name="reply_collection_updates"
{{ if .user_config.reply_collection_updates }} checked="checked"{{ end }}
{{ if eq .fed_config.reply_collection_updates false }} disabled{{ end }}
>
<label class="form-check-label" for="userReplyCollectionUpdates">
Enable Reply Collection Updates
</label>
<small class="form-text text-muted">
When this feature is enabled, an <code>Update</code> activity will be sent to followers when
a reply is accepted and added to the object replies collection of the note. This has the
potential to generate a lot of activity.
</small>
{{ if eq .fed_config.reply_collection_updates false }}
<small class="form-text text-danger">
This has been disabled at the server level. Please contact the instance admin to allow
this feature to be enabled.
</small>
{{ end }}
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="checked"
id="userAutoAcceptFollowers" name="auto_accept_followers"
{{ if .user_config.auto_accept_followers }}checked="checked"{{ end }}
{{ if eq .fed_config.auto_accept_followers false }} disabled{{ end }}>
<label class="form-check-label" for="userAutoAcceptFollowers">
Auto Accept Followers
</label>
<small class="form-text text-muted">
When this feature is enabled, all <code>Follow</code> requests sent to the user will be
immediately accepted.
</small>
{{ if eq .fed_config.auto_accept_followers false }}
<small class="form-text text-danger">
This has been disabled at the server level. Please contact the instance admin to allow
this feature to be enabled.
</small>
{{ end }}
</div>
</div>
<input type="submit" class="btn btn-dark" name="submit" value="Submit"/>
</form>
</div>
</div>
<div class="row pt-3">
<div class="col">
<h1>Utilities</h1>
<p class="lead">
Several utilities are provided to allow manually trigger crawl jobs for actors and objects.
</p>
<ul>
<li>
<a href="{{ url "utilities" }}">Crawl Actor</a>
</li>
<li>
<a href="{{ url "utilities" }}">Crawl Object</a>
</li>
</ul>
</div>
</div>
<div class="row pt-3">
<div class="col">
<h3>ACLs</h3>
<form method="POST" action="{{ url "" }}configure/acl">
<div class="form-group">
<label for="testACLTarget">Target</label>
<input type="text" class="form-control" id="testACLTarget" name="target"
placeholder="https://lookatme.ceo/users/richy.rich" required>
<small id="createACLTargetHelp" class="form-text text-muted">
Enter an actor URL or domain.
</small>
</div>
<div class="form-group">
<label for="createACLAction">Action</label>
<select id="createACLAction" class="form-control" name="action" required>
<option value="1" selected>Deny</option>
<option value="0">Allow</option>
</select>
</div>
<input type="submit" class="btn btn-dark" name="submit" value="Submit"/>
</form>
</div>
</div>
<div class="row pt-3">
<div class="col">
<table class="table table-borderless table-hover">
<thead class="table-dark">
<tr>
<th>Scope</th>
<th>Target</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{{ range $acl := .acls }}
<tr>
<td>{{ $acl.Scope }}</td>
<td>{{ $acl.Target }}</td>
<td>{{ if eq $acl.Action 0 }}Allow{{ else }}Deny{{ end }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
</div>
<div class="row pt-3">
<div class="col">
<h3>ACL Test</h3>
<form method="POST" action="{{ url "" }}configure/acl">
<input type="hidden" name="validate" value="validate"/>
<div class="form-group">
<label for="testACLTarget">Target</label>
<input type="text" class="form-control" id="testACLTarget" name="target"
placeholder="https://lookatme.ceo/users/richy.rich" required>
</div>
<input type="submit" class="btn btn-dark" name="submit" value="Test"/>
</form>
</div>
</div>
{{end}}