From ede3c6bf62b10d1f3acf6ef683ad528520cb1ee8 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Sat, 31 Aug 2024 17:13:36 +0200 Subject: [PATCH 1/7] feat: add reloading button on chapter selection panel, refactor: remove loading chapters file from filesystem, fix: Luanhcer was periodically fetching for the chapter declaration online, do it one time at loading now --- src/client/assets/js/index.js | 13 +- src/client/index.html | 2 +- src/server/minecraft.js | 24 +- yarn.lock | 11000 ++++++++++++++------------------ 4 files changed, 4764 insertions(+), 6275 deletions(-) diff --git a/src/client/assets/js/index.js b/src/client/assets/js/index.js index c85c7e8..b8b2f00 100644 --- a/src/client/assets/js/index.js +++ b/src/client/assets/js/index.js @@ -37,7 +37,7 @@ app = vue.createApp({ position: 'topRight', resetOnHover: true }) - setInterval(() => { + setTimeout(() => { ipcRenderer.send('pageReady') }, 500) }, @@ -98,11 +98,20 @@ app = vue.createApp({ this.displayCredits = 'block' }, updateModsInformations (content) { - this.modsInformations = content + if(content === null) { + this.modsInformations = [] + } else { + this.modsInformations = content + } }, getModsInformations () { return this.modsInformations }, + reloadChapters() { + this.updateModsInformations(null) + this.modsInformationsLoaded = true + ipcRenderer.send('pageReady') + }, showInfo (title, body) { iziToast.info({ title, diff --git a/src/client/index.html b/src/client/index.html index 3807469..411c34a 100644 --- a/src/client/index.html +++ b/src/client/index.html @@ -71,7 +71,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.