hof 22.0.0-timeout-warning-beta.4 → 22.0.0-timeout-warning-beta.5
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/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 2024, Version 22.0.0, @Rhodine-orleans-lindsay
|
2
|
+
* Adds session timeout warning
|
3
|
+
* Fixes accessibility issues
|
4
|
+
* Sandbox area for testing hof changes
|
5
|
+
* Updates patch and minor dependency versions
|
6
|
+
|
1
7
|
## 2024-07-22, Version 21.0.0 (Stable), @Rhodine-orleans-lindsay
|
2
8
|
* Replaces deprecated request module with axios
|
3
9
|
- refactors the hof model and apis to use axios instead of request
|
package/config/hof-defaults.js
CHANGED
@@ -38,7 +38,7 @@ const defaults = {
|
|
38
38
|
host: process.env.REDIS_HOST || '127.0.0.1'
|
39
39
|
},
|
40
40
|
session: {
|
41
|
-
ttl: process.env.SESSION_TTL ||
|
41
|
+
ttl: process.env.SESSION_TTL || 61,
|
42
42
|
secret: process.env.SESSION_SECRET || 'changethis',
|
43
43
|
name: process.env.SESSION_NAME || 'hod.sid',
|
44
44
|
sanitiseInputs: false
|
@@ -47,7 +47,7 @@ const defaults = {
|
|
47
47
|
pdfConverter: process.env.PDF_CONVERTER_URL
|
48
48
|
},
|
49
49
|
serveStatic: process.env.SERVE_STATIC_FILES !== 'false',
|
50
|
-
sessionTimeOutWarning: process.env.SESSION_TIMEOUT_WARNING ||
|
50
|
+
sessionTimeOutWarning: process.env.SESSION_TIMEOUT_WARNING || 60
|
51
51
|
};
|
52
52
|
|
53
53
|
module.exports = Object.assign({}, defaults, rateLimits);
|
@@ -159,24 +159,24 @@ window.GOVUK.sessionDialog = {
|
|
159
159
|
ints[0] += 10;
|
160
160
|
}
|
161
161
|
|
162
|
-
/* Add scale word if chunk
|
163
|
-
if (
|
164
|
-
words.push(
|
162
|
+
/* Add scale word if chunk array item exists */
|
163
|
+
if (scales[i]) {
|
164
|
+
words.push(scales[i]);
|
165
165
|
}
|
166
166
|
|
167
167
|
/* Add unit word if array item exists */
|
168
|
-
if (
|
169
|
-
words.push(
|
168
|
+
if (units[ints[0]]) {
|
169
|
+
words.push(units[ints[0]]);
|
170
170
|
}
|
171
171
|
|
172
172
|
/* Add tens word if array item exists */
|
173
|
-
if (
|
174
|
-
words.push(
|
173
|
+
if (word = tens[ints[1]]) {
|
174
|
+
words.push(tens[ints[1]]);
|
175
175
|
}
|
176
176
|
|
177
177
|
/* Add hundreds word if array item exists */
|
178
|
-
if (
|
179
|
-
words.push(
|
178
|
+
if (units[ints[2]]) {
|
179
|
+
words.push(units[ints[2]] + ' hundred');
|
180
180
|
}
|
181
181
|
}
|
182
182
|
}
|
@@ -238,8 +238,6 @@ window.GOVUK.sessionDialog = {
|
|
238
238
|
if (!timerExpired) {
|
239
239
|
const minutesLeft = parseInt(secondsUntilSessionTimeout / 60, 10);
|
240
240
|
const secondsLeft = parseInt(secondsUntilSessionTimeout % 60, 10);
|
241
|
-
const atMinutesText = window.GOVUK.sessionDialog.timeToWords(minutesLeft, 'minute');
|
242
|
-
const atSecondsText = window.GOVUK.sessionDialog.timeToWords(secondsLeft, 'second');
|
243
241
|
|
244
242
|
// Below string will get read out by screen readers every time
|
245
243
|
// the timeout refreshes.
|
@@ -247,8 +245,8 @@ window.GOVUK.sessionDialog = {
|
|
247
245
|
// first time the time out opens
|
248
246
|
const countdownText = window.GOVUK.sessionDialog.countdownText(minutesLeft, secondsLeft);
|
249
247
|
const text = window.GOVUK.sessionDialog.warningTextPrefix + '<strong>' + countdownText + '</strong>' + window.GOVUK.sessionDialog.warningTextSuffix;
|
250
|
-
const countdownAtText = window.GOVUK.sessionDialog.countdownAtText(
|
251
|
-
const atText = window.GOVUK.sessionDialog.warningTextPrefix + countdownAtText + window.GOVUK.sessionDialog.warningTextSuffix + '
|
248
|
+
const countdownAtText = window.GOVUK.sessionDialog.countdownAtText(minutesLeft, secondsLeft);
|
249
|
+
const atText = window.GOVUK.sessionDialog.warningTextPrefix + countdownAtText + window.GOVUK.sessionDialog.warningTextSuffix + ' ' + window.GOVUK.sessionDialog.warningText;
|
252
250
|
const extraText = '\n' + window.GOVUK.sessionDialog.warningTextExtra;
|
253
251
|
|
254
252
|
$timer.html(text + ' ' + extraText);
|
package/package.json
CHANGED
@@ -459,24 +459,24 @@ window.GOVUK.sessionDialog = {
|
|
459
459
|
ints[0] += 10;
|
460
460
|
}
|
461
461
|
|
462
|
-
/* Add scale word if chunk
|
463
|
-
if (
|
464
|
-
words.push(
|
462
|
+
/* Add scale word if chunk array item exists */
|
463
|
+
if (scales[i]) {
|
464
|
+
words.push(scales[i]);
|
465
465
|
}
|
466
466
|
|
467
467
|
/* Add unit word if array item exists */
|
468
|
-
if (
|
469
|
-
words.push(
|
468
|
+
if (units[ints[0]]) {
|
469
|
+
words.push(units[ints[0]]);
|
470
470
|
}
|
471
471
|
|
472
472
|
/* Add tens word if array item exists */
|
473
|
-
if (
|
474
|
-
words.push(
|
473
|
+
if (word = tens[ints[1]]) {
|
474
|
+
words.push(tens[ints[1]]);
|
475
475
|
}
|
476
476
|
|
477
477
|
/* Add hundreds word if array item exists */
|
478
|
-
if (
|
479
|
-
words.push(
|
478
|
+
if (units[ints[2]]) {
|
479
|
+
words.push(units[ints[2]] + ' hundred');
|
480
480
|
}
|
481
481
|
}
|
482
482
|
}
|
@@ -538,8 +538,6 @@ window.GOVUK.sessionDialog = {
|
|
538
538
|
if (!timerExpired) {
|
539
539
|
const minutesLeft = parseInt(secondsUntilSessionTimeout / 60, 10);
|
540
540
|
const secondsLeft = parseInt(secondsUntilSessionTimeout % 60, 10);
|
541
|
-
const atMinutesText = window.GOVUK.sessionDialog.timeToWords(minutesLeft, 'minute');
|
542
|
-
const atSecondsText = window.GOVUK.sessionDialog.timeToWords(secondsLeft, 'second');
|
543
541
|
|
544
542
|
// Below string will get read out by screen readers every time
|
545
543
|
// the timeout refreshes.
|
@@ -547,8 +545,8 @@ window.GOVUK.sessionDialog = {
|
|
547
545
|
// first time the time out opens
|
548
546
|
const countdownText = window.GOVUK.sessionDialog.countdownText(minutesLeft, secondsLeft);
|
549
547
|
const text = window.GOVUK.sessionDialog.warningTextPrefix + '<strong>' + countdownText + '</strong>' + window.GOVUK.sessionDialog.warningTextSuffix;
|
550
|
-
const countdownAtText = window.GOVUK.sessionDialog.countdownAtText(
|
551
|
-
const atText = window.GOVUK.sessionDialog.warningTextPrefix + countdownAtText + window.GOVUK.sessionDialog.warningTextSuffix + '
|
548
|
+
const countdownAtText = window.GOVUK.sessionDialog.countdownAtText(minutesLeft, secondsLeft);
|
549
|
+
const atText = window.GOVUK.sessionDialog.warningTextPrefix + countdownAtText + window.GOVUK.sessionDialog.warningTextSuffix + ' ' + window.GOVUK.sessionDialog.warningText;
|
552
550
|
const extraText = '\n' + window.GOVUK.sessionDialog.warningTextExtra;
|
553
551
|
|
554
552
|
$timer.html(text + ' ' + extraText);
|