Cleanup cookie settings page

This commit is contained in:
iacore
2024-10-09 14:40:36 +00:00
committed by perennial
parent 0cb9847d31
commit 013aea8d54
+33
View File
@@ -373,5 +373,38 @@
</div>
</div>
</div>
<!-- End of general settings -->
<h2>Current cookie values</h2>
{{- range CookieListOrdered }}
<div class="settings-set-cookie">
<h3>{{.k}}</h3>
<form action="/settings/set-cookie" method="post">
<input type="hidden" name="key" value="{{.k}}" />
<input type="text" name="value" value="{{.v}}" />
<input type="submit" value="Set" />
</form>
</div>
{{- end }}
<div>
<h3>Batch operation</h3>
<p>
You can save your current cookie values to quickly set your settings on other compatible instances, or if the current instance's cookies went expired.
</p>
<p>Invalid values will be ignored.</p>
<form action="/settings/raw" method="post">
<textarea name="raw" rows="10" cols="80">
{{- range CookieListOrdered -}}
{{.k}}={{.v}}
{{end -}}
</textarea>
<input type="submit" value="Set raw settings" />
</form>
</div>
<form action="/settings/reset-all" method="post">
<input class="critical" type="submit" value="Reset all cookies/preferences" />
</form>
</div>
{{- end }}