imapkit 5.3.0 → 5.3.1
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/browser/imapkit.js +16 -14
- package/dist/cjs/oauth/pages.js +12 -5
- package/dist/esm/oauth/pages.js +12 -5
- package/package.json +1 -1
package/dist/cjs/oauth/pages.js
CHANGED
|
@@ -46,7 +46,8 @@ ul.scopes{list-style:none;padding:0;margin:0 0 12px;border:1px solid var(--line)
|
|
|
46
46
|
ul.scopes li{display:flex;gap:10px;padding:8px 12px;border-top:1px solid var(--line);align-items:baseline}
|
|
47
47
|
ul.scopes li:first-child{border-top:0}
|
|
48
48
|
.ck{color:var(--ok);font-weight:700}
|
|
49
|
-
.
|
|
49
|
+
ul.scopes li>span:nth-child(2){flex:1;min-width:0}
|
|
50
|
+
.raw{margin-left:auto;font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:var(--muted);text-align:right;white-space:nowrap}
|
|
50
51
|
.redir{font-size:13px;color:var(--muted);margin:0 0 16px;overflow-wrap:anywhere}
|
|
51
52
|
.btns{display:flex;flex-direction:row-reverse;gap:10px;margin:0 0 12px}
|
|
52
53
|
button{flex:1;font:inherit;font-weight:600;padding:10px 14px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--text);cursor:pointer;text-align:center;text-decoration:none}
|
|
@@ -70,6 +71,7 @@ table{width:100%;border-collapse:collapse;font-size:13.5px;margin:0 0 6px}
|
|
|
70
71
|
th,td{text-align:left;padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top}
|
|
71
72
|
th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
|
|
72
73
|
footer{border-top:1px solid var(--line);padding:12px 26px;font-size:12.5px;color:var(--muted)}
|
|
74
|
+
footer a{color:var(--accent)}
|
|
73
75
|
@media (max-width:480px){body{padding:0}main{border-radius:0;border-left:0;border-right:0}.body{padding:20px 16px}footer{padding:12px 16px}}
|
|
74
76
|
`;
|
|
75
77
|
const AVATAR_COLORS = ['#7c5cf6', '#0e9f6e', '#d9480f', '#1c7ed6', '#c2255c', '#5c7cfa', '#2b8a3e'];
|
|
@@ -146,7 +148,8 @@ function consentPage(data) {
|
|
|
146
148
|
checks.push({ level: 'note', text: 'ignored parameters: ' + request.ignored.join(', ') });
|
|
147
149
|
}
|
|
148
150
|
const passed = checks.filter(check => check.level === 'ok').length;
|
|
149
|
-
const
|
|
151
|
+
const warnings = checks.filter(check => check.level === 'warn').length;
|
|
152
|
+
const notes = checks.length - passed - warnings;
|
|
150
153
|
const hasWarning = checks.some(check => check.level === 'warn');
|
|
151
154
|
let target = request.redirectUri;
|
|
152
155
|
let loopback = false;
|
|
@@ -228,7 +231,8 @@ function consentPage(data) {
|
|
|
228
231
|
'><summary>Request details (' +
|
|
229
232
|
passed +
|
|
230
233
|
' passed' +
|
|
231
|
-
(
|
|
234
|
+
(warnings ? ', ' + warnings + (warnings === 1 ? ' warning' : ' warnings') : '') +
|
|
235
|
+
(notes ? ', ' + notes + (notes === 1 ? ' note' : ' notes') : '') +
|
|
232
236
|
')</summary><ul class="checks">' +
|
|
233
237
|
checks.map(check => '<li>' + checkTag(check) + '<span>' + escapeHtml(check.text) + '</span></li>').join('') +
|
|
234
238
|
'</ul><p class="kv">' +
|
|
@@ -243,7 +247,7 @@ function consentPage(data) {
|
|
|
243
247
|
'<button type="submit" name="action" value="outcome" formnovalidate>Send</button></div></details>' +
|
|
244
248
|
'</form>';
|
|
245
249
|
return layout('Sign in to ' + client.name, body, {
|
|
246
|
-
footer: '
|
|
250
|
+
footer: 'Shown because the sign-in policy is prompt (' + escapeHtml(request.source) + '). This request stays open for 10 minutes.'
|
|
247
251
|
});
|
|
248
252
|
}
|
|
249
253
|
/**
|
|
@@ -306,5 +310,8 @@ function indexPage(data) {
|
|
|
306
310
|
'</p><h2>Endpoints</h2><p class="small">' +
|
|
307
311
|
endpoints.map(path => '<code>' + escapeHtml(path) + '</code>').join(' ') +
|
|
308
312
|
'</p>';
|
|
309
|
-
return layout('OAuth provider', body, {
|
|
313
|
+
return layout('OAuth provider', body, {
|
|
314
|
+
wide: true,
|
|
315
|
+
footer: 'Documentation: <a href="https://imapkit.com/docs/guides/oauth" rel="noreferrer">imapkit.com/docs/guides/oauth</a>'
|
|
316
|
+
});
|
|
310
317
|
}
|
package/dist/esm/oauth/pages.js
CHANGED
|
@@ -41,7 +41,8 @@ ul.scopes{list-style:none;padding:0;margin:0 0 12px;border:1px solid var(--line)
|
|
|
41
41
|
ul.scopes li{display:flex;gap:10px;padding:8px 12px;border-top:1px solid var(--line);align-items:baseline}
|
|
42
42
|
ul.scopes li:first-child{border-top:0}
|
|
43
43
|
.ck{color:var(--ok);font-weight:700}
|
|
44
|
-
.
|
|
44
|
+
ul.scopes li>span:nth-child(2){flex:1;min-width:0}
|
|
45
|
+
.raw{margin-left:auto;font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:var(--muted);text-align:right;white-space:nowrap}
|
|
45
46
|
.redir{font-size:13px;color:var(--muted);margin:0 0 16px;overflow-wrap:anywhere}
|
|
46
47
|
.btns{display:flex;flex-direction:row-reverse;gap:10px;margin:0 0 12px}
|
|
47
48
|
button{flex:1;font:inherit;font-weight:600;padding:10px 14px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--text);cursor:pointer;text-align:center;text-decoration:none}
|
|
@@ -65,6 +66,7 @@ table{width:100%;border-collapse:collapse;font-size:13.5px;margin:0 0 6px}
|
|
|
65
66
|
th,td{text-align:left;padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top}
|
|
66
67
|
th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
|
|
67
68
|
footer{border-top:1px solid var(--line);padding:12px 26px;font-size:12.5px;color:var(--muted)}
|
|
69
|
+
footer a{color:var(--accent)}
|
|
68
70
|
@media (max-width:480px){body{padding:0}main{border-radius:0;border-left:0;border-right:0}.body{padding:20px 16px}footer{padding:12px 16px}}
|
|
69
71
|
`;
|
|
70
72
|
const AVATAR_COLORS = ['#7c5cf6', '#0e9f6e', '#d9480f', '#1c7ed6', '#c2255c', '#5c7cfa', '#2b8a3e'];
|
|
@@ -141,7 +143,8 @@ export function consentPage(data) {
|
|
|
141
143
|
checks.push({ level: 'note', text: 'ignored parameters: ' + request.ignored.join(', ') });
|
|
142
144
|
}
|
|
143
145
|
const passed = checks.filter(check => check.level === 'ok').length;
|
|
144
|
-
const
|
|
146
|
+
const warnings = checks.filter(check => check.level === 'warn').length;
|
|
147
|
+
const notes = checks.length - passed - warnings;
|
|
145
148
|
const hasWarning = checks.some(check => check.level === 'warn');
|
|
146
149
|
let target = request.redirectUri;
|
|
147
150
|
let loopback = false;
|
|
@@ -223,7 +226,8 @@ export function consentPage(data) {
|
|
|
223
226
|
'><summary>Request details (' +
|
|
224
227
|
passed +
|
|
225
228
|
' passed' +
|
|
226
|
-
(
|
|
229
|
+
(warnings ? ', ' + warnings + (warnings === 1 ? ' warning' : ' warnings') : '') +
|
|
230
|
+
(notes ? ', ' + notes + (notes === 1 ? ' note' : ' notes') : '') +
|
|
227
231
|
')</summary><ul class="checks">' +
|
|
228
232
|
checks.map(check => '<li>' + checkTag(check) + '<span>' + escapeHtml(check.text) + '</span></li>').join('') +
|
|
229
233
|
'</ul><p class="kv">' +
|
|
@@ -238,7 +242,7 @@ export function consentPage(data) {
|
|
|
238
242
|
'<button type="submit" name="action" value="outcome" formnovalidate>Send</button></div></details>' +
|
|
239
243
|
'</form>';
|
|
240
244
|
return layout('Sign in to ' + client.name, body, {
|
|
241
|
-
footer: '
|
|
245
|
+
footer: 'Shown because the sign-in policy is prompt (' + escapeHtml(request.source) + '). This request stays open for 10 minutes.'
|
|
242
246
|
});
|
|
243
247
|
}
|
|
244
248
|
/**
|
|
@@ -301,5 +305,8 @@ export function indexPage(data) {
|
|
|
301
305
|
'</p><h2>Endpoints</h2><p class="small">' +
|
|
302
306
|
endpoints.map(path => '<code>' + escapeHtml(path) + '</code>').join(' ') +
|
|
303
307
|
'</p>';
|
|
304
|
-
return layout('OAuth provider', body, {
|
|
308
|
+
return layout('OAuth provider', body, {
|
|
309
|
+
wide: true,
|
|
310
|
+
footer: 'Documentation: <a href="https://imapkit.com/docs/guides/oauth" rel="noreferrer">imapkit.com/docs/guides/oauth</a>'
|
|
311
|
+
});
|
|
305
312
|
}
|