aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/alps/assets/style.css12
-rw-r--r--themes/alps/settings.html17
-rw-r--r--themes/alps/util.html37
3 files changed, 37 insertions, 29 deletions
diff --git a/themes/alps/assets/style.css b/themes/alps/assets/style.css
index e64c8a3..d652f66 100644
--- a/themes/alps/assets/style.css
+++ b/themes/alps/assets/style.css
@@ -88,7 +88,8 @@ input[type="file"],
input[type="number"],
input[type="date"],
input[type="time"],
-textarea {
+textarea,
+select {
margin: 0;
border: none;
border: 1px solid #e0e0e0;
@@ -157,7 +158,7 @@ aside ul {
aside li {
width: 100%;
display: flex;
- padding: 0.4rem 0 0.4rem 0.5rem;
+ padding: 0.4rem 0.5rem;
}
aside li a {
@@ -654,7 +655,8 @@ main table tfoot {
.action-group label,
.action-group input,
-.action-group textarea {
+.action-group textarea,
+.action-group select {
display: block;
width: 100%;
}
@@ -665,6 +667,10 @@ main table tfoot {
float: left;
}
+.action-group select {
+ height: 10rem;
+}
+
.actions-message,
.actions-contacts {
display: flex;
diff --git a/themes/alps/settings.html b/themes/alps/settings.html
index 9fc58ca..61e76e6 100644
--- a/themes/alps/settings.html
+++ b/themes/alps/settings.html
@@ -33,6 +33,23 @@
</div>
<div class="action-group">
+ <label for="subscriptions">Subscribed folders</label>
+ <select name="subscriptions" id="subscriptions" multiple>
+ {{ $subs := .Subscriptions }}
+ {{ range .Mailboxes }}
+ {{ if and (ne .Name "INBOX") (not (.HasAttr "\\Noselect")) }}
+ <option
+ value="{{.Name}}"
+ {{ if $subs.Has .Name }}
+ selected
+ {{ end }}
+ >{{.Name}}</option>
+ {{ end }}
+ {{ end }}
+ </select>
+ </div>
+
+ <div class="action-group">
<label for="messages_per_page">Messages per page</label>
<input
type="number"
diff --git a/themes/alps/util.html b/themes/alps/util.html
index 535714f..9cdfd86 100644
--- a/themes/alps/util.html
+++ b/themes/alps/util.html
@@ -1,43 +1,28 @@
{{ define "mbox-link" }}
-{{ if not (.HasAttr "\\Noselect") }}
-<li {{ if .Active }}class="active"{{ end }}>
- <a href="{{.URL}}">
- {{- if eq .Name "INBOX" -}}
+{{ if not (.Info.HasAttr "\\Noselect") }}
+<li {{ if .Info.Active }}class="active"{{ end }}>
+ <a href="{{.Info.URL}}">
+ {{- if eq .Info.Name "INBOX" -}}
Inbox
{{- else -}}
- {{ .Name }}
+ {{ .Info.Name }}
{{- end -}}
- {{- if .HasAttr "\\HasChildren" }}/{{ end }}
+ {{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
</a>
- <!-- TODO
- <button
- type="submit"
- name="subscribe"
- value="{{.Name}}"
- form="subscribe-form"
- {{ if eq .Name "INBOX" }}
- title="Unsubscribe"
- {{ else }}
- title="Subscribe"
- {{ end }}
- >
- {{ if eq .Name "INBOX" }}
- ◉
- {{ else }}
- ○
+ {{ if .Status }}
+ {{ if .Status.Unseen }}
+ <span class="unseen">({{.Status.Unseen}})</span>
+ {{ end }}
{{ end }}
- </button>
- -->
</li>
{{ else }}
<li class="noselect">
- {{.Name}}{{- if .HasAttr "\\HasChildren" }}/{{ end }}
+ {{.Info.Name}}{{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
</li>
{{ end }}
{{ end }}
{{ define "aside" }}
-<form id="subscribe-form" method="POST"></form>
<aside>
<ul>
<!-- the logo image, dimensions 200x32 may be present or not -->