emailengine-app 2.80.0 → 2.81.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.
Files changed (178) hide show
  1. package/.dockerignore +44 -0
  2. package/.github/docker-smoke-test.sh +16 -0
  3. package/.github/workflows/deploy.yml +4 -0
  4. package/.github/workflows/release.yaml +4 -0
  5. package/.github/workflows/test.yml +2 -0
  6. package/.release-please-manifest.json +1 -1
  7. package/CHANGELOG.md +56 -0
  8. package/Dockerfile +17 -9
  9. package/README.md +6 -0
  10. package/data/google-crawlers.json +1 -1
  11. package/docker-compose.yml +7 -1
  12. package/lib/api-routes/account-routes.js +239 -73
  13. package/lib/api-routes/blocklist-routes.js +24 -0
  14. package/lib/api-routes/delivery-test-routes.js +6 -0
  15. package/lib/api-routes/gateway-routes.js +30 -0
  16. package/lib/api-routes/license-routes.js +10 -0
  17. package/lib/api-routes/mcp-oauth-routes.js +3 -3
  18. package/lib/api-routes/mcp-routes.js +39 -21
  19. package/lib/api-routes/oauth2-app-routes.js +38 -1
  20. package/lib/api-routes/outbox-routes.js +6 -0
  21. package/lib/api-routes/permission-map.js +212 -42
  22. package/lib/api-routes/pubsub-routes.js +8 -0
  23. package/lib/api-routes/route-helpers.js +58 -11
  24. package/lib/api-routes/settings-routes.js +50 -4
  25. package/lib/api-routes/stats-routes.js +6 -0
  26. package/lib/api-routes/template-routes.js +21 -0
  27. package/lib/api-routes/token-routes.js +34 -2
  28. package/lib/api-routes/webhook-route-routes.js +13 -0
  29. package/lib/autodetect-imap-settings.js +4 -4
  30. package/lib/email-client/base-client.js +6 -3
  31. package/lib/email-client/credential-errors.js +4 -0
  32. package/lib/email-client/imap/login-failure.js +52 -0
  33. package/lib/email-client/imap/subconnection.js +2 -1
  34. package/lib/email-client/imap-client.js +3 -6
  35. package/lib/enum-descriptions.js +12 -2
  36. package/lib/imapproxy/imap-server.js +1 -1
  37. package/lib/mcp/oauth.js +46 -8
  38. package/lib/mcp/protocol.js +78 -35
  39. package/lib/mcp/tools.js +53 -17
  40. package/lib/privileged-settings.js +147 -0
  41. package/lib/schemas.js +60 -16
  42. package/lib/sentry.js +13 -2
  43. package/lib/settings.js +13 -0
  44. package/lib/tls/catalog.js +428 -0
  45. package/lib/tls/context.js +87 -161
  46. package/lib/tls/listeners.js +62 -0
  47. package/lib/tls/provision.js +1 -1
  48. package/lib/tls/status.js +128 -79
  49. package/lib/tls/store.js +3 -2
  50. package/lib/token-permission-view.js +253 -102
  51. package/lib/token-permissions.js +176 -26
  52. package/lib/tokens.js +7 -6
  53. package/lib/tools.js +5 -3
  54. package/lib/ui-routes/account-routes.js +195 -61
  55. package/lib/ui-routes/admin-config-routes.js +41 -21
  56. package/lib/ui-routes/admin-entities-routes.js +32 -22
  57. package/lib/ui-routes/mcp-consent-routes.js +72 -31
  58. package/lib/ui-routes/tls-config-routes.js +121 -74
  59. package/package.json +16 -16
  60. package/sbom.json +1 -1
  61. package/server.js +7 -1
  62. package/static/css/flyonui.css +1 -1
  63. package/static/css/public.css +41 -0
  64. package/static/css/src/app.tailwind.css +135 -4
  65. package/static/js/public.js +218 -0
  66. package/static/js/ui.js +89 -36
  67. package/static/licenses.html +55 -37
  68. package/translations/README.md +4 -3
  69. package/translations/de.mo +0 -0
  70. package/translations/de.po +296 -185
  71. package/translations/en.po +220 -128
  72. package/translations/es.mo +0 -0
  73. package/translations/es.po +558 -0
  74. package/translations/et.mo +0 -0
  75. package/translations/et.po +288 -181
  76. package/translations/fr.mo +0 -0
  77. package/translations/fr.po +295 -183
  78. package/translations/it.mo +0 -0
  79. package/translations/it.po +558 -0
  80. package/translations/ja.mo +0 -0
  81. package/translations/ja.po +268 -192
  82. package/translations/locales.json +24 -0
  83. package/translations/messages.pot +179 -127
  84. package/translations/nl.mo +0 -0
  85. package/translations/nl.po +288 -175
  86. package/translations/pl.mo +0 -0
  87. package/translations/pl.po +294 -181
  88. package/translations/sv.mo +0 -0
  89. package/translations/sv.po +555 -0
  90. package/translations/tr.mo +0 -0
  91. package/translations/tr.po +555 -0
  92. package/update-info.sh +12 -6
  93. package/views/account/login-redirect.hbs +6 -5
  94. package/views/account/passkeys.hbs +8 -8
  95. package/views/account/security.hbs +2 -2
  96. package/views/accounts/account.hbs +19 -21
  97. package/views/accounts/browse.hbs +1 -1
  98. package/views/accounts/edit.hbs +15 -15
  99. package/views/accounts/index.hbs +3 -3
  100. package/views/accounts/register/imap-server.hbs +27 -173
  101. package/views/accounts/register/validating.hbs +139 -0
  102. package/views/config/ai.hbs +15 -17
  103. package/views/config/branding.hbs +7 -7
  104. package/views/config/document-store/chat.hbs +9 -8
  105. package/views/config/document-store/index.hbs +14 -15
  106. package/views/config/document-store/mappings/index.hbs +5 -6
  107. package/views/config/document-store/mappings/new.hbs +1 -2
  108. package/views/config/document-store/pre-processing/index.hbs +4 -4
  109. package/views/config/email-processing.hbs +6 -6
  110. package/views/config/imap-proxy.hbs +7 -8
  111. package/views/config/license.hbs +9 -9
  112. package/views/config/logging.hbs +5 -7
  113. package/views/config/mcp.hbs +90 -58
  114. package/views/config/network.hbs +4 -4
  115. package/views/config/oauth/app.hbs +12 -12
  116. package/views/config/oauth/index.hbs +6 -6
  117. package/views/config/oauth/subscriptions.hbs +9 -9
  118. package/views/config/security.hbs +5 -7
  119. package/views/config/service.hbs +11 -10
  120. package/views/config/smtp.hbs +9 -12
  121. package/views/config/tls-upload.hbs +3 -3
  122. package/views/config/tls.hbs +281 -182
  123. package/views/config/webhooks.hbs +12 -15
  124. package/views/dashboard.hbs +9 -8
  125. package/views/gateways/edit.hbs +3 -3
  126. package/views/gateways/gateway.hbs +3 -3
  127. package/views/gateways/index.hbs +6 -6
  128. package/views/gateways/new.hbs +3 -3
  129. package/views/internals/index.hbs +15 -13
  130. package/views/layout/app.hbs +6 -6
  131. package/views/layout/login.hbs +32 -19
  132. package/views/layout/main.hbs +2 -2
  133. package/views/layout/prompt.hbs +15 -18
  134. package/views/layout/public.hbs +1 -1
  135. package/views/mcp/authorize.hbs +47 -45
  136. package/views/partials/accounts_table.hbs +5 -5
  137. package/views/partials/ace_assets.hbs +1 -1
  138. package/views/partials/add_account_modal.hbs +4 -4
  139. package/views/partials/address_list.hbs +4 -4
  140. package/views/partials/filter_editor_js.hbs +2 -2
  141. package/views/partials/gateway_form.hbs +5 -5
  142. package/views/partials/gateway_js.hbs +1 -1
  143. package/views/partials/mcp_access_levels.hbs +16 -9
  144. package/views/partials/mcp_account_limit.hbs +2 -2
  145. package/views/partials/mcp_tool_count.hbs +15 -14
  146. package/views/partials/oauth_config_header.hbs +2 -2
  147. package/views/partials/oauth_form.hbs +37 -42
  148. package/views/partials/public_alerts.hbs +1 -1
  149. package/views/partials/public_test_labels.hbs +15 -0
  150. package/views/partials/public_theme_init.hbs +1 -1
  151. package/views/partials/security_header.hbs +2 -2
  152. package/views/partials/template_form.hbs +4 -4
  153. package/views/partials/theme_init.hbs +1 -1
  154. package/views/partials/tls_security_card.hbs +4 -1
  155. package/views/partials/ui/form-field.hbs +6 -1
  156. package/views/partials/ui/setting-ref.hbs +12 -7
  157. package/views/partials/ui/stat-card.hbs +4 -1
  158. package/views/partials/ui/tabs.hbs +3 -7
  159. package/views/partials/webhook_form.hbs +9 -12
  160. package/views/partials/webhooks_editor_functions.hbs +1 -1
  161. package/views/reference/index.hbs +3 -3
  162. package/views/reference/redirect.hbs +1 -1
  163. package/views/reference/tag.hbs +1 -1
  164. package/views/reference/token.hbs +4 -4
  165. package/views/suppression-lists/index.hbs +8 -6
  166. package/views/suppression-lists/list.hbs +13 -8
  167. package/views/templates/edit.hbs +1 -1
  168. package/views/templates/index.hbs +10 -11
  169. package/views/templates/template.hbs +5 -5
  170. package/views/tokens/index.hbs +17 -17
  171. package/views/tokens/new.hbs +190 -93
  172. package/views/unsubscribe.hbs +1 -1
  173. package/views/webhooks/edit.hbs +1 -1
  174. package/views/webhooks/index.hbs +10 -11
  175. package/views/webhooks/new.hbs +1 -1
  176. package/views/webhooks/webhook.hbs +5 -6
  177. package/workers/api.js +9 -8
  178. package/workers/smtp.js +1 -1
