diff --git a/public/css/promptmanager.css b/public/css/promptmanager.css index 84b86a63e..f79d1a22a 100644 --- a/public/css/promptmanager.css +++ b/public/css/promptmanager.css @@ -250,6 +250,31 @@ background-color: #000; } +#prompt-manager-export-format-popup { + display:none; +} + +.prompt-manager-export-format-popup-flex { + display: flex; + flex-direction: column; +} + +.prompt-manager-export-format-popup-flex .row { + display: flex; + justify-content: space-between; +} + +.prompt-manager-export-format-popup-flex a, +.prompt-manager-export-format-popup-flex span { + display: flex; + margin: auto 0; + justify-content: space-between; +} + +#prompt-manager-export-format-popup span { + font-size: 16px; +} + @media screen and (max-width: 412px) { #completion_prompt_manager #completion_prompt_manager_list { font-size: 1.25em !important; diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index db1e40dad..61df4dc95 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -316,8 +316,7 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti } this.handleImport = () => { - - callPopup('Your prompts will be merged with the import. Imported prompts with the same ID will override existing prompts.', 'confirm',) + callPopup('Existing prompts with the same ID will be overridden. Do you want to proceed?', 'confirm',) .then(userChoice => { if (false === userChoice) return; @@ -338,8 +337,9 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti const data = JSON.parse(fileContent); this.import(data); } catch (err) { - this.log('An error occurred while importing prompts'); - this.log(err.toString()); + toastr.error('An error occurred while importing prompts. More info available in console.') + console.log('An error occurred while importing prompts'); + console.log(err.toString()); } }; @@ -951,17 +951,26 @@ PromptManagerModule.prototype.renderPromptManager = function () { - - + ${ this.serviceSettings.prompt_manager_settings.showAdvancedSettings + ? ` + ` : '' } `; const exportPopup = `
+