From 8ab88f82d322b5d1aa0b298b75043e1efba23dbf Mon Sep 17 00:00:00 2001 From: Zak Burke Date: Thu, 9 Nov 2023 12:14:41 -0500 Subject: [PATCH] UID-139 expose config.preserveConsole Expose the config value `preserveConsole` to allow toggling of that config value. It defaults to `false`, i.e. clear the console on logout. Refs UID-139 --- CHANGELOG.md | 1 + src/settings/Configuration.js | 9 +++++++++ translations/ui-developer/en.json | 1 + 3 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 534f139..076d31e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ # 8.1.0 IN PROGRESS * Handle access-control via cookies instead of `X-Okapi-Token` header. Refs UID-121. +* Configuration: expose `preserveConsole` to toggle `console.clear()` on logout. Refs UID-139. ## [8.0.0](https://github.com/folio-org/ui-developer/tree/v8.0.0) (2023-10-19) [Full Changelog](https://github.com/folio-org/ui-developer/compare/v7.0.0...v8.0.0) diff --git a/src/settings/Configuration.js b/src/settings/Configuration.js index 0e8da32..ac732d9 100644 --- a/src/settings/Configuration.js +++ b/src/settings/Configuration.js @@ -73,6 +73,7 @@ class Configuration extends React.Component { username: stripes.config.autoLogin.username, password: stripes.config.autoLogin.password, }, + preserveConsole: stripes.config.preserveConsole || false, }, }; @@ -165,6 +166,14 @@ class Configuration extends React.Component { id="config.suppressIntlErrors" label={} /> + } + /> diff --git a/translations/ui-developer/en.json b/translations/ui-developer/en.json index dd51a4f..da6f68d 100644 --- a/translations/ui-developer/en.json +++ b/translations/ui-developer/en.json @@ -37,6 +37,7 @@ "configuration.showHomeLink": "Show home link in top-right menu", "configuration.showDevInfo": "Show developer info", "configuration.suppressIntlErrors": "Suppress intl errors", + "configuration.preserveConsole": "Preserve console on logout", "hotkeys.instructions": "When this area is focused, type:", "hotkeys.home": "to go to the Home page",