From f4111c479e2073c74e9dca2c1bba02dfc70ab00f Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Thu, 16 Dec 2021 09:57:52 -0700 Subject: [PATCH] (kind of) fix overflow issues --- package.json | 4 ++-- scripts/startup/changelog.js | 11 ++++++++++- styles/modal.css | 12 +++++++++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 15cb43c..6c24e82 100755 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A file explorer (primarily a learning experience for me)", "main": "main.js", "scripts": { - "start": "electron-forge start", + "start": "electron .", "nv": "node newversion.js", "package": "electron-forge package", "make": "electron-forge make" @@ -30,7 +30,7 @@ { "name": "@electron-forge/maker-squirrel", "config": { - "name": "filekade" + "name": "FileKade" } }, { diff --git a/scripts/startup/changelog.js b/scripts/startup/changelog.js index 1d7c92e..22f9b7e 100755 --- a/scripts/startup/changelog.js +++ b/scripts/startup/changelog.js @@ -20,9 +20,13 @@ module.exports = () => { title.innerHTML = 'FileKade - Changelog'; modal.appendChild(title); + let clww = document.createElement('div'); + clww.className = 'changelog-anchor'; + modal.appendChild(clww); + let clw = document.createElement('div'); clw.className = 'changelog-wrapper'; - modal.appendChild(clw); + clww.appendChild(clw); changelogs.reverse().forEach(changelog => { changelog = require(`../../json/changelogs/${changelog}`); @@ -54,6 +58,11 @@ module.exports = () => { }); }); + clww.style = `height: ${modalOut.clientHeight - 6};`; // TODO cry enough tears that they magically make this line work + console.log(clww.style.height); + console.log(modalOut.clientHeight - 6); + console.log(typeof clww.style); + let msm = new Mousetrap(modal); msm.bind('esc', () => { modalOut.remove(); diff --git a/styles/modal.css b/styles/modal.css index b7bc2ab..0bdb6c6 100755 --- a/styles/modal.css +++ b/styles/modal.css @@ -74,6 +74,8 @@ margin: 0 0; padding: 0 0; position: relative; + max-height: inherit; + height: inherit; } .close-button-wrapper { @@ -118,11 +120,19 @@ align-items: stretch; align-content: stretch; justify-content: flex-start; - overflow: auto; flex-direction: column; row-gap: 8px; margin-top: 6px; margin-left: 6px; + position: static; + max-height: inherit; + overflow-y: scroll; +} + +.changelog-anchor { + position: static; + max-height: 62vh; + overflow: hidden; } #changelog-modal {max-height: 70vh;} \ No newline at end of file