diff --git a/react/src/components/dashboard/settings/settings.appSettingsPanel.js b/react/src/components/dashboard/settings/settings.appSettingsPanel.js
index 09b89ef..791dee6 100644
--- a/react/src/components/dashboard/settings/settings.appSettingsPanel.js
+++ b/react/src/components/dashboard/settings/settings.appSettingsPanel.js
@@ -60,7 +60,8 @@ class AppSettingsPanel extends React.Component {
if (key.indexOf('__') === -1) {
_appSettingsPristine[key] = this.state.appConfigSchema[key] && this.state.appConfigSchema[key].type === 'number' ? Number(_appSettings[key]) : _appSettings[key];
- if (this.state.appConfigSchema[key] && this.state.appConfigSchema[key].type === 'folder' &&
+ if (this.state.appConfigSchema[key] &&
+ this.state.appConfigSchema[key].type === 'folder' &&
_appSettings[key] &&
_appSettings[key].length) {
const _testLocation = window.require('electron').remote.getCurrentWindow().testLocation;
@@ -72,18 +73,20 @@ class AppSettingsPanel extends React.Component {
isError = true;
Store.dispatch(
triggerToaster(
- translate('TOASTR.KOMODO_DATADIR_INVALID'),
+ this.renderLB('TOASTR.KOMODO_DATADIR_INVALID'),
translate('INDEX.SETTINGS'),
- 'error'
+ 'error',
+ false
)
);
} else if (res === false) {
isError = true;
Store.dispatch(
triggerToaster(
- translate('TOASTR.KOMODO_DATADIR_NOT_DIR'),
+ this.renderLB('TOASTR.KOMODO_DATADIR_NOT_DIR'),
translate('INDEX.SETTINGS'),
- 'error'
+ 'error',
+ false
)
);
} else {
@@ -102,6 +105,17 @@ class AppSettingsPanel extends React.Component {
}
}
+ renderLB(_translationID) {
+ const _translationComponents = translate(_translationID).split('
');
+
+ return _translationComponents.map((_translation) =>
+
+ {_translation}
+
+
+ );
+ }
+
renderConfigEditForm() {
let items = [];
const _appConfig = this.state.appSettings;
@@ -257,7 +271,8 @@ class AppSettingsPanel extends React.Component {
let _appSettings = this.state.appSettings;
let _appSettingsPrev = Object.assign({}, _appSettings);
- if (!childKey && this.state.appConfigSchema[parentKey].type === 'boolean') {
+ if (!childKey &&
+ this.state.appConfigSchema[parentKey].type === 'boolean') {
_appSettings[parentKey] = typeof _appSettings[parentKey] !== undefined ? !_appSettings[parentKey] : !this.state.appSettings[parentKey];
} else if (childKey && this.state.appConfigSchema[parentKey][childKey].type === 'boolean') {
_appSettings[parentKey][childKey] = typeof _appSettings[parentKey][childKey] !== undefined ? !_appSettings[parentKey][childKey] : !this.state.appSettings[parentKey][childKey];
diff --git a/react/src/components/dashboard/settings/settings.debugLogPanel.js b/react/src/components/dashboard/settings/settings.debugLogPanel.js
index 0cac3c8..08405e5 100644
--- a/react/src/components/dashboard/settings/settings.debugLogPanel.js
+++ b/react/src/components/dashboard/settings/settings.debugLogPanel.js
@@ -17,6 +17,7 @@ class DebugLogPanel extends React.Component {
debugTarget: 'iguana',
nativeOnly: Config.iguanaLessMode,
toggleAppRuntimeLog: false,
+ pristine: true,
};
this.readDebugLog = this.readDebugLog.bind(this);
this.updateInput = this.updateInput.bind(this);
@@ -26,17 +27,21 @@ class DebugLogPanel extends React.Component {
}
readDebugLog() {
+ this.setState(Object.assign({}, this.state, {
+ pristine: false,
+ }));
+
Store.dispatch(
getDebugLog(
- this.state.debugTarget,
+ 'komodo',
this.state.debugLinesCount
)
);
}
renderAppRuntimeLog() {
- let _items = [];
const _appRuntimeLog = this.state.appRuntimeLog;
+ let _items = [];
for (let i = 0; i < _appRuntimeLog.length; i++) {
_items.push(
@@ -74,7 +79,8 @@ class DebugLogPanel extends React.Component {
}
renderDebugLogData() {
- if (this.props.Settings.debugLog) {
+ if (this.props.Settings.debugLog &&
+ !this.state.pristine) {
const _debugLogDataRows = this.props.Settings.debugLog.split('\n');
if (_debugLogDataRows &&
@@ -106,7 +112,9 @@ class DebugLogPanel extends React.Component {
return (
{ translate('INDEX.DEBUG_LOG_DESC') }
}