diff --git a/src-rx/src/dialogs/LicenseDialog.js b/src-rx/src/dialogs/LicenseDialog.js
index 56fc603a9..4109da74d 100644
--- a/src-rx/src/dialogs/LicenseDialog.js
+++ b/src-rx/src/dialogs/LicenseDialog.js
@@ -33,7 +33,8 @@ const useStyles = makeStyles((theme) => ({
pre: {
overflow: 'auto',
whiteSpace: 'pre-wrap',
- margin: 0
+ margin: 0,
+ padding: 10,
}
}));
const LicenseDialog = ({ url, cb }) => {
diff --git a/src-rx/src/dialogs/SlowConnectionWarningDialog.js b/src-rx/src/dialogs/SlowConnectionWarningDialog.js
index f0ad9f848..60cec477b 100644
--- a/src-rx/src/dialogs/SlowConnectionWarningDialog.js
+++ b/src-rx/src/dialogs/SlowConnectionWarningDialog.js
@@ -10,8 +10,10 @@ import DialogContentText from '@material-ui/core/DialogContentText';
import { Button, TextField } from '@material-ui/core';
import CloseIcon from '@material-ui/icons/Close';
-import {TimeIcon} from "@material-ui/pickers/_shared/icons/TimeIcon";
-import CheckIcon from "@material-ui/icons/Check";
+import {TimeIcon} from '@material-ui/pickers/_shared/icons/TimeIcon';
+import CheckIcon from '@material-ui/icons/Check';
+
+import {MOBILE_WIDTH} from '../helpers/MobileDialog';
const styles = theme => ({
buttonLabel: {
@@ -29,6 +31,8 @@ class SlowConnectionWarningDialog extends Component {
this.state = {
readTimeoutSec: Math.round((this.props.readTimeoutMs || SlowConnectionWarningDialog.getReadTimeoutMs()) / 1000),
};
+
+ this.mobile = window.innerWidth < MOBILE_WIDTH;
}
static getReadTimeoutMs() {
@@ -74,7 +78,7 @@ class SlowConnectionWarningDialog extends Component {
}}
startIcon={
}
>
- {this.props.t('Set timeout to 1 minute')}
+ {this.mobile ? this.props.t('1 minute') : this.props.t('Set timeout to 1 minute')}
}
>
- {this.props.t('Cancel')}
+ {this.mobile ? null : this.props.t('Cancel')}
;
diff --git a/src-rx/src/helpers/MobileDialog.js b/src-rx/src/helpers/MobileDialog.js
index 0f7e43d66..9a0992679 100644
--- a/src-rx/src/helpers/MobileDialog.js
+++ b/src-rx/src/helpers/MobileDialog.js
@@ -1,6 +1,6 @@
import {Component} from 'react';
-const MOBILE_WIDTH = 800;
+export const MOBILE_WIDTH = 800;
class MobileDialog extends Component {
static isMobile() {
diff --git a/src-rx/src/tabs/Logs.js b/src-rx/src/tabs/Logs.js
index a0017cbde..34e3a4524 100644
--- a/src-rx/src/tabs/Logs.js
+++ b/src-rx/src/tabs/Logs.js
@@ -39,6 +39,7 @@ import SaveAltIcon from '@material-ui/icons/SaveAlt';
import ErrorIcon from '@material-ui/icons/ErrorOutline';
import WarningIcon from '@material-ui/icons/Warning';
import CheckIcon from '@material-ui/icons/Check';
+import {FaPalette as ColorsIcon} from 'react-icons/fa';
import amber from '@material-ui/core/colors/amber';
import grey from '@material-ui/core/colors/grey';
@@ -298,9 +299,9 @@ class Logs extends Component {
super(props);
this.state = {
- source: '1',
- severity: 'debug',
- message: '',
+ source: window.localStorage.getItem('Log.source') || '1',
+ severity: window.localStorage.getItem('Log.severity') || 'debug',
+ message: window.localStorage.getItem('Log.message') || '',
logDeleteDialog: false,
logDownloadDialog: null,
logFiles: [],
@@ -312,6 +313,7 @@ class Logs extends Component {
pause: 0,
pauseCount: 0,
pid: JSON.parse(window.localStorage.getItem('Logs.pid')) || false,
+ colors: window.localStorage.getItem('Logs.colors') === 'true',
adapters: {},
sources: {},
currentHost: this.props.currentHost,
@@ -551,14 +553,17 @@ class Logs extends Component {
}
handleMessageChange(event) {
+ window.localStorage.setItem('Log.message', event.target.value);
this.setState({ message: event.target.value });
}
handleSourceChange(event) {
+ window.localStorage.setItem('Log.source', event.target.value);
this.setState({ source: event.target.value });
}
handleSeverityChange(event) {
+ window.localStorage.setItem('Log.severity', event.target.value);
this.setState({ severity: event.target.value });
}
@@ -695,7 +700,7 @@ class Logs extends Component {
rows.push(
this.lastRowRender && classes.updatedRow)}
- style={{backgroundColor: this.state.sources[row.from]?.color || undefined}}
+ style={this.state.colors ? {backgroundColor: this.state.sources[row.from]?.color || undefined} : {}}
key={key}
hover
>
@@ -820,6 +825,17 @@ class Logs extends Component {
{this.props.t('PID')}
+
+ {
+ window.localStorage.setItem('Logs.colors', this.state.colors ? 'false' : 'true');
+ this.setState({colors: !this.state.colors});
+ }}
+ color={!this.state.colors ? 'default' : 'primary'}
+ >
+
+
+