settings.tmpl 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {{with .Data}}
  2. {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
  3. <div class="page-title"> Settings </div>
  4. <form id="settings-form" action="/settings" method="POST">
  5. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  6. <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
  7. {{if .PostFormats}}
  8. <div class="settings-form-field">
  9. <label for="post-format"> Default format </label>
  10. {{$defFormat := .Settings.DefaultFormat}}
  11. <select id="post-format" name="format">
  12. {{range .PostFormats}}
  13. <option value="{{.Type}}" {{if eq $defFormat .Type}}selected{{end}}>{{.Name}}</option>
  14. {{end}}
  15. </select>
  16. </div>
  17. {{end}}
  18. <div class="settings-form-field">
  19. <label for="visibility"> Default scope </label>
  20. <select id="visibility" name="visibility">
  21. <option value="public" {{if eq .Settings.DefaultVisibility "public"}}selected{{end}}>Public</option>
  22. <option value="unlisted" {{if eq .Settings.DefaultVisibility "unlisted"}}selected{{end}}>Unlisted</option>
  23. <option value="private" {{if eq .Settings.DefaultVisibility "private"}}selected{{end}}>Private</option>
  24. <option value="direct" {{if eq .Settings.DefaultVisibility "direct"}}selected{{end}}>Direct</option>
  25. </select>
  26. </div>
  27. <div class="settings-form-field">
  28. <label for="notification-interval"> Refresh Notifications </label>
  29. <select id="notification-interval" name="notification_interval">
  30. <option value="0" {{if eq .Settings.NotificationInterval 0}}selected{{end}}>Disabled</option>
  31. <option value="30" {{if eq .Settings.NotificationInterval 30}}selected{{end}}>After 30s</option>
  32. <option value="60" {{if eq .Settings.NotificationInterval 60}}selected{{end}}>After 1m</option>
  33. <option value="120" {{if eq .Settings.NotificationInterval 120}}selected{{end}}>After 2m</option>
  34. <option value="300" {{if eq .Settings.NotificationInterval 300}}selected{{end}}>After 5m</option>
  35. <option value="600" {{if eq .Settings.NotificationInterval 600}}selected{{end}}>After 10m</option>
  36. </select>
  37. </div>
  38. <div class="settings-form-field">
  39. <input id="copy-scope" name="copy_scope" type="checkbox" value="true" {{if .Settings.CopyScope}}checked{{end}}>
  40. <label for="copy-scope"> Copy scope when replying </label>
  41. </div>
  42. <div class="settings-form-field">
  43. <input id="thread-tab" name="thread_in_new_tab" type="checkbox" value="true" {{if .Settings.ThreadInNewTab}}checked{{end}}>
  44. <label for="thread-tab"> Open threads in new tab from timeline </label>
  45. </div>
  46. <div class="settings-form-field">
  47. <input id="hide-attachments" name="hide_attachments" type="checkbox" value="true" {{if .Settings.HideAttachments}}checked{{end}}>
  48. <label for="hide-attachments"> Hide attachments </label>
  49. </div>
  50. <div class="settings-form-field">
  51. <input id="mask-nsfw" name="mask_nsfw" type="checkbox" value="true" {{if .Settings.MaskNSFW}}checked{{end}}>
  52. <label for="mask-nsfw"> Mask NSFW attachments </label>
  53. </div>
  54. <div class="settings-form-field">
  55. <input id="fluoride-mode" name="fluoride_mode" type="checkbox" value="true" {{if .Settings.FluorideMode}}checked{{end}}>
  56. <label for="fluoride-mode"> Enable <abbr title="Enable JavaScript based functionality, e.g., like/retweet without page reload and reply preview on thread page">fluoride mode</abbr> </label>
  57. </div>
  58. <div class="settings-form-field">
  59. <input id="anti-dopamine-mode" name="anti_dopamine_mode" type="checkbox"
  60. value="true" {{if .Settings.AntiDopamineMode}}checked{{end}}>
  61. <label for="anti-dopamine-mode"> Enable <abbr title="Remove like/retweet/unread notification count and disable like/retweet/follow notifications">anti-dopamine mode</abbr> </label>
  62. </div>
  63. <div class="settings-form-field">
  64. <input id="hide-unsupported-notifs" name="hide_unsupported_notifs" type="checkbox"
  65. value="true" {{if .Settings.HideUnsupportedNotifs}}checked{{end}}>
  66. <label for="hide-unsupported-notifs"> Hide unsupported notifications </label>
  67. </div>
  68. <div class="settings-form-field">
  69. <input id="dark-mode" name="dark_mode" type="checkbox" value="true" {{if .Settings.DarkMode}}checked{{end}}>
  70. <label for="dark-mode"> Use dark theme </label>
  71. </div>
  72. <div class="settings-form-field">
  73. <label for=""> Instance emoji filter (example_allowed anotherexample ...): </label>
  74. </div>
  75. <div>
  76. <textarea id="instance-emoji-filter" name="instance-emoji-filter" cols="80" rows="1">{{.Settings.InstanceEmojiFilter}}</textarea>
  77. </div>
  78. <div class="settings-form-field">
  79. <label for=""> Reactions filter (example_allowed anotherexample ...): </label>
  80. </div>
  81. <div>
  82. <textarea id="pleroma-reactions-filter" name="pleroma-reactions-filter" cols="80" rows="1">{{.Settings.AddReactionsFilter}}</textarea>
  83. </div>
  84. <div class="settings-form-field">
  85. <label for="css"> Custom CSS: </label>
  86. </div>
  87. <div>
  88. <textarea id="css" name="css" cols="80" rows="8">{{.Settings.CSS}}</textarea>
  89. </div>
  90. <button type="submit"> Save </button>
  91. </form>
  92. {{template "footer.tmpl"}}
  93. {{end}}