diff options
author | r <r@freesoftwareextremist.com> | 2022-12-17 08:26:51 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2022-12-17 08:26:51 +0000 |
commit | 5147897c6c8ba3428ea6998f77241182ee8caa24 (patch) | |
tree | e0177960dfda43c901f5feb458186077f96e4abd /templates | |
parent | 9816045c21957bfda6760ca058eaae97901e3b63 (diff) | |
download | bloat-5147897c6c8ba3428ea6998f77241182ee8caa24.tar.gz bloat-5147897c6c8ba3428ea6998f77241182ee8caa24.zip |
Add support for expiring mutes
Diffstat (limited to 'templates')
-rw-r--r-- | templates/mute.tmpl | 29 | ||||
-rw-r--r-- | templates/user.tmpl | 12 |
2 files changed, 30 insertions, 11 deletions
diff --git a/templates/mute.tmpl b/templates/mute.tmpl new file mode 100644 index 0000000..47d0533 --- /dev/null +++ b/templates/mute.tmpl @@ -0,0 +1,29 @@ +{{with .Data}} +{{template "header.tmpl" (WithContext .CommonData $.Ctx)}} +<div class="page-title"> Mute {{.User.Acct}} </div> + +<form action="/mute/{{.User.ID}}" method="POST"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> + <div class="settings-form-field"> + <input id="notifications" name="notifications" type="checkbox" value="true" checked> + <label for="notifications"> Mute notifications </label> + </div> + <div class="settings-form-field"> + <label for="duration"> Auto unmute </label> + <select id="duration" name="duration"> + <option value="0" selected>Disabled</option> + <option value="300">After 5m</option> + <option value="1800">After 30m</option> + <option value="3600">After 1h</option> + <option value="21600">After 6h</option> + <option value="86400">After 1d</option> + <option value="259200">After 3d</option> + <option value="604800">After 7d</option> + </select> + </div> + <button type="submit"> Mute </button> +</form> + +{{template "footer.tmpl"}} +{{end}} diff --git a/templates/user.tmpl b/templates/user.tmpl index e30088b..5ea52d9 100644 --- a/templates/user.tmpl +++ b/templates/user.tmpl @@ -79,17 +79,7 @@ <input type="submit" value="unmute" class="btn-link"> </form> {{else}} - <form class="d-inline" action="/mute/{{.User.ID}}" method="post"> - <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> - <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> - <input type="submit" value="mute" class="btn-link"> - </form> - - - <form class="d-inline" action="/mute/{{.User.ID}}?notifications=false" method="post"> - <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> - <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> - <input type="submit" value="mute (keep notifications)" class="btn-link"> - </form> + <a href="/mute/{{.User.ID}}"> mute </a> {{end}} {{if .User.Pleroma.Relationship.Following}} - |