@@ -1,11 +1,11 @@
1
- {{#> ui/page-header title="Suppression Lists" icon="icon-[tabler--mail-off]" subtitle="Recipients excluded from list-based sending. Only messages submitted with a listId are checked against these lists - the send skips every listed address. Messages without a listId are not affected." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
1
+ {{#> ui/page-header title="Suppression Lists" icon="icon-[tabler--mail-off]" subtitle="Manage recipients excluded from emails sent with a matching listId. Messages sent without a listId are not checked." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
2
2
  {{> ui/btn label="Add address" icon="icon-[tabler--plus]" overlay="#addAddressModal"}}
3
3
  {{/ui/page-header}}
4
4
 
5
5
  {{#if suppressionLists}}
6
6
  <div class="card bg-base-100 shadow-md mb-6">
7
7
  <div class="overflow-x-auto">
8
- <table class="table">
8
+ <table class="table ee-table-stack">
9
9
  <thead>
10
10
  <tr>
11
11
  <th>List ID</th>
@@ -22,11 +22,11 @@
22
22
  <strong>{{listId}}</strong>
23
23
  </td>
24
24
 
25
- <td class="relative">
25
+ <td class="relative" data-label="Addresses">
26
26
  {{> ui/row-link href=(concat "/admin/suppression-lists/list/" listId)}}{{count}}
27
27
  </td>
28
28
 
29
- <td class="relative text-end">
29
+ <td class="ee-stack-actions relative text-end">
30
30
  {{> ui/row-actions openHref=(concat "/admin/suppression-lists/list/" listId) label="Suppression list actions"
31
31
  deleteModal="#deleteList" deleteId=listId deleteName=listId}}
32
32
  </td>
@@ -71,7 +71,7 @@
71
71
  <form method="post" action="/admin/suppression-lists/add">
72
72
  <input type="hidden" name="crumb" value="{{crumb}}">
73
73
  <div class="modal-body space-y-4">
74
- {{> ui/form-field id="add-list-id" name="listId" label="List ID" required=true placeholder="e.g. newsletter" hint="Subdomain name format. An unknown ID registers a new list."}}
74
+ {{> ui/form-field id="add-list-id" name="listId" label="List ID" required=true placeholder="e.g. newsletter" hint="Use subdomain format, such as newsletter. A new ID creates a list."}}
75
75
  {{> ui/form-field id="add-recipient" name="recipient" label="Email address" type="email" required=true placeholder="user@example.com"}}
76
76
  {{> ui/form-field id="add-reason" name="reason" label="Reason" placeholder="block" hint="Optional identifier stored with the entry (default: block)."}}
77
77
  </div>
@@ -82,4 +82,6 @@
82
82
  </form>
83
83
  {{/ui/modal}}
84
84
 
85
- {{> ui/delete-modal id="deleteList" noun="suppression list" action="/admin/suppression-lists/delete" fieldName="listId"}}
85
+ {{#> ui/delete-modal id="deleteList" noun="suppression list" action="/admin/suppression-lists/delete" fieldName="listId"}}
86
+ Delete <strong class="delete-target-name"></strong> and all its entries? These addresses will no longer be excluded from emails sent with this list ID. This action cannot be undone.
87
+ {{/ui/delete-modal}}
@@ -11,7 +11,7 @@
11
11
  <h6 class="mb-6 text-base-content/60">{{total}} suppressed {{#equals total 1}}address{{else}}addresses{{/equals}}</h6>
12
12
 
13
13
  <div class="overflow-x-auto">
14
- <table class="table">
14
+ <table class="table ee-table-stack">
15
15
  <thead>
16
16
  <tr>
17
17
  <th>Address</th>
@@ -27,17 +27,20 @@
27
27
  {{#each addresses}}
28
28
  <tr class="hover:bg-base-200/60">
29
29
  <td><strong>{{recipient}}</strong></td>
30
- <td>{{reason}}</td>
31
- <td>{{source}}</td>
32
- <td>
30
+ <td data-label="Reason">{{reason}}</td>
31
+ <td data-label="Source">{{source}}</td>
32
+ <td data-label="Account">
33
33
  {{#if account}}
34
34
  <a href="/admin/accounts/{{urlpart account}}" class="link link-primary">{{account}}</a>
35
35
  {{else}}
36
36
  <span class="text-base-content/60">-</span>
37
37
  {{/if}}
38
38
  </td>
39
- <td><span class="text-base-content/60">{{created}}</span></td>
40
- <td class="relative text-end">
39
+ <td data-label="Added">
40
+ {{!-- every other list renders its stamps through app.js; this one printed the raw ISO string --}}
41
+ <span class="text-base-content/60 relative-time" data-time="{{created}}">{{created}}</span>
42
+ </td>
43
+ <td class="ee-stack-actions relative text-end">
41
44
  {{!-- The condition sits OUTSIDE the ui/row-actions block on purpose: a partial
42
45
  block whose content is nothing but a {{#if}} wrapper loses its content to a
43
46
  Handlebars program-association bug (the menu rendered without the items).
@@ -80,8 +83,10 @@
80
83
  </form>
81
84
  {{/ui/modal}}
82
85
 
83
- {{> ui/delete-modal id="deleteEntry" noun="address" action=(concat "/admin/suppression-lists/list/" listId "/remove") fieldName="recipient"}}
86
+ {{#> ui/delete-modal id="deleteEntry" noun="address" action=(concat "/admin/suppression-lists/list/" listId "/remove") fieldName="recipient"}}
87
+ Remove <strong class="delete-target-name"></strong> from this suppression list? This address will be eligible to receive emails sent with this list ID again.
88
+ {{/ui/delete-modal}}
84
89
 
85
90
  {{#> ui/confirm-modal id="deleteListModal" title="Delete suppression list" action="/admin/suppression-lists/delete" fieldName="listId" fieldValue=listId submitLabel="Delete list"}}
86
- Are you sure you want to delete <strong>{{listId}}</strong> with all of its addresses? Everyone on this list becomes reachable again. This action cannot be undone.
91
+ Delete <strong>{{listId}}</strong> and all its entries? These addresses will no longer be excluded from emails sent with this list ID. This action cannot be undone.
87
92
  {{/ui/confirm-modal}}
@@ -13,6 +13,6 @@ class="mt-6 mb-6"}}
13
13
  {{>template_form}}
14
14
 
15
15
  <div class="mb-6">
16
- {{> ui/btn label="Update template" type="submit" icon="icon-[tabler--device-floppy]"}}
16
+ {{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--device-floppy]"}}
17
17
  </div>
18
18
  </form>
@@ -1,4 +1,4 @@
1
- {{#> ui/page-header title="Templates" icon="icon-[tabler--template]" subtitle="Reusable subject and body content you can reference by ID when sending." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
1
+ {{#> ui/page-header title="Templates" icon="icon-[tabler--template]" subtitle="Create reusable email content and send it by referencing a template ID." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
2
2
  {{> ui/btn href=newLink label="Create template" icon="icon-[tabler--plus]"}}
3
3
  {{/ui/page-header}}
4
4
 
@@ -13,7 +13,7 @@
13
13
  {{#if account}}
14
14
  <div class="card-body">
15
15
  <div>
16
- Currently showing email templates for <strong><a href="/admin/accounts/{{urlpart account.account}}"
16
+ Showing templates for <strong><a href="/admin/accounts/{{urlpart account.account}}"
17
17
  class="link link-animated">{{account.name}}</a></strong>. These templates cannot be
18
18
  used by other accounts.
19
19
  </div>
@@ -21,7 +21,7 @@
21
21
  {{/if}}
22
22
 
23
23
  <div class="overflow-x-auto">
24
- <table class="table">
24
+ <table class="table ee-table-stack">
25
25
  <thead>
26
26
  <tr>
27
27
  <th>Name</th>
@@ -39,11 +39,11 @@
39
39
  <div><strong>{{name}}</strong></div>
40
40
  {{> ui/entity-id id=id label="Template ID"}}
41
41
  </td>
42
- <td class="relative">
42
+ <td class="relative" data-label="Description">
43
43
  {{> ui/row-link href=(concat "/admin/templates/template/" id)}}{{description}}
44
44
  </td>
45
45
 
46
- <td class="relative text-end">
46
+ <td class="ee-stack-actions relative text-end">
47
47
  {{> ui/row-actions openHref=(concat "/admin/templates/template/" id) label="Template actions"
48
48
  deleteModal="#deleteTemplate" deleteId=id deleteName=name}}
49
49
  </td>
@@ -64,7 +64,7 @@
64
64
  {{#if account}}
65
65
  {{#> ui/list-empty noun="templates" query=query firstPage=firstPage createHref=newLink createLabel="Create your first template" clearHref="/admin/templates"}}
66
66
  <div class="mb-2">
67
- Currently showing email templates for <strong><a href="/admin/accounts/{{urlpart account.account}}"
67
+ Showing templates for <strong><a href="/admin/accounts/{{urlpart account.account}}"
68
68
  class="link link-animated">{{#if account.name}}{{account.name}}{{else}}{{account.email}}{{/if}}</a></strong>.
69
69
  These templates cannot be used by other accounts.
70
70
  </div>
@@ -78,10 +78,9 @@
78
78
 
79
79
  {{#> ui/details summary="Usage example" class="card bg-base-100 shadow-md mb-6"}}
80
80
  <div>
81
- <p class="mb-4">When sending emails using the submission API endpoint, do not set <code>"subject"</code>,
82
- <code>"html"</code> and <code>"text"</code> properties. Instead, set the <code>"template"</code>
83
- property with the template ID value and, optionally, <code>"render"</code> definition if you are using
84
- Markdown format as the HTML source or you want to use the Handlebars variables.
81
+ <p class="mb-4">To send a template, set <code>"template"</code> to its ID in the submission API request.
82
+ Omit <code>"subject"</code>, <code>"html"</code>, and <code>"text"</code> so the template supplies them.
83
+ Include <code>"render"</code> to use Handlebars variables or render Markdown as HTML.
85
84
  </p>
86
85
 
87
86
  <pre class="ee-code-block">$ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/account/example/submit" \
@@ -108,7 +107,7 @@
108
107
 
109
108
  <hr class="my-4">
110
109
  <div class="text-base-content/60">
111
- <p>This example assumes that you use <code>\{{params.key}}</code> in the subject, html or plain-text
110
+ <p>This example assumes that you use <code>\{{params.key}}</code> in the subject, HTML, or plain text
112
111
  content of the template.</p>
113
112
  </div>
114
113
 
@@ -31,7 +31,7 @@
31
31
  <dd>
32
32
  {{> ui/copy-field id="templateIdValue" value=template.id ariaLabel="ID" small=true join=true class="max-w-md"
33
33
  inputClass="font-mono bg-base-200 border-0"}}
34
- <span class="helper-text">Use this ID value as the <em>"template"</em>
34
+ <span class="helper-text">Use this ID as the <em>"template"</em>
35
35
  property when sending email.</span>
36
36
  </dd>
37
37
 
@@ -83,7 +83,7 @@
83
83
 
84
84
  {{/ui/card}}
85
85
 
86
- {{#> ui/confirm-modal id="deleteModal" title="Delete Template" action="/admin/templates/delete"
86
+ {{#> ui/confirm-modal id="deleteModal" title="Delete template" action="/admin/templates/delete"
87
87
  fieldName="template" fieldValue=template.id submitLabel="Delete template"}}
88
88
  <p>Are you sure you want to delete <strong>{{template.name}}</strong>? This action cannot be undone.</p>
89
89
  {{/ui/confirm-modal}}
@@ -97,10 +97,10 @@ fieldName="template" fieldValue=template.id submitLabel="Delete template"}}
97
97
  <div class="modal-body space-y-4">
98
98
 
99
99
  {{#unless account}}
100
- {{> ui/account-picker id="inputAccount" name="account" label="Account" hint="The account to send the test email as."}}
100
+ {{> ui/account-picker id="inputAccount" name="account" label="Account" hint="Account used to send the test email."}}
101
101
  {{/unless}}
102
102
 
103
- {{> ui/form-field id="inputTo" name="inputTo" type="email" label="Recipient's email address" required=true hint="Where to send the test email to."}}
103
+ {{> ui/form-field id="inputTo" name="inputTo" type="email" label="Recipient's email address" required=true hint="Email address that will receive the test message."}}
104
104
 
105
105
  {{#> ui/details id="jsonStructure" summary="Handlebars payload" class="card border border-base-content/10" summaryClass="px-4 py-2"}}
106
106
  <div>
@@ -131,7 +131,7 @@ fieldName="template" fieldValue=template.id submitLabel="Delete template"}}
131
131
  {{/ui/modal}}
132
132
 
133
133
  {{> ace_assets}}
134
- <script nonce="{{cspNonce}}">
134
+ <script data-cfasync="false" nonce="{{cspNonce}}">
135
135
  document.addEventListener('DOMContentLoaded', () => {
136
136
 
137
137
  function showAlert(title, content) {
@@ -1,4 +1,4 @@
1
- {{#> ui/page-header title="Access Tokens" icon="icon-[tabler--key]" subtitle="Bearer tokens that authenticate requests to the EmailEngine API." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
1
+ {{#> ui/page-header title="Access Tokens" icon="icon-[tabler--key]" subtitle="Manage credentials for the API, SMTP server, IMAP proxy, metrics, and MCP clients." badgeLabel=total badgeVariant="neutral" class="mb-6"}}
2
2
  {{!-- Without an admin session the create form cannot submit, so the button would be an invitation
3
3
  to lose the work. Disabled with the reason rather than hidden: the capability exists, it is the
4
4
  instance that is not ready for it. --}}
@@ -24,14 +24,14 @@
24
24
  {{#if account}}
25
25
  <div class="card-body">
26
26
  <div>
27
- Currently showing tokens for <strong><a href="/admin/accounts/{{urlpart account.account}}"
27
+ Showing tokens for <strong><a href="/admin/accounts/{{urlpart account.account}}"
28
28
  class="link link-animated">{{account.name}}</a></strong>. These tokens cannot be
29
29
  used by other accounts.
30
30
  </div>
31
31
  </div>
32
32
  {{/if}}
33
33
  <div class="overflow-x-auto">
34
- <table class="table">
34
+ <table class="table ee-table-stack">
35
35
  <thead>
36
36
  <tr>
37
37
  <th>Description</th>
@@ -61,7 +61,7 @@
61
61
  </td>
62
62
 
63
63
  {{#if ../showAccountColumn}}
64
- <td class="align-top">
64
+ <td class="align-top" data-label="Bound to">
65
65
  {{#if account}}
66
66
  {{#if accountKnown}}
67
67
  <a href="/admin/accounts/{{urlpart account}}" class="link link-animated">{{account}}</a>
@@ -77,7 +77,7 @@
77
77
  </td>
78
78
  {{/if}}
79
79
 
80
- <td class="align-top">
80
+ <td class="align-top" data-label="Scopes">
81
81
  {{#if scopes}}
82
82
  <div class="max-w-xs whitespace-normal">{{#each scopes}}{{#unless first}}, {{/unless}}{{name}}{{/each}}</div>
83
83
  {{/if}}
@@ -85,7 +85,7 @@
85
85
  {{#if permissionSummary}}
86
86
  {{#if permissionSummary.unreadable}}
87
87
  {{> ui/badge label="Unreadable restriction" variant="error" soft=true icon="" class="mt-1"}}
88
- <div class="text-base-content/60 text-xs">Every request with this token is refused. Delete and reissue it.</div>
88
+ <div class="text-base-content/60 text-xs">This token cannot be used because its permissions could not be read. Delete it and create a replacement.</div>
89
89
  {{else}}
90
90
  {{> ui/badge label="Restricted" variant="info" soft=true icon="" class="mt-1"}}
91
91
  {{!-- Wraps and is width-capped: a token granted several sections produced one
@@ -95,7 +95,7 @@
95
95
  {{/if}}
96
96
  </td>
97
97
 
98
- <td>
98
+ <td data-label="Last used">
99
99
  {{#if access.timeStr}}
100
100
  <span class="relative-time" data-time="{{access.timeStr}}"></span>
101
101
  {{else}}
@@ -103,7 +103,7 @@
103
103
  {{/if}}
104
104
  </td>
105
105
 
106
- <td class="text-end">
106
+ <td class="ee-stack-actions text-end">
107
107
  {{> ui/row-actions label="Token actions" deleteModal="#deleteToken" deleteId=id deleteName=description}}
108
108
  </td>
109
109
 
@@ -124,7 +124,7 @@
124
124
  {{#if account}}
125
125
  {{#> ui/list-empty noun="access tokens" query=query filterActive=scopeFilter firstPage=firstPage createHref=newLink createLabel="Create your first access token" clearHref="/admin/tokens"}}
126
126
  <div class="mb-2">
127
- Currently showing tokens for <strong><a href="/admin/accounts/{{urlpart account.account}}"
127
+ Showing tokens for <strong><a href="/admin/accounts/{{urlpart account.account}}"
128
128
  class="link link-animated">{{#if account.name}}{{account.name}}{{else}}{{account.email}}{{/if}}</a></strong>.
129
129
  These tokens cannot be used by other accounts.
130
130
  </div>
@@ -137,16 +137,14 @@
137
137
 
138
138
  {{#> ui/details summary="Usage instructions" class="card bg-base-100 shadow-md mb-6"}}
139
139
  <div>
140
- <p class="mb-4">You must use either the <em>Authorization: Bearer</em> header (recommended) or the
141
- <em>access_token</em> query parameter to make API requests. Avoid using the query parameter as it is
142
- not redacted from HTTP logs.
140
+ <p class="mb-4">Send an API-scoped token in the <code>Authorization: Bearer</code> header.
141
+ The <code>access_token</code> query parameter is also supported, but can expose the token in URL logs.
143
142
  </p>
144
143
 
145
- <pre class="ee-code-block">$ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/stats?access_token=&lt;token&gt;"
146
- $ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/stats" --header "Authorization: Bearer &lt;token&gt;"</pre>
144
+ <pre class="ee-code-block">$ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/stats" --header "Authorization: Bearer &lt;token&gt;"</pre>
147
145
 
148
- <p class="mt-4 mb-4">Prometheus endpoint at <code>/metrics</code> also requires an authorization
149
- token. Use the following configuration for setting up the token for a scraping endpoint:
146
+ <p class="mt-4 mb-4">To collect Prometheus metrics from <code>/metrics</code>, use a token with the Metrics scope
147
+ in your scrape configuration:
150
148
  </p>
151
149
 
152
150
  <pre class="ee-code-block">authorization:
@@ -166,4 +164,6 @@ $ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v
166
164
  </div>
167
165
  {{/ui/details}}
168
166
 
169
- {{> ui/delete-modal id="deleteToken" noun="access token" action="/admin/tokens/delete" fieldName="token"}}
167
+ {{#> ui/delete-modal id="deleteToken" noun="access token" action="/admin/tokens/delete" fieldName="token"}}
168
+ Delete <strong class="delete-target-name"></strong>? Apps and clients using this token will lose access immediately. This action cannot be undone.
169
+ {{/ui/delete-modal}}