From e766a2587875d2f19fdeef4dd0f945679e673782 Mon Sep 17 00:00:00 2001 From: UKDTOM Date: Tue, 4 Jan 2022 00:51:02 +0100 Subject: [PATCH] #435 Fixed --- CHANGELOG.md | 8 +++++++- src/components/modules/General/wtutils.js | 23 ++++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abcc001..2a94010 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,17 @@ **Note**: This version is an Beta version +**Note 2**: In this version, the following is disabled: + +* Export to xlsx format ([See #331](https://github.com/WebTools-NG/WebTools-NG/issues/331)) +* Photo export + **Changes**: * [#429 Allow setting the LogNumFiles from Settings](https://github.com/WebTools-NG/WebTools-NG/issues/429) +* [#435 Showing Rel Notes should only show current version](https://github.com/WebTools-NG/WebTools-NG/issues/435) -## V0.3.13 +## V0.3.13 (20220102) **Note**: This version is an Beta version diff --git a/src/components/modules/General/wtutils.js b/src/components/modules/General/wtutils.js index 9b0d0ea..ab3d7c1 100644 --- a/src/components/modules/General/wtutils.js +++ b/src/components/modules/General/wtutils.js @@ -25,8 +25,6 @@ const wtutils = new class WTUtils { } get ExportDirPresent(){ - - log.info('Checking ExportPath') const ExportPath = wtconfig.get('General.ExportPath', 'N/A'); if ( ExportPath == 'N/A' ){ @@ -149,6 +147,10 @@ const wtutils = new class WTUtils { return (electron.app || electron.remote.app).getVersion() + '.' + this.Rev; } + get ShortAppVersion() { + return (electron.app || electron.remote.app).getVersion(); + } + get LangFiles() { const langFiles = [] var fs = require('fs'); @@ -446,11 +448,6 @@ const wtutils = new class WTUtils { wtconfig.set('ET.CustomLevels.2002', wtconfig.get('ET.CustomLevels.playlist-video', 'N/A')); wtconfig.delete('ET.CustomLevels.playlist-video'); } - - - - - // All done, so stamp version number wtconfig.set('General.version', wtutils.AppVersion) } @@ -545,10 +542,16 @@ const github = new class GitHub { await axios(this.changeLogUrl) .then(response => { this.data = response.data; - resp = this.data.split("## ")[1]; - resp = resp.split('## ')[0]; +// resp = this.data.split("## ")[1]; +// resp = resp.split('## ')[0]; + resp = this.data; }) .catch(console.error); + // Cut so we only show this version + //var ShortAppVersion = '0.3.11'; + var ShortAppVersion = wtutils.ShortAppVersion; + resp = resp.substring(resp.indexOf("## V" + ShortAppVersion)); + resp = resp.substring(0, resp.indexOf("## V", 2)); // Remove link from lines const regex = /\([^)]*\)/ig; resp = resp.replaceAll(regex, ''); @@ -556,8 +559,6 @@ const github = new class GitHub { resp = resp.replaceAll('* [', '').replaceAll(']',''); // Split into an array resp = resp.split("\n"); - // Remove empty items - resp = resp.filter(item => item); return resp; }