From 17b680e7b25e95b2a01aea829b2d580388e1fcbc Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Sun, 12 Dec 2021 14:33:16 -0700 Subject: [PATCH] nv qol and changelog flexbox --- newversion.js | 15 +++++++++++---- scripts/startup/changelog.js | 4 ++-- styles/modal.css | 16 +++++++++++++++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/newversion.js b/newversion.js index 66f0cad..7586c88 100644 --- a/newversion.js +++ b/newversion.js @@ -33,10 +33,17 @@ const ask = async () => { await input("I've made the changelog for you! Press enter when you're ready to create the release tag."); - cp.exec(`npm version ${v.trim().toLowerCase()}`, function(error, stdout, stderr) { - if (error) {console.error(error);} - if (stdout) {console.log(stdout);} - if (stdout) {console.log(stderr);} + let msg = await input('What would you like the commit message to be? '); + + console.log(''); + + cp.exec('git add .', () => { + console.log('Staged working directory.\n'); + cp.exec(`npm version ${v.trim().toLowerCase()} -m %s -> ${msg}`, function(error, stdout, stderr) { + if (error) {console.error(error);} + if (stdout) {console.log(stdout);} + if (stdout) {console.log(stderr);} + }); }); console.log('\nDone!'); diff --git a/scripts/startup/changelog.js b/scripts/startup/changelog.js index b294c4b..1d7c92e 100644 --- a/scripts/startup/changelog.js +++ b/scripts/startup/changelog.js @@ -24,14 +24,14 @@ module.exports = () => { clw.className = 'changelog-wrapper'; modal.appendChild(clw); - changelogs.forEach(changelog => { + changelogs.reverse().forEach(changelog => { changelog = require(`../../json/changelogs/${changelog}`); let w = document.createElement('div'); w.className = 'changelog-version-container'; clw.appendChild(w); let subtitle = document.createElement('h2'); subtitle.className = 'subtitle'; - subtitle.innerHTML = changelog.version.name + ' ' + changelog.version.semver + (window.kade.version.name === changelog.version.name ? ' (Current)' : ''); + subtitle.innerHTML = `${changelog.version.name} ${changelog.version.semver}${window.kade.version.semver === changelog.version.semver ? ' (Current)' : ''}`; w.appendChild(subtitle); let cl = changelog.log; Object.keys(cl).forEach(group => { diff --git a/styles/modal.css b/styles/modal.css index 6f43cef..b7bc2ab 100644 --- a/styles/modal.css +++ b/styles/modal.css @@ -111,4 +111,18 @@ } .close-button:hover:before, .close-button:hover:after { transform: rotate(180deg); -} \ No newline at end of file +} + +.changelog-wrapper { + display: flex; + align-items: stretch; + align-content: stretch; + justify-content: flex-start; + overflow: auto; + flex-direction: column; + row-gap: 8px; + margin-top: 6px; + margin-left: 6px; +} + +#changelog-modal {max-height: 70vh;} \ No newline at end of file