diff --git a/src/components/ContainerHomeLogs.react.js b/src/components/ContainerHomeLogs.react.js index 275879e8d..aadbbc2a4 100644 --- a/src/components/ContainerHomeLogs.react.js +++ b/src/components/ContainerHomeLogs.react.js @@ -40,7 +40,7 @@ let prevBottom = 0; module.exports = React.createClass({ getInitialState: function(){ return { - fontSize: 10, + fontSize: localStorage.getItem('settings.logsFontSize') || 10, follow: true, }; }, @@ -50,6 +50,7 @@ module.exports = React.createClass({ fontSize: $target.value, follow: prevState.follow })); + localStorage.setItem("settings.logsFontSize", $target.value); }, componentDidUpdate: function () { var node = $('.logs').get()[0]; diff --git a/src/components/Preferences.react.js b/src/components/Preferences.react.js index 006e3751e..56d329562 100644 --- a/src/components/Preferences.react.js +++ b/src/components/Preferences.react.js @@ -4,7 +4,24 @@ import Router from 'react-router'; import util from '../utils/Util'; import electron from 'electron'; const remote = electron.remote; +var FontSelect = React.createClass({ + + getFontSizes: function(start, end){ + let options = []; + for(let i = start; i<=end; i++){ + options.push(); + } + return options; + }, + render: function(){ + return ( + + ); + } +}); var Preferences = React.createClass({ mixins: [Router.Navigation], getInitialState: function () { @@ -14,7 +31,8 @@ var Preferences = React.createClass({ metricsEnabled: metrics.enabled(), terminalShell: localStorage.getItem('settings.terminalShell') || "sh", terminalPath: localStorage.getItem('settings.terminalPath') || "/usr/bin/xterm", - startLinkedContainers: localStorage.getItem('settings.startLinkedContainers') === 'true' + startLinkedContainers: localStorage.getItem('settings.startLinkedContainers') === 'true', + logsFontSize: localStorage.getItem('settings.logsFontSize') || 10 }; }, handleGoBackClick: function () { @@ -73,6 +91,20 @@ var Preferences = React.createClass({ }); localStorage.setItem('settings.startLinkedContainers', checked ? 'true' : 'false'); }, + handleChangeLogsFontSize: function (e) { + var fontSize = event.target.value; + this.setState({ + logsFontSize: fontSize + }); + localStorage.setItem('settings.logsFontSize', fontSize); + }, + getFontSizes: function(start, end){ + let options = []; + for(let i = start; i<=end; i++){ + options.push(); + } + return options; + }, render: function () { var vmSettings, vmShutdown, nativeSetting, linuxSettings; @@ -160,6 +192,14 @@ var Preferences = React.createClass({ +
+
+ +
+
+ +
+
{linuxSettings}