diff --git a/src/css/dashboard.css b/src/css/dashboard.css index cc4e7bce0..501516516 100644 --- a/src/css/dashboard.css +++ b/src/css/dashboard.css @@ -1,14 +1,18 @@ html, body { - height: 100%; + display: flex; + flex-direction: column; + height: 100vh; + justify-content: stretch; overflow: hidden; position: relative; - width: 100%; + width: 100vw; } #dashboard-nav { background-color: var(--default-surface); border: 0; box-shadow: var(--dashboard-bar-shadow); display: flex; + flex-shrink: 0; flex-wrap: wrap; overflow-x: hidden; padding: 0; @@ -48,6 +52,7 @@ html, body { iframe { background-color: transparent; border: 0; + flex-grow: 1; margin: 0; padding: 0; width: 100%; diff --git a/src/js/dashboard.js b/src/js/dashboard.js index 73f10982d..19f7a94a3 100644 --- a/src/js/dashboard.js +++ b/src/js/dashboard.js @@ -30,16 +30,6 @@ /******************************************************************************/ -const resizeFrame = function() { - const navRect = document.getElementById('dashboard-nav') - .getBoundingClientRect(); - const viewRect = document.documentElement.getBoundingClientRect(); - document.getElementById('iframe').style.setProperty( - 'height', - (viewRect.height - navRect.height) + 'px' - ); -}; - const discardUnsavedData = function(synchronous = false) { const paneFrame = document.getElementById('iframe'); const paneWindow = paneFrame.contentWindow; @@ -121,12 +111,9 @@ vAPI.messaging.send('dashboard', { document.body.classList.toggle('canUpdateShortcuts', response === true); }); -resizeFrame(); - vAPI.localStorage.getItemAsync('dashboardLastVisitedPane').then(value => { loadDashboardPanel(value !== null ? value : 'settings.html', true); - window.addEventListener('resize', resizeFrame); uDom('.tabButton').on('click', onTabClickHandler); // https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event