inboxer 0.4.10 → 0.4.12

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 CHANGED
@@ -80,7 +80,7 @@ export function registerUi(app, mail, access, cfg) {
80
80
  if (!value || !session) {
81
81
  if (value)
82
82
  deleteCookie(c, SESSION_COOKIE, { path: "/" });
83
- return page(c, S.appName, V.message([S.notSignedIn]), null, 401);
83
+ return page(c, S.appName, V.message([S.notSignedIn, S.askForLink]), null, 401);
84
84
  }
85
85
  await setSignedCookie(c, SESSION_COOKIE, value, secret, cookieOptions);
86
86
  c.set("session", session);
@@ -33,6 +33,16 @@ document.addEventListener("keydown", event => {
33
33
  if (event.key === "Escape") document.body.classList.remove("context-open");
34
34
  });
35
35
 
36
+ // Cmd+Enter (Ctrl+Enter off a Mac) in a message box presses its form's send button.
37
+ document.addEventListener("keydown", event => {
38
+ if (event.key !== "Enter" || !(event.metaKey || event.ctrlKey) || !(event.target instanceof HTMLTextAreaElement)) return;
39
+ // A click, so htmx posts the button's own name and value along with the form.
40
+ const send = event.target.form?.querySelector("button[type=submit].primary");
41
+ if (!send) return;
42
+ event.preventDefault();
43
+ send.click();
44
+ });
45
+
36
46
  // Links and forms load the next page with htmx and swap only the body, so scripts and styles stay loaded.
37
47
  // The body's classes come from the new page, and an error page shows instead of nothing.
38
48
  // Back and forward reload the page (see htmx-config), so a page is never restored with stale mail.
@@ -407,3 +407,8 @@ textarea {
407
407
  .centered { max-width: 360px; margin: 20vh auto 0; padding: 0 16px; text-align: center; }
408
408
  .centered h1 { font-size: 1.75rem; }
409
409
  .empty { color: var(--muted); font-family: var(--mono); font-size: .8rem; border-top: 1px solid var(--line); padding: 48px 16px; text-align: center; }
410
+
411
+ /* iOS zooms into a focused field whose text is under 16px, which pushes the page past the screen edges. */
412
+ @media (pointer: coarse) {
413
+ :root :is(input, select, textarea) { font-size: 16px; }
414
+ }
@@ -67,7 +67,8 @@ export declare const S: {
67
67
  readonly signInTitle: "Sign in on this device";
68
68
  readonly signInButton: "Sign in";
69
69
  readonly linkUsed: "This link was already used or expired.";
70
- readonly notSignedIn: "You are not signed in. Ask your agent for a login link.";
70
+ readonly notSignedIn: "You are not signed in.";
71
+ readonly askForLink: "Ask your agent for a login link.";
71
72
  readonly signedOut: "You are signed out.";
72
73
  readonly notFound: "Not found.";
73
74
  readonly error: "Something went wrong.";
@@ -67,7 +67,8 @@ export const S = {
67
67
  signInTitle: "Sign in on this device",
68
68
  signInButton: "Sign in",
69
69
  linkUsed: "This link was already used or expired.",
70
- notSignedIn: "You are not signed in. Ask your agent for a login link.",
70
+ notSignedIn: "You are not signed in.",
71
+ askForLink: "Ask your agent for a login link.",
71
72
  signedOut: "You are signed out.",
72
73
  notFound: "Not found.",
73
74
  error: "Something went wrong.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inboxer",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "A self-hosted mail layer for agents: persists every inbound and outbound email, exposes an MCP server, and ships a minimal UI to review drafts.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/ui/routes.ts CHANGED
@@ -92,7 +92,7 @@ export function registerUi(app: Hono<UiEnv>, mail: Mail, access: Access, cfg: In
92
92
  const session = value ? await access.authenticate(value) : null;
93
93
  if (!value || !session) {
94
94
  if (value) deleteCookie(c, SESSION_COOKIE, { path: "/" });
95
- return page(c, S.appName, V.message([S.notSignedIn]), null, 401);
95
+ return page(c, S.appName, V.message([S.notSignedIn, S.askForLink]), null, 401);
96
96
  }
97
97
  await setSignedCookie(c, SESSION_COOKIE, value, secret, cookieOptions);
98
98
  c.set("session", session);
@@ -33,6 +33,16 @@ document.addEventListener("keydown", event => {
33
33
  if (event.key === "Escape") document.body.classList.remove("context-open");
34
34
  });
35
35
 
36
+ // Cmd+Enter (Ctrl+Enter off a Mac) in a message box presses its form's send button.
37
+ document.addEventListener("keydown", event => {
38
+ if (event.key !== "Enter" || !(event.metaKey || event.ctrlKey) || !(event.target instanceof HTMLTextAreaElement)) return;
39
+ // A click, so htmx posts the button's own name and value along with the form.
40
+ const send = event.target.form?.querySelector("button[type=submit].primary");
41
+ if (!send) return;
42
+ event.preventDefault();
43
+ send.click();
44
+ });
45
+
36
46
  // Links and forms load the next page with htmx and swap only the body, so scripts and styles stay loaded.
37
47
  // The body's classes come from the new page, and an error page shows instead of nothing.
38
48
  // Back and forward reload the page (see htmx-config), so a page is never restored with stale mail.
@@ -407,3 +407,8 @@ textarea {
407
407
  .centered { max-width: 360px; margin: 20vh auto 0; padding: 0 16px; text-align: center; }
408
408
  .centered h1 { font-size: 1.75rem; }
409
409
  .empty { color: var(--muted); font-family: var(--mono); font-size: .8rem; border-top: 1px solid var(--line); padding: 48px 16px; text-align: center; }
410
+
411
+ /* iOS zooms into a focused field whose text is under 16px, which pushes the page past the screen edges. */
412
+ @media (pointer: coarse) {
413
+ :root :is(input, select, textarea) { font-size: 16px; }
414
+ }
package/src/ui/strings.ts CHANGED
@@ -73,7 +73,8 @@ export const S = {
73
73
  signInTitle: "Sign in on this device",
74
74
  signInButton: "Sign in",
75
75
  linkUsed: "This link was already used or expired.",
76
- notSignedIn: "You are not signed in. Ask your agent for a login link.",
76
+ notSignedIn: "You are not signed in.",
77
+ askForLink: "Ask your agent for a login link.",
77
78
  signedOut: "You are signed out.",
78
79
  notFound: "Not found.",
79
80
  error: "Something went wrong.",