1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>mailweb ({{account}}) — contacts</title>
<link rel="alternate" type="text/llm" href="/contacts"
title="Same information as a compact plain-text rendering for machine and LLM consumption: identical semantics and links, far fewer tokens. Request it with: Accept: text/llm">
<style>
:root {
color-scheme: light dark;
--bg: #f5f5f5;
--bg-card: #ffffff;
--border: #dddddd;
--text: #111111;
--text-meta: #666666;
--link: #3781b8;
--star: #c8920a;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1a1a1a;
--bg-card: #242424;
--border: #3a3a3a;
--text: #e8e8e8;
--text-meta: #999999;
--link: #7ab3e0;
--star: #e0aa30;
}
}
body { font-family: sans-serif; margin: 0; padding: 1rem;
background: var(--bg); color: var(--text); }
h1 { font-size: 1.2rem; margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; background: var(--bg-card);
border: 1px solid var(--border); border-radius: 4px; }
th { text-align: left; padding: 0.5rem 0.75rem;
border-bottom: 1px solid var(--border); color: var(--text-meta);
font-size: 0.85rem; font-weight: normal; }
td { padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--border);
font-size: 0.9rem; }
tr:last-child td { border-bottom: none; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.meta { color: var(--text-meta); font-size: 0.85rem; }
nav { margin-bottom: 1rem; display: flex; gap: 1.5rem; }
.footer { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-meta); }
.star { color: var(--star); }
button.action-btn {
background: none;
border: none;
cursor: pointer;
padding: 0.1rem 0.3rem;
border-radius: 3px;
font-size: 0.9rem;
line-height: 1;
}
button.action-btn:hover { background: var(--border); }
button.star-btn { color: var(--text-meta); }
button.star-btn.starred { color: var(--star); }
button.hide-btn { color: var(--text-meta); font-size: 0.8rem; }
td.actions { white-space: nowrap; }
{{template "nameStyle"}}
</style>
</head>
<body>
<nav><a href="/">← inbox</a>
<a href="{{.LLMViewURL}}" title="Compact plain-text rendering of this page">text view →</a></nav>
{{if .ShowHidden}}
<h1>Hidden contacts — {{len .Contacts}} addresses</h1>
<p class="meta"><a href="/contacts">← back to contacts</a></p>
{{else}}
<h1>Contacts — {{len .Contacts}} addresses</h1>
{{end}}
<table>
<tr><th>Name / Address</th><th>Last interaction</th><th>Messages</th><th></th></tr>
{{range .Contacts}}
<tr>
<td>
{{if .Important}}<span class="star" title="important">★</span> {{end}}<a href="/contact/{{.AddrEscaped}}">
{{template "nameAddr" .Name}}
</a>
{{/* The pen leads to the settings page, which is where a contact is named.
It replaced a text input in every row — naming while scanning the list
is now a page away, and the link carries where to come back to so the
return is one click and lands on this listing rather than the first
page of it. */}}
{{template "penLink" .Pen $.ReturnURL}}
</td>
<td class="meta">{{.LastSeen.Format "Mon, 02 Jan 2006 15:04"}}</td>
<td class="meta">{{.Count}}</td>
<td class="actions">
{{if eq $.ShowHidden false}}
{{if .Important}}
<form method="POST" action="/contact/{{.AddrEscaped}}/unstar" style="display:inline">
<button class="action-btn star-btn starred" type="submit" title="unstar">★</button>
</form>
{{else}}
<form method="POST" action="/contact/{{.AddrEscaped}}/star" style="display:inline">
<button class="action-btn star-btn" type="submit" title="star">☆</button>
</form>
{{end}}
{{end}}
{{if $.ShowHidden}}
<form method="POST" action="/contact/{{.AddrEscaped}}/unhide" style="display:inline">
<button class="action-btn hide-btn" type="submit">unhide</button>
</form>
{{else}}
<form method="POST" action="/contact/{{.AddrEscaped}}/hide" style="display:inline">
<button class="action-btn hide-btn" type="submit">hide</button>
</form>
{{end}}
</td>
</tr>
{{end}}
</table>
{{if and (eq .ShowHidden false) (gt .HiddenCount 0)}}
<p class="footer"><a href="/contacts?show=hidden">{{.HiddenCount}} hidden contact{{if gt .HiddenCount 1}}s{{end}}</a></p>
{{end}}
</body>
</html>
|