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.
 
 
 
 

104 lines
3.7 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="text"
  21. name="to"
  22. id="to"
  23. value="{{$to}}"
  24. {{ if not $to }} autofocus{{ end }}
  25. />
  26. <label>Subject</label>
  27. <input
  28. type="text"
  29. name="subject"
  30. id="subject"
  31. value="{{.Message.Subject}}"
  32. {{ if $to }} autofocus{{ end }}
  33. />
  34. <label>Attachments</label>
  35. <input type="file" name="attachments" id="attachments" multiple>
  36. <div
  37. id="attachment-list"
  38. {{ if .Message.Attachments }}
  39. style="display: none;"
  40. {{ end }}
  41. >
  42. <div class="help">Drag and drop attachments here</div>
  43. {{range .Message.Attachments}}
  44. <div class="upload">
  45. <label class="filename">
  46. <input type="checkbox" name="prev_attachments" value="{{.Node.PathString}}" checked>
  47. {{.Filename}}
  48. </label>
  49. </div>
  50. {{end}}
  51. <!--
  52. <div class="upload">
  53. <span class="progress"></span>
  54. <span class="filename">foobar.pdf</span>
  55. <span class="error"></span>
  56. <span class="size">1234 KiB</span>
  57. <button>&times;</button>
  58. </div>
  59. -->
  60. </div>
  61. <input type="hidden" id="attachment-uuids" name="attachment-uuids" value="" />
  62. </div>
  63. <div class="text">
  64. <textarea name="text" class="body">{{.Message.Text}}</textarea>
  65. <div id="send-progress" style="display: none">
  66. <!--
  67. Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com
  68. License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
  69. -->
  70. <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>
  71. <span class="info">Sending message...</span>
  72. </div>
  73. </div>
  74. <datalist id="emails">
  75. {{range .Extra.EmailSuggestions}}
  76. <option value="{{.}}">
  77. {{end}}
  78. </datalist>
  79. <div class="actions">
  80. <button id="send-button" type="submit">Send Message</button>
  81. <button id="save-button" type="submit" name="save_as_draft">Save as draft</button>
  82. <a class="button-link" href="/mailbox/INBOX">Cancel</a>
  83. </div>
  84. </form>
  85. </main>
  86. </div>
  87. </div>
  88. <script src="/themes/alps/assets/compose.js"></script>
  89. {{template "foot.html"}}