inboxer 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/routes.js +141 -58
- package/dist/ui/static/app.js +46 -0
- package/dist/ui/static/style.css +295 -70
- package/dist/ui/strings.d.ts +12 -6
- package/dist/ui/strings.js +12 -6
- package/dist/ui/views.d.ts +50 -15
- package/dist/ui/views.js +300 -136
- package/package.json +3 -2
- package/src/ui/routes.ts +59 -41
- package/src/ui/static/app.js +19 -0
- package/src/ui/static/style.css +31 -19
- package/src/ui/strings.ts +0 -4
- package/src/ui/views.ts +82 -90
package/dist/ui/static/style.css
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
color-scheme: light dark;
|
|
3
|
-
--bg: light-dark(#fbfbfa, #
|
|
4
|
-
--fg: light-dark(#0a0a0a, #
|
|
5
|
-
--muted: light-dark(#
|
|
6
|
-
--line: light-dark(#e6e6e3, #
|
|
7
|
-
--soft: light-dark(#f1f1ef, #
|
|
3
|
+
--bg: light-dark(#fbfbfa, #262624);
|
|
4
|
+
--fg: light-dark(#0a0a0a, #ececea);
|
|
5
|
+
--muted: light-dark(#6b6b67, #a3a39e);
|
|
6
|
+
--line: light-dark(#e6e6e3, #3a3a37);
|
|
7
|
+
--soft: light-dark(#f1f1ef, #1f1f1e);
|
|
8
|
+
--chip: light-dark(#e9e9e6, #333331);
|
|
9
|
+
--surface: light-dark(#ffffff, #2e2e2c);
|
|
10
|
+
--mine: light-dark(#ffe6d6, #4a2e20);
|
|
11
|
+
--mine-line: light-dark(#ffd2b8, #5e3a28);
|
|
8
12
|
--accent: light-dark(#ff4d00, #ff7a3d);
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--primary-
|
|
12
|
-
--primary-
|
|
13
|
+
--accent-text: light-dark(#c43d00, #ff8f5c);
|
|
14
|
+
--focus: light-dark(#0a0a0a, #a3a39e);
|
|
15
|
+
--primary-bg: light-dark(#0a0a0a, #ececea);
|
|
16
|
+
--primary-fg: light-dark(#fbfbfa, #1f1f1e);
|
|
13
17
|
--danger: light-dark(#d92d20, #ff6b5e);
|
|
18
|
+
--backdrop: light-dark(rgb(10 10 10 / .42), rgb(0 0 0 / .5));
|
|
14
19
|
--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
|
|
20
|
+
--tabbar: 64px;
|
|
15
21
|
font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
16
22
|
font-size: 15px;
|
|
17
23
|
line-height: 1.5;
|
|
@@ -24,24 +30,251 @@
|
|
|
24
30
|
[hidden] { display: none !important; }
|
|
25
31
|
body { margin: 0; background: var(--bg); color: var(--fg); }
|
|
26
32
|
a { color: inherit; text-decoration: none; }
|
|
27
|
-
|
|
28
|
-
h1 { font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.04em; font-weight: 700; margin: 0 0 24px; }
|
|
33
|
+
h1 { font-size: 2rem; line-height: 1.1; letter-spacing: -0.04em; font-weight: 700; margin: 0 0 24px; }
|
|
29
34
|
::selection { background: var(--accent); color: #fff; }
|
|
35
|
+
.icon { flex: none; }
|
|
30
36
|
|
|
31
|
-
/*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.
|
|
37
|
+
/* Shell: a tab bar on a phone, a sidebar on a wide screen */
|
|
38
|
+
.sidebar { display: none; }
|
|
39
|
+
body.app { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
|
|
40
|
+
body.app.full { padding-bottom: 0; }
|
|
41
|
+
.page { max-width: 760px; margin: 0 auto; padding: 24px 16px 32px; }
|
|
42
|
+
|
|
43
|
+
.tabbar {
|
|
44
|
+
position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
|
|
45
|
+
display: flex; align-items: center;
|
|
46
|
+
padding: 4px 8px env(safe-area-inset-bottom);
|
|
47
|
+
background: var(--bg); border-top: 1px solid var(--line);
|
|
48
|
+
}
|
|
49
|
+
body.full .tabbar { display: none; }
|
|
50
|
+
.tabbar a {
|
|
51
|
+
position: relative; flex: 1; height: 56px;
|
|
52
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
|
|
53
|
+
font-size: 11px; font-weight: 500; color: var(--muted);
|
|
54
|
+
}
|
|
55
|
+
.tabbar a[aria-current="page"] { color: var(--fg); }
|
|
56
|
+
.tabbar .count {
|
|
57
|
+
position: absolute; top: 4px; left: 52%;
|
|
58
|
+
min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
|
|
59
|
+
display: flex; align-items: center; justify-content: center;
|
|
60
|
+
background: var(--accent); color: #1f1f1e; font-family: var(--mono); font-size: 10px;
|
|
61
|
+
}
|
|
62
|
+
.tab-compose { flex: 1; height: 56px; padding: 0; border: none; background: none; display: flex; align-items: center; justify-content: center; }
|
|
63
|
+
.tab-compose span {
|
|
64
|
+
width: 52px; height: 40px; border-radius: 14px;
|
|
65
|
+
display: flex; align-items: center; justify-content: center;
|
|
66
|
+
background: var(--primary-bg); color: var(--primary-fg);
|
|
67
|
+
}
|
|
68
|
+
.tab-compose:hover { border: none; }
|
|
69
|
+
|
|
70
|
+
@media (min-width: 900px) {
|
|
71
|
+
body.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); padding-bottom: 0; }
|
|
72
|
+
.tabbar { display: none; }
|
|
73
|
+
.sidebar {
|
|
74
|
+
position: sticky; top: 0; height: 100dvh;
|
|
75
|
+
display: flex; flex-direction: column; gap: 4px;
|
|
76
|
+
padding: 20px 14px; border-right: 1px solid var(--line);
|
|
77
|
+
}
|
|
78
|
+
.brand { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; padding: 0 12px; }
|
|
79
|
+
.brand span { color: var(--accent); }
|
|
80
|
+
.new-mail { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; margin: 16px 0 14px; }
|
|
81
|
+
.side-nav { display: flex; flex-direction: column; gap: 2px; }
|
|
82
|
+
.side-nav a {
|
|
83
|
+
display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px;
|
|
84
|
+
color: var(--muted); font-size: 14px; font-weight: 500;
|
|
85
|
+
}
|
|
86
|
+
.side-nav a:hover { color: var(--fg); }
|
|
87
|
+
.side-nav a[aria-current="page"] { background: var(--chip); color: var(--fg); }
|
|
88
|
+
.side-nav .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--accent-text); }
|
|
89
|
+
.side-end { margin-top: auto; }
|
|
90
|
+
.page { padding-top: 40px; }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Inbox: the list, and the open thread beside it on a wide screen */
|
|
94
|
+
@media (max-width: 899px) {
|
|
95
|
+
.split .pane { display: none; }
|
|
96
|
+
.split.has-thread .list { display: none; }
|
|
97
|
+
.split.has-thread .pane { display: block; }
|
|
98
|
+
}
|
|
99
|
+
@media (min-width: 900px) {
|
|
100
|
+
.split { display: flex; height: 100dvh; }
|
|
101
|
+
.split .list { display: block; width: 380px; flex: none; overflow-y: auto; border-right: 1px solid var(--line); }
|
|
102
|
+
.split .pane { display: block; flex: 1; min-width: 0; background: var(--soft); }
|
|
103
|
+
body.context-open .split .list { display: none; }
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.list-head { padding: 18px 16px 12px; }
|
|
107
|
+
.list-head h1 { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
108
|
+
.filters { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
|
|
109
|
+
.chips { display: flex; flex: none; gap: 8px; }
|
|
110
|
+
.filters .select { min-width: 0; }
|
|
111
|
+
.filters select { width: 100%; text-overflow: ellipsis; }
|
|
112
|
+
.chip {
|
|
113
|
+
display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px;
|
|
114
|
+
border: 1px solid var(--line); font-size: 13px; font-weight: 500; white-space: nowrap;
|
|
115
|
+
}
|
|
116
|
+
.chip:hover { border-color: var(--focus); }
|
|
117
|
+
.chip[aria-current="page"] { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
|
|
118
|
+
|
|
119
|
+
.row { display: flex; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
|
|
120
|
+
.row:hover { background: var(--soft); }
|
|
121
|
+
.row[aria-current="page"] { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); }
|
|
122
|
+
.avatar {
|
|
123
|
+
width: 44px; height: 44px; border-radius: 999px; flex: none;
|
|
124
|
+
display: flex; align-items: center; justify-content: center;
|
|
125
|
+
background: var(--chip); font-size: 14px; font-weight: 600;
|
|
126
|
+
}
|
|
127
|
+
.row-main { flex: 1; min-width: 0; }
|
|
128
|
+
.row-top { display: flex; align-items: baseline; gap: 8px; }
|
|
129
|
+
.row .who { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
130
|
+
.row time { flex: none; font-family: var(--mono); font-size: 11px; color: var(--muted); }
|
|
131
|
+
.row-subject { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
132
|
+
.row.unread .who { font-weight: 600; }
|
|
133
|
+
.row.unread .row-subject { color: var(--fg); font-weight: 500; }
|
|
134
|
+
.row.unread time { color: var(--accent-text); }
|
|
135
|
+
.row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
|
|
136
|
+
.row-snippet { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
137
|
+
.row-by { font-family: var(--mono); font-size: 11px; color: var(--muted); }
|
|
138
|
+
.list .empty { border-top: 1px solid var(--line); }
|
|
139
|
+
|
|
140
|
+
/* Thread */
|
|
141
|
+
.thread {
|
|
142
|
+
position: relative; height: 100dvh;
|
|
143
|
+
display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
|
|
144
|
+
background: var(--soft);
|
|
145
|
+
}
|
|
146
|
+
.thread > :not(.context-panel, .context-backdrop) { grid-column: 1; }
|
|
147
|
+
.thread-head {
|
|
148
|
+
display: flex; align-items: center; gap: 4px; padding: 8px 6px;
|
|
149
|
+
background: var(--bg); border-bottom: 1px solid var(--line);
|
|
150
|
+
}
|
|
151
|
+
.icon-btn {
|
|
152
|
+
width: 44px; height: 44px; padding: 0; flex: none; border: none; border-radius: 999px;
|
|
153
|
+
display: inline-flex; align-items: center; justify-content: center; background: none; color: var(--fg);
|
|
154
|
+
}
|
|
155
|
+
.icon-btn:hover { background: var(--soft); border: none; }
|
|
156
|
+
.thread-head form { margin: 0; }
|
|
157
|
+
.thread-title {
|
|
158
|
+
flex: 1; min-width: 0; height: auto; padding: 4px 6px; border: none; border-radius: 12px;
|
|
159
|
+
display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: none; font: inherit; color: inherit;
|
|
160
|
+
}
|
|
161
|
+
button.thread-title:hover { background: var(--soft); border: none; }
|
|
162
|
+
.thread-subject {
|
|
163
|
+
font-size: 15px; font-weight: 600; line-height: 1.25;
|
|
164
|
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
|
165
|
+
}
|
|
166
|
+
.thread-meta { max-width: 100%; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
167
|
+
.context-btn { display: none; }
|
|
168
|
+
|
|
169
|
+
.messages { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 20px; }
|
|
170
|
+
.day {
|
|
171
|
+
align-self: center; padding: 4px 10px; border-radius: 999px; background: var(--chip);
|
|
172
|
+
font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
|
|
173
|
+
}
|
|
174
|
+
.msg { max-width: 86%; padding: 12px 14px 8px; border-radius: 18px; font-size: 14.5px; }
|
|
175
|
+
.msg.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
|
|
176
|
+
.msg.mine { align-self: flex-end; background: var(--mine); border: 1px solid var(--mine-line); border-bottom-right-radius: 6px; }
|
|
177
|
+
.msg .body { margin: 0; }
|
|
178
|
+
.msg > .meta { margin-bottom: 6px; }
|
|
179
|
+
.msg-from { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
|
|
180
|
+
.msg-time { display: block; text-align: right; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
|
|
181
|
+
|
|
182
|
+
/* A draft in a thread sits on our side as a dashed bubble */
|
|
183
|
+
.messages .card {
|
|
184
|
+
align-self: flex-end; max-width: 86%; padding: 12px 14px;
|
|
185
|
+
background: var(--surface); border: 1.5px dashed var(--accent); border-radius: 18px; border-bottom-right-radius: 6px;
|
|
186
|
+
}
|
|
187
|
+
.messages .card.pending, .messages .card.notice { border-style: solid; border-color: var(--line); }
|
|
188
|
+
.messages .card .mailbox, .messages .draft-head .subject { display: none; }
|
|
189
|
+
.messages .card .body { margin-top: 10px; }
|
|
190
|
+
.messages .card .actions { justify-content: flex-end; margin-top: 12px; }
|
|
191
|
+
|
|
192
|
+
.composer {
|
|
193
|
+
display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px;
|
|
194
|
+
padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
|
|
195
|
+
background: var(--bg); border-top: 1px solid var(--line);
|
|
196
|
+
}
|
|
197
|
+
.composer textarea {
|
|
198
|
+
flex: 1; min-width: 0; min-height: 44px; max-height: 40dvh; margin: 0; padding: 11px 16px;
|
|
199
|
+
field-sizing: content; resize: none; border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
|
|
200
|
+
}
|
|
201
|
+
.composer textarea:focus { border-color: var(--focus); }
|
|
202
|
+
.composer .send { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
|
|
203
|
+
.reply-all { flex-basis: 100%; display: flex; align-items: center; gap: 8px; padding: 2px 8px; font-family: var(--mono); font-size: .72rem; color: var(--muted); cursor: pointer; }
|
|
204
|
+
.reply-all input { accent-color: var(--accent); }
|
|
205
|
+
|
|
206
|
+
/* Context: a side panel on a wide screen, a bottom sheet on a phone */
|
|
207
|
+
.context-panel { display: none; background: var(--bg); }
|
|
208
|
+
.context-head { display: flex; align-items: center; height: 60px; padding: 0 8px 0 16px; }
|
|
209
|
+
.context-head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 600; }
|
|
210
|
+
.context-body { overflow-y: auto; padding: 0 16px 16px; }
|
|
211
|
+
.context-body section { padding: 14px 0; border-top: 1px solid var(--line); }
|
|
212
|
+
.context-backdrop { display: none; }
|
|
213
|
+
body.context-open .context-panel { display: flex; flex-direction: column; }
|
|
214
|
+
@media (max-width: 899px) {
|
|
215
|
+
body.context-open .context-backdrop { display: block; position: fixed; inset: 0; z-index: 20; background: var(--backdrop); }
|
|
216
|
+
body.context-open .context-panel {
|
|
217
|
+
position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; height: 70dvh;
|
|
218
|
+
border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgb(0 0 0 / .25);
|
|
219
|
+
padding-bottom: env(safe-area-inset-bottom); animation: rise .2s ease-out;
|
|
220
|
+
}
|
|
221
|
+
.context-panel::before {
|
|
222
|
+
content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px;
|
|
223
|
+
border-radius: 999px; background: var(--line);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
@media (min-width: 900px) {
|
|
227
|
+
.thread { height: 100dvh; }
|
|
228
|
+
.msg, .messages .card { max-width: 68%; }
|
|
229
|
+
.messages { padding: 20px 32px 28px; }
|
|
230
|
+
.thread-head { padding: 12px 20px 12px 12px; gap: 8px; }
|
|
231
|
+
.context-btn { display: inline-flex; align-items: center; }
|
|
232
|
+
body.context-open .context-btn { background: var(--chip); }
|
|
233
|
+
body.context-open .thread { grid-template-columns: minmax(0, 1fr) 360px; }
|
|
234
|
+
body.context-open .context-panel { grid-column: 2; grid-row: 1 / -1; border-left: 1px solid var(--line); min-height: 0; }
|
|
235
|
+
.composer { padding: 0 24px 20px; background: none; border: none; }
|
|
236
|
+
}
|
|
237
|
+
@keyframes rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
|
|
238
|
+
|
|
239
|
+
/* Context rows, shared by the panel and the folded block on a draft */
|
|
240
|
+
.context .who, .context-body .who { font-family: var(--mono); font-size: .75rem; color: var(--fg); overflow-wrap: anywhere; }
|
|
241
|
+
.context dl, .context-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0 0; font-family: var(--mono); font-size: .75rem; }
|
|
242
|
+
.context dt, .context-body dt { color: var(--muted); }
|
|
243
|
+
.context dd, .context-body dd { margin: 0; overflow-wrap: anywhere; }
|
|
244
|
+
.context p, .context-body p { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--soft); white-space: pre-wrap; font-size: .8125rem; color: var(--muted); }
|
|
245
|
+
.context summary { margin-top: 14px; }
|
|
246
|
+
.context section { margin-top: 12px; padding-left: 14px; border-left: 1px solid var(--line); }
|
|
247
|
+
|
|
248
|
+
/* Sheets: New mail rises from the bottom on a phone and centers on a wide screen */
|
|
249
|
+
dialog.sheet {
|
|
250
|
+
margin: auto 0 0; width: 100%; max-width: 100%; height: 70dvh; max-height: 70dvh; padding: 0;
|
|
251
|
+
border: none; border-radius: 22px 22px 0 0; background: var(--bg); color: var(--fg);
|
|
252
|
+
box-shadow: 0 -8px 30px rgb(0 0 0 / .25);
|
|
253
|
+
}
|
|
254
|
+
dialog.sheet[open] { animation: rise .2s ease-out; }
|
|
255
|
+
dialog.sheet::backdrop { background: var(--backdrop); }
|
|
256
|
+
dialog.sheet form { position: relative; height: 100%; display: flex; flex-direction: column; }
|
|
257
|
+
.grabber { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 8px auto 9px; flex: none; }
|
|
258
|
+
.sheet-close { position: absolute; top: 8px; right: 8px; color: var(--muted); z-index: 1; }
|
|
259
|
+
dialog.sheet .field { padding: 0 16px; }
|
|
260
|
+
dialog.sheet .field.compact { padding-right: 60px; }
|
|
261
|
+
dialog.sheet .field output { font-family: var(--mono); font-size: .8rem; padding: 10px 0; }
|
|
262
|
+
dialog.sheet textarea { flex: 1; min-height: 0; margin: 0; padding: 12px 16px; resize: none; }
|
|
263
|
+
.sheet-actions {
|
|
264
|
+
display: flex; gap: 8px;
|
|
265
|
+
padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
|
|
266
|
+
}
|
|
267
|
+
.sheet-actions button { height: 44px; display: inline-flex; align-items: center; gap: 8px; }
|
|
268
|
+
.sheet-actions .icon-btn { cursor: pointer; color: var(--muted); }
|
|
269
|
+
.sheet-actions .icon-btn:hover { color: var(--fg); }
|
|
270
|
+
.sheet-head { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 60px 0 16px; flex: none; }
|
|
271
|
+
dialog.sheet .note { margin: 0 16px 8px; flex: none; }
|
|
272
|
+
.sheet-files { flex: 1; min-width: 0; align-self: center; font-family: var(--mono); font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
273
|
+
@media (min-width: 900px) {
|
|
274
|
+
dialog.sheet { margin: auto; width: 640px; height: min(640px, 80dvh); border-radius: 18px; }
|
|
275
|
+
dialog.sheet[open] { animation: none; }
|
|
276
|
+
.grabber { visibility: hidden; }
|
|
277
|
+
}
|
|
45
278
|
|
|
46
279
|
/* Meta and labels */
|
|
47
280
|
.meta {
|
|
@@ -51,66 +284,54 @@ header form { margin: 0; }
|
|
|
51
284
|
.meta strong { color: var(--fg); font-weight: 500; }
|
|
52
285
|
.badge {
|
|
53
286
|
font-family: var(--mono); font-size: .66rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
|
|
54
|
-
padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--fg);
|
|
287
|
+
padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--fg); white-space: nowrap;
|
|
55
288
|
}
|
|
56
|
-
.badge.draft { border-color: var(--accent); color: var(--accent); }
|
|
57
|
-
.dot { width:
|
|
289
|
+
.badge.draft { border-color: var(--accent); color: var(--accent-text); }
|
|
290
|
+
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: auto; }
|
|
58
291
|
|
|
59
|
-
/*
|
|
292
|
+
/* Cards: drafts for review and devices */
|
|
60
293
|
.card { border-top: 1px solid var(--line); padding: 24px 0; scroll-margin-top: 64px; }
|
|
61
|
-
.card > .meta + .meta { margin-top:
|
|
294
|
+
.card > .meta + .meta, .draft-head { margin-top: 8px; }
|
|
62
295
|
.subject { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; margin: 10px 0 4px; }
|
|
63
|
-
.note {
|
|
64
|
-
.
|
|
65
|
-
.context section { margin-top: 12px; padding-left: 14px; border-left: 1px solid var(--line); }
|
|
66
|
-
.context .who { font-family: var(--mono); font-size: .75rem; color: var(--fg); overflow-wrap: anywhere; }
|
|
67
|
-
.context dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 16px; margin: 8px 0 0; font-family: var(--mono); font-size: .75rem; }
|
|
68
|
-
.context dt { color: var(--muted); }
|
|
69
|
-
.context dd { margin: 0; overflow-wrap: anywhere; }
|
|
70
|
-
.context p { margin: 8px 0 0; white-space: pre-wrap; font-size: .8125rem; color: var(--muted); }
|
|
296
|
+
.note { background: var(--soft); border-radius: 10px; padding: 6px 10px; margin: 12px 0; white-space: pre-wrap; font-size: .8125rem; color: var(--muted); }
|
|
297
|
+
.messages .note { background: var(--chip); }
|
|
71
298
|
.body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 0; font: inherit; }
|
|
72
|
-
.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top:
|
|
73
|
-
.images a { display: block; aspect-ratio: 1; border: 1px solid var(--line); border-radius:
|
|
299
|
+
.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
|
|
300
|
+
.images a { display: block; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--soft); }
|
|
74
301
|
.images img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s; }
|
|
75
302
|
.images a:hover img { opacity: .8; }
|
|
76
|
-
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top:
|
|
303
|
+
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
|
|
77
304
|
.file {
|
|
78
305
|
display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
|
|
79
306
|
padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
|
|
80
|
-
font-family: var(--mono); font-size: .72rem; transition: border-color .15s;
|
|
307
|
+
font-family: var(--mono); font-size: .72rem; white-space: nowrap; transition: border-color .15s;
|
|
81
308
|
}
|
|
82
309
|
.file:hover { border-color: var(--focus); }
|
|
83
|
-
.file span:first-child { overflow: hidden; text-overflow: ellipsis;
|
|
310
|
+
.file span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
84
311
|
.file .size { color: var(--muted); flex: none; }
|
|
85
|
-
.draft-files {
|
|
86
|
-
.draft-files .warn { flex
|
|
312
|
+
.draft-files { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow-x: auto; }
|
|
313
|
+
.draft-files .warn { flex: none; margin: 0; color: var(--danger); font-family: var(--mono); font-size: .72rem; }
|
|
87
314
|
.draft-files .link { font-size: 1rem; line-height: 1; }
|
|
88
|
-
.attach { cursor: pointer; color: var(--muted); }
|
|
89
|
-
.attach:hover { color: var(--fg); }
|
|
90
315
|
[data-drop] { position: relative; }
|
|
91
316
|
.drop-hint {
|
|
92
317
|
display: none; position: absolute; inset: 8px 0; z-index: 1;
|
|
93
318
|
align-items: center; justify-content: center;
|
|
94
319
|
border: 1px dashed var(--accent); border-radius: 8px;
|
|
95
320
|
background: color-mix(in srgb, var(--bg) 88%, transparent);
|
|
96
|
-
font-family: var(--mono); font-size: .8rem; color: var(--accent); pointer-events: none;
|
|
321
|
+
font-family: var(--mono); font-size: .8rem; color: var(--accent-text); pointer-events: none;
|
|
97
322
|
}
|
|
98
323
|
[data-drop].dragging .drop-hint { display: flex; }
|
|
99
324
|
.notice { color: var(--muted); font-family: var(--mono); font-size: .8rem; }
|
|
100
|
-
.thread-head { margin-bottom: 28px; }
|
|
101
|
-
.domain { font-family: var(--mono); font-size: .72rem; letter-spacing: .02em; color: var(--muted); margin-bottom: 10px; }
|
|
102
325
|
.pending { position: relative; }
|
|
103
326
|
.pending-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .9rem; }
|
|
104
327
|
.pending-row span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
|
|
105
328
|
.pending-row strong { color: var(--fg); font-weight: 500; }
|
|
106
329
|
.countdown { position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--accent); transform-origin: left; animation: countdown linear forwards; }
|
|
330
|
+
.messages .countdown { left: 14px; right: 14px; width: auto; top: auto; bottom: 6px; }
|
|
107
331
|
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
|
|
108
|
-
.conflict {
|
|
109
|
-
.conflict .warn { color: var(--danger); font-weight: 600; margin:
|
|
110
|
-
|
|
111
|
-
.thread-row { display: block; transition: opacity .15s; }
|
|
112
|
-
.thread-row:hover { opacity: .65; }
|
|
113
|
-
.thread-row .subject { margin: 8px 0 2px; }
|
|
332
|
+
.sheet-conflict { padding: 0 16px 8px; max-height: 40%; overflow-y: auto; flex: none; }
|
|
333
|
+
.sheet-conflict .warn { color: var(--danger); font-weight: 600; margin: 0; }
|
|
334
|
+
.sheet-conflict details summary { margin-top: 8px; }
|
|
114
335
|
|
|
115
336
|
details summary {
|
|
116
337
|
cursor: pointer; list-style: none; margin-top: 18px;
|
|
@@ -127,11 +348,11 @@ button {
|
|
|
127
348
|
font: inherit; font-size: .875rem; font-weight: 500;
|
|
128
349
|
height: 36px; padding: 0 16px; border-radius: 999px;
|
|
129
350
|
border: 1px solid var(--line); background: transparent; color: var(--fg);
|
|
130
|
-
cursor: pointer; transition: border-color .15s, opacity .15s;
|
|
351
|
+
cursor: pointer; transition: border-color .15s, opacity .15s, background-color .15s;
|
|
131
352
|
}
|
|
132
353
|
button:hover { border-color: var(--focus); }
|
|
133
|
-
button.primary { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-
|
|
134
|
-
button.primary:hover {
|
|
354
|
+
button.primary { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
|
|
355
|
+
button.primary:hover { opacity: .9; }
|
|
135
356
|
button.danger { color: var(--danger); border-color: transparent; }
|
|
136
357
|
button.danger:hover { border-color: var(--danger); }
|
|
137
358
|
button.link { height: auto; padding: 0; border: none; color: var(--muted); }
|
|
@@ -141,9 +362,10 @@ button.link:hover { color: var(--fg); }
|
|
|
141
362
|
select {
|
|
142
363
|
appearance: none; -webkit-appearance: none;
|
|
143
364
|
font: inherit; font-size: .8rem; color: var(--fg); cursor: pointer;
|
|
144
|
-
height:
|
|
365
|
+
height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 999px;
|
|
145
366
|
background: transparent;
|
|
146
367
|
}
|
|
368
|
+
select option { background: var(--bg); color: var(--fg); }
|
|
147
369
|
.select { position: relative; display: inline-flex; color: var(--fg); }
|
|
148
370
|
.select::after {
|
|
149
371
|
content: ""; position: absolute; right: 13px; top: 50%; pointer-events: none;
|
|
@@ -153,12 +375,12 @@ select {
|
|
|
153
375
|
select:hover, select:focus { border-color: var(--focus); outline: none; }
|
|
154
376
|
|
|
155
377
|
/* Editor */
|
|
156
|
-
.field { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
|
|
378
|
+
.field { display: flex; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); }
|
|
157
379
|
.field label {
|
|
158
380
|
flex: 0 0 64px;
|
|
159
381
|
font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
|
|
160
382
|
}
|
|
161
|
-
.field input { flex: 1; min-width: 0; border: none; background: none; padding:
|
|
383
|
+
.field input { flex: 1; min-width: 0; border: none; background: none; padding: 11px 0; font: inherit; color: var(--fg); outline: none; }
|
|
162
384
|
.field:focus-within { border-bottom-color: var(--focus); }
|
|
163
385
|
.field .link { font-family: var(--mono); font-size: .72rem; }
|
|
164
386
|
textarea {
|
|
@@ -166,14 +388,17 @@ textarea {
|
|
|
166
388
|
border: none; background: none; font: inherit; color: var(--fg); outline: none;
|
|
167
389
|
}
|
|
168
390
|
|
|
169
|
-
/*
|
|
170
|
-
.
|
|
171
|
-
.
|
|
172
|
-
.
|
|
173
|
-
.
|
|
174
|
-
.
|
|
391
|
+
/* Settings */
|
|
392
|
+
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
|
|
393
|
+
.setting label { font-weight: 500; }
|
|
394
|
+
.row.device:hover { background: none; }
|
|
395
|
+
.row.device .avatar { color: var(--muted); }
|
|
396
|
+
.row.device .danger { align-self: center; padding: 0; height: auto; border: none; background: none; }
|
|
397
|
+
.row.device .danger:hover { text-decoration: underline; }
|
|
398
|
+
.setting .danger, .setting .danger:hover { padding: 0; height: auto; border: none; background: none; }
|
|
399
|
+
.setting .danger:hover { text-decoration: underline; }
|
|
175
400
|
|
|
176
401
|
/* States */
|
|
177
|
-
.centered { max-width: 360px; margin: 20vh auto 0; text-align: center; }
|
|
402
|
+
.centered { max-width: 360px; margin: 20vh auto 0; padding: 0 16px; text-align: center; }
|
|
178
403
|
.centered h1 { font-size: 1.75rem; }
|
|
179
|
-
.empty { color: var(--muted); font-family: var(--mono); font-size: .8rem; border-top: 1px solid var(--line); padding: 48px
|
|
404
|
+
.empty { color: var(--muted); font-family: var(--mono); font-size: .8rem; border-top: 1px solid var(--line); padding: 48px 16px; text-align: center; }
|
package/dist/ui/strings.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ export declare const S: {
|
|
|
4
4
|
readonly navDrafts: "Drafts";
|
|
5
5
|
readonly navInbox: "Inbox";
|
|
6
6
|
readonly navDevices: "Devices";
|
|
7
|
+
readonly navSettings: "Settings";
|
|
8
|
+
readonly mainNav: "Main";
|
|
9
|
+
readonly back: "Back";
|
|
10
|
+
readonly close: "Close";
|
|
7
11
|
readonly logout: "Log out";
|
|
8
12
|
readonly themeSystem: "System";
|
|
9
13
|
readonly themeLight: "Light";
|
|
@@ -21,7 +25,6 @@ export declare const S: {
|
|
|
21
25
|
readonly discard: "Discard";
|
|
22
26
|
readonly save: "Save";
|
|
23
27
|
readonly saveAndSend: "Save & Send";
|
|
24
|
-
readonly cancel: "Cancel";
|
|
25
28
|
readonly attach: "Attach";
|
|
26
29
|
readonly remove: "Remove";
|
|
27
30
|
readonly dropFiles: "Drop files to attach";
|
|
@@ -29,17 +32,21 @@ export declare const S: {
|
|
|
29
32
|
readonly sending: "Sending to";
|
|
30
33
|
readonly discarding: "Discarding draft";
|
|
31
34
|
readonly undo: "Undo";
|
|
32
|
-
readonly sentTo: "Sent to";
|
|
33
35
|
readonly discarded: "Draft discarded.";
|
|
34
36
|
readonly editedByHuman: "Edited by you";
|
|
35
|
-
readonly
|
|
37
|
+
readonly byAgent: "By agent";
|
|
38
|
+
readonly newMail: "New mail";
|
|
39
|
+
readonly saveDraft: "Save draft";
|
|
40
|
+
readonly reply: "Reply";
|
|
41
|
+
readonly replyAll: "Reply all";
|
|
42
|
+
readonly today: "Today";
|
|
43
|
+
readonly yesterday: "Yesterday";
|
|
36
44
|
readonly thisThread: "This thread";
|
|
37
45
|
readonly context: "Context";
|
|
38
46
|
readonly draft: "Draft";
|
|
39
47
|
readonly conflictTitle: "This draft changed while you were editing.";
|
|
40
|
-
readonly yourVersion: "Your version";
|
|
41
48
|
readonly currentVersion: "Current version";
|
|
42
|
-
readonly
|
|
49
|
+
readonly filterPending: "Pending";
|
|
43
50
|
readonly filterAll: "All";
|
|
44
51
|
readonly filterArchived: "Archived";
|
|
45
52
|
readonly allMailboxes: "All mailboxes";
|
|
@@ -49,7 +56,6 @@ export declare const S: {
|
|
|
49
56
|
readonly hasDraft: "draft";
|
|
50
57
|
readonly archive: "Archive";
|
|
51
58
|
readonly unarchive: "Move to inbox";
|
|
52
|
-
readonly status: "Status";
|
|
53
59
|
readonly devicesEmpty: "No signed-in devices.";
|
|
54
60
|
readonly thisDevice: "This device";
|
|
55
61
|
readonly revoke: "Revoke";
|
package/dist/ui/strings.js
CHANGED
|
@@ -4,6 +4,10 @@ export const S = {
|
|
|
4
4
|
navDrafts: "Drafts",
|
|
5
5
|
navInbox: "Inbox",
|
|
6
6
|
navDevices: "Devices",
|
|
7
|
+
navSettings: "Settings",
|
|
8
|
+
mainNav: "Main",
|
|
9
|
+
back: "Back",
|
|
10
|
+
close: "Close",
|
|
7
11
|
logout: "Log out",
|
|
8
12
|
themeSystem: "System",
|
|
9
13
|
themeLight: "Light",
|
|
@@ -21,7 +25,6 @@ export const S = {
|
|
|
21
25
|
discard: "Discard",
|
|
22
26
|
save: "Save",
|
|
23
27
|
saveAndSend: "Save & Send",
|
|
24
|
-
cancel: "Cancel",
|
|
25
28
|
attach: "Attach",
|
|
26
29
|
remove: "Remove",
|
|
27
30
|
dropFiles: "Drop files to attach",
|
|
@@ -29,17 +32,21 @@ export const S = {
|
|
|
29
32
|
sending: "Sending to",
|
|
30
33
|
discarding: "Discarding draft",
|
|
31
34
|
undo: "Undo",
|
|
32
|
-
sentTo: "Sent to",
|
|
33
35
|
discarded: "Draft discarded.",
|
|
34
36
|
editedByHuman: "Edited by you",
|
|
35
|
-
|
|
37
|
+
byAgent: "By agent",
|
|
38
|
+
newMail: "New mail",
|
|
39
|
+
saveDraft: "Save draft",
|
|
40
|
+
reply: "Reply",
|
|
41
|
+
replyAll: "Reply all",
|
|
42
|
+
today: "Today",
|
|
43
|
+
yesterday: "Yesterday",
|
|
36
44
|
thisThread: "This thread",
|
|
37
45
|
context: "Context",
|
|
38
46
|
draft: "Draft",
|
|
39
47
|
conflictTitle: "This draft changed while you were editing.",
|
|
40
|
-
yourVersion: "Your version",
|
|
41
48
|
currentVersion: "Current version",
|
|
42
|
-
|
|
49
|
+
filterPending: "Pending",
|
|
43
50
|
filterAll: "All",
|
|
44
51
|
filterArchived: "Archived",
|
|
45
52
|
allMailboxes: "All mailboxes",
|
|
@@ -49,7 +56,6 @@ export const S = {
|
|
|
49
56
|
hasDraft: "draft",
|
|
50
57
|
archive: "Archive",
|
|
51
58
|
unarchive: "Move to inbox",
|
|
52
|
-
status: "Status",
|
|
53
59
|
devicesEmpty: "No signed-in devices.",
|
|
54
60
|
thisDevice: "This device",
|
|
55
61
|
revoke: "Revoke",
|
package/dist/ui/views.d.ts
CHANGED
|
@@ -3,43 +3,78 @@ import type { MessageView } from "../core/mail.ts";
|
|
|
3
3
|
import type { Contact, Context, Message, Session, Thread } from "../types.ts";
|
|
4
4
|
export type View = HtmlEscapedString;
|
|
5
5
|
export type Theme = "system" | "light" | "dark";
|
|
6
|
-
export type Page = "drafts" | "inbox" | "devices" | null;
|
|
7
|
-
export
|
|
6
|
+
export type Page = "drafts" | "inbox" | "devices" | "settings" | null;
|
|
7
|
+
export interface Mailbox {
|
|
8
|
+
id: string;
|
|
9
|
+
address: string;
|
|
10
|
+
}
|
|
11
|
+
export interface LayoutOptions {
|
|
8
12
|
theme: Theme;
|
|
9
13
|
page: Page;
|
|
10
|
-
draftCount?: number;
|
|
11
14
|
signedIn: boolean;
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
draftCount?: number;
|
|
16
|
+
/** Mailboxes the session can send from; New mail shows only when there is one. */
|
|
17
|
+
senders?: Mailbox[];
|
|
18
|
+
/** Thread pages fill the screen on a phone, so the tab bar gives way to the reply box. */
|
|
19
|
+
fullScreen?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function layout(title: string, body: View, opts: LayoutOptions): View;
|
|
14
22
|
export declare function message(lines: string[]): View;
|
|
15
23
|
export declare function signIn(token: string, valid: boolean): View;
|
|
16
24
|
/** Image types a browser renders without running code; SVG is left out on purpose. */
|
|
17
25
|
export declare function isPreviewable(contentType: string): boolean;
|
|
18
|
-
|
|
26
|
+
/** A message in a thread: received ones on the left, ours on the right. */
|
|
27
|
+
export declare function messageBubble(m: MessageView, showSender: boolean): View;
|
|
19
28
|
export interface ContextView {
|
|
20
29
|
context: Context | null;
|
|
21
30
|
contacts: Contact[];
|
|
22
31
|
}
|
|
23
|
-
|
|
32
|
+
/** A draft for review, on our side of its thread. */
|
|
33
|
+
export declare function draftCard(d: Message): View;
|
|
24
34
|
export interface DraftForm {
|
|
25
35
|
to: string;
|
|
26
36
|
cc: string;
|
|
27
37
|
subject: string;
|
|
28
38
|
text: string;
|
|
29
39
|
}
|
|
40
|
+
/** The edit sheet's content; one draft is edited at a time. */
|
|
30
41
|
export declare function draftEditor(d: Message, form: DraftForm, conflict: Message | null): View;
|
|
42
|
+
/** A reply opened in the edit sheet from the reply box; the thread reloads when the sheet closes, to show the new draft. */
|
|
43
|
+
export declare function newReplyEditor(d: Message): View;
|
|
31
44
|
/** The editor's attachment list with remove buttons, and the picker that drag and drop also feeds. */
|
|
32
45
|
export declare function draftFiles(d: Message, error: string | null): View;
|
|
33
46
|
export declare function draftDone(id: string, text: string): View;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
ctx: ContextView;
|
|
38
|
-
}[]): View;
|
|
39
|
-
export declare function inboxPage(threads: Thread[], mailboxes: string[], filter: {
|
|
47
|
+
/** Drafts waiting for review, listed like the inbox; each opens its thread. */
|
|
48
|
+
export declare function draftList(drafts: Message[], current: string | null): View;
|
|
49
|
+
export interface InboxFilter {
|
|
40
50
|
mailbox: string;
|
|
41
51
|
status: string;
|
|
42
|
-
}
|
|
43
|
-
export declare function
|
|
52
|
+
}
|
|
53
|
+
export declare function inboxQuery(filter: InboxFilter): string;
|
|
54
|
+
/** The thread list; on a wide screen it stays beside the open thread. */
|
|
55
|
+
export declare function threadList(threads: Thread[], opts: {
|
|
56
|
+
mailboxes: string[];
|
|
57
|
+
domains: string[];
|
|
58
|
+
filter: InboxFilter;
|
|
59
|
+
own: Set<string>;
|
|
60
|
+
current: string | null;
|
|
61
|
+
}): View;
|
|
62
|
+
/** The thread list and the open thread side by side; a phone shows one of the two. */
|
|
63
|
+
export declare function inboxPage(list: View, thread: View | null): View;
|
|
64
|
+
export interface ThreadEntry {
|
|
65
|
+
at: string;
|
|
66
|
+
view: View;
|
|
67
|
+
}
|
|
68
|
+
/** The conversation, oldest first, with day separators, a reply box and the context panel. */
|
|
69
|
+
export declare function threadView(thread: Thread, entries: ThreadEntry[], ctx: ContextView, opts: {
|
|
70
|
+
back: string;
|
|
71
|
+
filter: InboxFilter;
|
|
72
|
+
own: Set<string>;
|
|
73
|
+
reply: {
|
|
74
|
+
allowed: boolean;
|
|
75
|
+
replyAll: boolean;
|
|
76
|
+
};
|
|
77
|
+
}): View;
|
|
44
78
|
export declare function archiveButton(thread: Thread): View;
|
|
45
79
|
export declare function devicesPage(sessions: Session[], currentId: string): View;
|
|
80
|
+
export declare function settingsPage(theme: Theme): View;
|