aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-01-24 20:58:27 +0100
committerSimon Ser <contact@emersion.fr>2020-01-24 20:59:35 +0100
commitb325933a8bc68fa99bc79982938f6936e9a6de8e (patch)
tree0c1e6d25fe8c83bbbed5ec8e2a365143b67ca2e7 /plugins/base
parent3384c39a1773c90eb4575d4017fcd92b9e9ab6f9 (diff)
downloadalps-b325933a8bc68fa99bc79982938f6936e9a6de8e.tar.gz
alps-b325933a8bc68fa99bc79982938f6936e9a6de8e.zip
Add .editorconfig
Diffstat (limited to 'plugins/base')
-rw-r--r--plugins/base/public/assets/style.css6
-rw-r--r--plugins/base/public/compose.html38
-rw-r--r--plugins/base/public/login.html14
-rw-r--r--plugins/base/public/mailbox.html58
-rw-r--r--plugins/base/public/message.html188
5 files changed, 152 insertions, 152 deletions
diff --git a/plugins/base/public/assets/style.css b/plugins/base/public/assets/style.css
index c27f10f..4f91f63 100644
--- a/plugins/base/public/assets/style.css
+++ b/plugins/base/public/assets/style.css
@@ -1,5 +1,5 @@
iframe {
- width: 100%;
- height: 400px;
- border: 0;
+ width: 100%;
+ height: 400px;
+ border: 0;
}
diff --git a/plugins/base/public/compose.html b/plugins/base/public/compose.html
index 4d69c81..0db84c0 100644
--- a/plugins/base/public/compose.html
+++ b/plugins/base/public/compose.html
@@ -3,31 +3,31 @@
<h1>koushin</h1>
<p>
- <a href="/mailbox/INBOX">Back</a>
+ <a href="/mailbox/INBOX">Back</a>
</p>
<h2>Compose new message</h2>
<form method="post" action="" enctype="multipart/form-data">
- <input type="hidden" name="in_reply_to" value="{{.Message.InReplyTo}}">
+ <input type="hidden" name="in_reply_to" value="{{.Message.InReplyTo}}">
- <label for="from">From:</label>
- <input type="email" name="from" id="from" required value="{{.Message.From}}">
- <br><br>
- <label for="to">To:</label>
- <input type="email" name="to" id="to" multiple required value="{{.Message.ToString}}">
- <br><br>
- <label for="subject">Subject:</label>
- <input type="text" name="subject" id="subject" value="{{.Message.Subject}}">
- <br><br>
- <label for="text">Body:</label><br>
- <textarea name="text" id="text" cols="80" rows="20">{{.Message.Text}}</textarea>
- <br><br>
- <label for="attachments">Attachments:</label>
- <input type="file" name="attachments" id="attachments" multiple>
- <br><br>
- <input type="submit" name="save_as_draft" value="Save as draft">
- <input type="submit" value="Send">
+ <label for="from">From:</label>
+ <input type="email" name="from" id="from" required value="{{.Message.From}}">
+ <br><br>
+ <label for="to">To:</label>
+ <input type="email" name="to" id="to" multiple required value="{{.Message.ToString}}">
+ <br><br>
+ <label for="subject">Subject:</label>
+ <input type="text" name="subject" id="subject" value="{{.Message.Subject}}">
+ <br><br>
+ <label for="text">Body:</label><br>
+ <textarea name="text" id="text" cols="80" rows="20">{{.Message.Text}}</textarea>
+ <br><br>
+ <label for="attachments">Attachments:</label>
+ <input type="file" name="attachments" id="attachments" multiple>
+ <br><br>
+ <input type="submit" name="save_as_draft" value="Save as draft">
+ <input type="submit" value="Send">
</form>
{{template "foot.html"}}
diff --git a/plugins/base/public/login.html b/plugins/base/public/login.html
index 7378935..94f1b23 100644
--- a/plugins/base/public/login.html
+++ b/plugins/base/public/login.html
@@ -3,13 +3,13 @@
<h1>koushin</h1>
<form method="post" action="">
- <label for="username">Username:</label>
- <input type="text" name="username" id="username"/>
- <br><br>
- <label for="password">Password:</label>
- <input type="password" name="password" id="password"/>
- <br><br>
- <input type="submit" value="Login">
+ <label for="username">Username:</label>
+ <input type="text" name="username" id="username"/>
+ <br><br>
+ <label for="password">Password:</label>
+ <input type="password" name="password" id="password"/>
+ <br><br>
+ <input type="submit" value="Login">
</form>
{{template "foot.html"}}
diff --git a/plugins/base/public/mailbox.html b/plugins/base/public/mailbox.html
index d480440..d19c73d 100644
--- a/plugins/base/public/mailbox.html
+++ b/plugins/base/public/mailbox.html
@@ -3,48 +3,48 @@
<h1>koushin</h1>
<p>
- <a href="/logout">Logout</a> · <a href="/compose">Compose</a>
+ <a href="/logout">Logout</a> · <a href="/compose">Compose</a>
</p>
<h2>{{.Mailbox.Name}}</h2>
<form method="get" action="">
- <input type="search" name="query" value="{{.Query}}">
- <input type="submit" value="Search">
+ <input type="search" name="query" value="{{.Query}}">
+ <input type="submit" value="Search">
</form>
<p>Mailboxes:</p>
<ul>
- {{range .Mailboxes}}
- <li><a href="/mailbox/{{.Name | pathescape}}">{{.Name}}</a></li>
- {{end}}
+ {{range .Mailboxes}}
+ <li><a href="/mailbox/{{.Name | pathescape}}">{{.Name}}</a></li>
+ {{end}}
</ul>
{{if .Messages}}
- <p>Messages:</p>
- <ul>
- {{range .Messages}}
- <li><a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
- {{if .Envelope.Subject}}
- {{.Envelope.Subject}}
- {{else}}
- (No subject)
- {{end}}
- </a></li>
- {{end}}
- </ul>
-
- <p>
- {{if ge .PrevPage 0}}
- <a href="?page={{.PrevPage}}&query={{.Query}}">Prev</a>
- {{end}}
- {{if and (ge .PrevPage 0) (ge .NextPage 0)}}·{{end}}
- {{if ge .NextPage 0}}
- <a href="?page={{.NextPage}}&query={{.Query}}">Next</a>
- {{end}}
- </p>
+ <p>Messages:</p>
+ <ul>
+ {{range .Messages}}
+ <li><a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
+ {{if .Envelope.Subject}}
+ {{.Envelope.Subject}}
+ {{else}}
+ (No subject)
+ {{end}}
+ </a></li>
+ {{end}}
+ </ul>
+
+ <p>
+ {{if ge .PrevPage 0}}
+ <a href="?page={{.PrevPage}}&query={{.Query}}">Prev</a>
+ {{end}}
+ {{if and (ge .PrevPage 0) (ge .NextPage 0)}}·{{end}}
+ {{if ge .NextPage 0}}
+ <a href="?page={{.NextPage}}&query={{.Query}}">Next</a>
+ {{end}}
+ </p>
{{else}}
- <p>No message.</p>
+ <p>No message.</p>
{{end}}
{{template "foot.html"}}
diff --git a/plugins/base/public/message.html b/plugins/base/public/message.html
index 3dc7f62..a973881 100644
--- a/plugins/base/public/message.html
+++ b/plugins/base/public/message.html
@@ -3,105 +3,105 @@
<h1>koushin</h1>
<p>
- <a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}">
- Back
- </a>
+ <a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}">
+ Back
+ </a>
</p>
<h2>
- {{if .Message.Envelope.Subject}}
- {{.Message.Envelope.Subject}}
- {{else}}
- (No subject)
- {{end}}
+ {{if .Message.Envelope.Subject}}
+ {{.Message.Envelope.Subject}}
+ {{else}}
+ (No subject)
+ {{end}}
</h2>
<form method="post" action="{{.Message.Uid}}/move">
- <label for="move-to">Move to:</label>
- <select name="to" id="move-to">
- {{range .Mailboxes}}
- <option {{if eq .Name $.Mailbox.Name}}selected{{end}}>{{.Name}}</option>
- {{end}}
- </select>
- <input type="submit" value="Move">
+ <label for="move-to">Move to:</label>
+ <select name="to" id="move-to">
+ {{range .Mailboxes}}
+ <option {{if eq .Name $.Mailbox.Name}}selected{{end}}>{{.Name}}</option>
+ {{end}}
+ </select>
+ <input type="submit" value="Move">
</form>
<form method="post" action="{{.Message.Uid}}/delete">
- <input type="submit" value="Delete">
+ <input type="submit" value="Delete">
</form>
{{if .Flags}}
- <form method="post" action="{{.Message.Uid}}/flag">
- <p>Flags:</p>
- {{range $name, $has := .Flags}}
- {{if ismutableflag $name}}
- <input type="checkbox" name="flags" id="flag-{{$name}}"
- value="{{$name}}" {{if $has}}checked{{end}}>
- <label for="flag-{{$name}}">{{$name | formatflag}}</label>
- <br>
- {{else}}
- {{if $has}}
- <input type="hidden" name="flags" value="{{$name}}">
- {{end}}
- {{end}}
- {{end}}
- <input type="submit" value="Set flags">
- </form>
+ <form method="post" action="{{.Message.Uid}}/flag">
+ <p>Flags:</p>
+ {{range $name, $has := .Flags}}
+ {{if ismutableflag $name}}
+ <input type="checkbox" name="flags" id="flag-{{$name}}"
+ value="{{$name}}" {{if $has}}checked{{end}}>
+ <label for="flag-{{$name}}">{{$name | formatflag}}</label>
+ <br>
+ {{else}}
+ {{if $has}}
+ <input type="hidden" name="flags" value="{{$name}}">
+ {{end}}
+ {{end}}
+ {{end}}
+ <input type="submit" value="Set flags">
+ </form>
{{end}}
{{define "addr-list"}}
- {{range $i, $addr := .}}
- {{if $i}},{{end}}
- {{.PersonalName}}
- &lt;<a href="/compose?to={{.Address}}">{{.Address}}</a>&gt;
- {{end}}
+ {{range $i, $addr := .}}
+ {{if $i}},{{end}}
+ {{.PersonalName}}
+ &lt;<a href="/compose?to={{.Address}}">{{.Address}}</a>&gt;
+ {{end}}
{{end}}
<ul>
- <li>
- <strong>Date</strong>: {{.Message.Envelope.Date | formatdate}}
- </li>
- <li>
- <strong>From</strong>: {{template "addr-list" .Message.Envelope.From}}
- </li>
- <li>
- <strong>To</strong>: {{template "addr-list" .Message.Envelope.To}}
- </li>
- {{if .Message.Envelope.Cc}}
- <li>
- <strong>Cc</strong>: {{template "addr-list" .Message.Envelope.Cc}}
- </li>
- {{end}}
- {{if .Message.Envelope.Bcc}}
- <li>
- <strong>Bcc</strong>: {{template "addr-list" .Message.Envelope.Bcc}}
- </li>
- {{end}}
+ <li>
+ <strong>Date</strong>: {{.Message.Envelope.Date | formatdate}}
+ </li>
+ <li>
+ <strong>From</strong>: {{template "addr-list" .Message.Envelope.From}}
+ </li>
+ <li>
+ <strong>To</strong>: {{template "addr-list" .Message.Envelope.To}}
+ </li>
+ {{if .Message.Envelope.Cc}}
+ <li>
+ <strong>Cc</strong>: {{template "addr-list" .Message.Envelope.Cc}}
+ </li>
+ {{end}}
+ {{if .Message.Envelope.Bcc}}
+ <li>
+ <strong>Bcc</strong>: {{template "addr-list" .Message.Envelope.Bcc}}
+ </li>
+ {{end}}
</ul>
{{define "message-part-tree"}}
- {{/* nested templates can't access the parent's context */}}
- {{$ = index . 0}}
- {{with index . 1}}
- <a
- {{if .IsText}}
- href="{{$.Message.Uid}}?part={{.PathString}}"
- {{else}}
- href="{{$.Message.Uid}}/raw?part={{.PathString}}"
- {{end}}
- >
- {{if eq $.PartPath .PathString}}<strong>{{end}}
- {{.String}}
- {{if eq $.PartPath .PathString}}</strong>{{end}}
- </a>
- {{if .Children}}
- <ul>
- {{range .Children}}
- <li>{{template "message-part-tree" (tuple $ .)}}</li>
- {{end}}
- </ul>
- {{end}}
- {{end}}
+ {{/* nested templates can't access the parent's context */}}
+ {{$ = index . 0}}
+ {{with index . 1}}
+ <a
+ {{if .IsText}}
+ href="{{$.Message.Uid}}?part={{.PathString}}"
+ {{else}}
+ href="{{$.Message.Uid}}/raw?part={{.PathString}}"
+ {{end}}
+ >
+ {{if eq $.PartPath .PathString}}<strong>{{end}}
+ {{.String}}
+ {{if eq $.PartPath .PathString}}</strong>{{end}}
+ </a>
+ {{if .Children}}
+ <ul>
+ {{range .Children}}
+ <li>{{template "message-part-tree" (tuple $ .)}}</li>
+ {{end}}
+ </ul>
+ {{end}}
+ {{end}}
{{end}}
<p>Parts:</p>
@@ -111,23 +111,23 @@
<hr>
{{if .Body}}
- <p>
- {{if .Message.HasFlag "\\Draft"}}
- <a href="{{.Message.Uid}}/edit?part={{.PartPath}}">Edit draft</a>
- {{else}}
- <a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a>
- {{end}}
- </p>
- {{if .IsHTML}}
- <!-- allow-same-origin is required to resize the frame with its content -->
- <!-- allow-popups is required for target="_blank" links -->
- <iframe id="email-frame" srcdoc="{{.Body}}" sandbox="allow-same-origin allow-popups"></iframe>
- {{else}}
- <pre>{{.Body}}</pre>
- {{end}}
+ <p>
+ {{if .Message.HasFlag "\\Draft"}}
+ <a href="{{.Message.Uid}}/edit?part={{.PartPath}}">Edit draft</a>
+ {{else}}
+ <a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a>
+ {{end}}
+ </p>
+ {{if .IsHTML}}
+ <!-- allow-same-origin is required to resize the frame with its content -->
+ <!-- allow-popups is required for target="_blank" links -->
+ <iframe id="email-frame" srcdoc="{{.Body}}" sandbox="allow-same-origin allow-popups"></iframe>
+ {{else}}
+ <pre>{{.Body}}</pre>
+ {{end}}
{{else}}
- <p>Can't preview this message part.</p>
- <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>
+ <p>Can't preview this message part.</p>
+ <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>
{{end}}
{{template "foot.html"}}