diff --git a/app/backend/database/models/settings.js b/app/backend/database/models/settings.js index 68dafc1e8..b4553c5d3 100644 --- a/app/backend/database/models/settings.js +++ b/app/backend/database/models/settings.js @@ -14,6 +14,7 @@ export function init () { timeout: 0, validateSSL: true, optSyncBeta: false, + forceVerticalLayout: false, }); } diff --git a/app/backend/dns.js b/app/backend/dns.js index 23f543f1c..ccd4bc53c 100644 --- a/app/backend/dns.js +++ b/app/backend/dns.js @@ -1,11 +1,25 @@ import dns from 'dns'; import {parse as urlParse, format as urlFormat} from 'url'; -function lookup (url) { +/** + * Try to find a supported IPv6 address. Will throw if none found. + * + * @param url + * @returns {Promise} + */ +function lookupIPv6 (url) { return new Promise((resolve, reject) => { const {hostname} = urlParse(url); - dns.lookup(hostname, (err, ip) => { - err ? reject(err) : resolve(ip) + const options = { + hints: dns.ADDRCONFIG, + family: 6, + }; + dns.lookup(hostname, options, (err, results) => { + if (err) { + reject(err); + } else { + resolve(results); + } }); }) } @@ -14,7 +28,7 @@ export async function swapHost (url) { let ip; try { - ip = await lookup(url); + ip = await lookupIPv6(url); const parsedUrl = urlParse(url); delete parsedUrl.host; // So it doesn't build with old host parsedUrl.hostname = ip; diff --git a/app/ui/components/modals/SettingsModal.js b/app/ui/components/modals/SettingsModal.js index 94602813d..67803720a 100644 --- a/app/ui/components/modals/SettingsModal.js +++ b/app/ui/components/modals/SettingsModal.js @@ -195,26 +195,22 @@ class SettingsTabs extends Component { - {/*
+{error}
diff --git a/app/ui/containers/App.js b/app/ui/containers/App.js index cb5871bda..c0bc3fbd8 100644 --- a/app/ui/containers/App.js +++ b/app/ui/containers/App.js @@ -2,6 +2,7 @@ import React, {Component, PropTypes} from 'react'; import {ipcRenderer} from 'electron'; import ReactDOM from 'react-dom'; import {connect} from 'react-redux'; +import classnames from 'classnames'; import {bindActionCreators} from 'redux'; import HTML5Backend from 'react-dnd-html5-backend'; import {DragDropContext} from 'react-dnd'; @@ -501,7 +502,7 @@ class App extends Component { return (this._sidebar = n} diff --git a/app/ui/css/components/wrapper.less b/app/ui/css/components/wrapper.less index cd51a9af7..f8a0ad06d 100644 --- a/app/ui/css/components/wrapper.less +++ b/app/ui/css/components/wrapper.less @@ -53,24 +53,28 @@ } } -@media (max-width: @breakpoint-md) { - .wrapper { - .request-pane { - grid-column-start: 3; - grid-column-end: span 3; - grid-row-start: 1; - grid-row-end: span 1; - } +.wrapper--vertical { + .request-pane { + grid-column-start: 3; + grid-column-end: span 3; + grid-row-start: 1; + grid-row-end: span 1; + } - .response-pane { - grid-column-start: 3; - grid-column-end: span 3; - grid-row-start: 2; - grid-row-end: span 1; - } + .response-pane { + grid-column-start: 3; + grid-column-end: span 3; + grid-row-start: 2; + grid-row-end: span 1; + } - .drag--pane { - display: none; - } + .drag--pane { + display: none; + } +} + +@media (max-width: @breakpoint-md) { + .wrapper { + .wrapper--vertical(); } } diff --git a/app/ui/css/layout/base.less b/app/ui/css/layout/base.less index 8af34ee89..3a8b8ea9f 100644 --- a/app/ui/css/layout/base.less +++ b/app/ui/css/layout/base.less @@ -164,6 +164,10 @@ i.fa { white-space: pre-wrap; } +.force-word-wrap { + white-space: normal; +} + .no-wrap { white-space: nowrap; }