A webmail client. Forked from https://git.sr.ht/~migadu/alps
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

106 lines
3.8 KiB

  1. {{template "head.html" .}}
  2. {{template "nav.html" .}}
  3. {{template "util.html" .}}
  4. <div class="page-wrap">
  5. {{ template "aside" . }}
  6. <div class="container">
  7. <main class="create-update">
  8. <form method="post" enctype="multipart/form-data" id="compose-form">
  9. <input type="hidden" name="message_id" value="{{.Message.MessageID}}">
  10. <input type="hidden" name="in_reply_to" value="{{.Message.InReplyTo}}">
  11. <div class="headers no-js">
  12. <label>From</label>
  13. <input type="text" name="from" id="from" value="{{.Message.From}}" />
  14. <label>To</label>
  15. {{ $to := .Message.ToString }}
  16. {{ if eq $to "MISSING_MAILBOX@MISSING_DOMAIN" }}
  17. {{ $to = "" }}
  18. {{ end }}
  19. <input
  20. type="email"
  21. name="to"
  22. id="to"
  23. value="{{$to}}"
  24. multiple
  25. list="emails"
  26. {{ if not $to }} autofocus{{ end }}
  27. />
  28. <label>Subject</label>
  29. <input
  30. type="text"
  31. name="subject"
  32. id="subject"
  33. value="{{.Message.Subject}}"
  34. {{ if $to }} autofocus{{ end }}
  35. />
  36. <label>Attachments</label>
  37. <input type="file" name="attachments" id="attachments" multiple>
  38. <div
  39. id="attachment-list"
  40. {{ if .Message.Attachments }}
  41. style="display: none;"
  42. {{ end }}
  43. >
  44. <div class="help">Drag and drop attachments here</div>
  45. {{range .Message.Attachments}}
  46. <div class="upload">
  47. <label class="filename">
  48. <input type="checkbox" name="prev_attachments" value="{{.Node.PathString}}" checked>
  49. {{.Filename}}
  50. </label>
  51. </div>
  52. {{end}}
  53. <!--
  54. <div class="upload">
  55. <span class="progress"></span>
  56. <span class="filename">foobar.pdf</span>
  57. <span class="error"></span>
  58. <span class="size">1234 KiB</span>
  59. <button>&times;</button>
  60. </div>
  61. -->
  62. </div>
  63. <input type="hidden" id="attachment-uuids" name="attachment-uuids" value="" />
  64. </div>
  65. <div class="text">
  66. <textarea name="text" class="body">{{.Message.Text}}</textarea>
  67. <div id="send-progress" style="display: none">
  68. <!--
  69. Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com
  70. License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
  71. -->
  72. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"/></svg>
  73. <span class="info">Sending message...</span>
  74. </div>
  75. </div>
  76. <datalist id="emails">
  77. {{range .Extra.EmailSuggestions}}
  78. <option value="{{.}}">
  79. {{end}}
  80. </datalist>
  81. <div class="actions">
  82. <button id="send-button" type="submit">Send Message</button>
  83. <button id="save-button" type="submit" name="save_as_draft">Save as draft</button>
  84. <a class="button-link" href="/mailbox/INBOX">Cancel</a>
  85. </div>
  86. </form>
  87. </main>
  88. </div>
  89. </div>
  90. <script src="/themes/alps/assets/compose.js"></script>
  91. {{template "foot.html"}}