diff --git a/cmd/fake-smtp/public/src/controllers/inbox_entry_controller.js b/cmd/fake-smtp/public/src/controllers/inbox_entry_controller.js new file mode 100644 index 0000000..d134315 --- /dev/null +++ b/cmd/fake-smtp/public/src/controllers/inbox_entry_controller.js @@ -0,0 +1,7 @@ +import { Controller } from "stimulus" + +export default class extends Controller { + onClick() { + window.location = this.data.get('link'); + } +} \ No newline at end of file diff --git a/cmd/fake-smtp/public/src/scss/main.scss b/cmd/fake-smtp/public/src/scss/main.scss index bc5778a..3116677 100644 --- a/cmd/fake-smtp/public/src/scss/main.scss +++ b/cmd/fake-smtp/public/src/scss/main.scss @@ -1,6 +1,12 @@ .inbox { table-layout: fixed; + tbody { + tr { + cursor: pointer; + } + } + td { overflow: hidden; text-overflow: ellipsis; diff --git a/cmd/fake-smtp/template/layouts/inbox.html.tmpl b/cmd/fake-smtp/template/layouts/inbox.html.tmpl index 9bb6bd2..4e4a3e9 100644 --- a/cmd/fake-smtp/template/layouts/inbox.html.tmpl +++ b/cmd/fake-smtp/template/layouts/inbox.html.tmpl @@ -25,7 +25,9 @@ {{range .Emails}} - +
{{ .Subject }}
{{range .From}} diff --git a/package-lock.json b/package-lock.json index 7f22090..ba61645 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2926,7 +2926,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2947,12 +2948,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2967,17 +2970,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3094,7 +3100,8 @@ "inherits": { "version": "2.0.4", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3106,6 +3113,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3120,6 +3128,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3127,12 +3136,14 @@ "minimist": { "version": "1.2.5", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.9.0", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3151,6 +3162,7 @@ "version": "0.5.3", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "^1.2.5" } @@ -3212,7 +3224,8 @@ "npm-normalize-package-bin": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "npm-packlist": { "version": "1.4.8", @@ -3240,7 +3253,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3252,6 +3266,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3329,7 +3344,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3365,6 +3381,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3384,6 +3401,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3427,12 +3445,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true } } },