From 438d9eb717641af8ffab9a72b6f814f3255fb85d Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 19 Feb 2020 18:18:47 -0800 Subject: [PATCH] Fixed: Prompt to restart after resetting API key Fixes #3580 --- frontend/src/Settings/General/GeneralSettings.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/Settings/General/GeneralSettings.js b/frontend/src/Settings/General/GeneralSettings.js index ea30e826c..0f3c1c4bd 100644 --- a/frontend/src/Settings/General/GeneralSettings.js +++ b/frontend/src/Settings/General/GeneralSettings.js @@ -25,8 +25,7 @@ const requiresRestartKeys = [ 'sslCertHash', 'authenticationMethod', 'username', - 'password', - 'apiKey' + 'password' ]; class GeneralSettings extends Component { @@ -46,9 +45,15 @@ class GeneralSettings extends Component { const { settings, isSaving, - saveError + saveError, + isResettingApiKey } = this.props; + if (!isResettingApiKey && prevProps.isResettingApiKey) { + this.setState({ isRestartRequiredModalOpen: true }); + return; + } + if (isSaving || saveError || !prevProps.isSaving) { return; }