From 5c74c9b48d1be50817aa42095c3c825e92198fca Mon Sep 17 00:00:00 2001 From: drojf <1249449+drojf@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:07:29 +1000 Subject: [PATCH] Allow updating Landing Banner text remotely --- README.md | 16 ++++++++++++++++ httpGUI.py | 1 + httpGUI/index.html | 4 +--- httpGUI/python-patcher-index.js | 5 ++++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8baf29e9..5eb42aca 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,22 @@ This repository contains the mod installer, used for installing all 07th-mod mod **The below information is for developers only.** +## Common Installer tasks HOWTO + +### Updating landing page and mod page "update" banners + +The HTML for the landing page and update banners for each mod is dynamically fetched from this github repo [https://github.com/07th-mod/python-patcher-updates](https://github.com/07th-mod/python-patcher-updates). + +To update the html: + + - Edit and save the appropriate HTML file + - Push the commit to the repo + - Wait for the release to be published automatically (normally takes 15-30 seconds) + +Currently only the landing page and Hou+ implement this updateable html function. + +More detail is available in the `Readme.md` page on that repo. + ## Python Development Environment Setup If you have no preference for IDE, I would recommend `Pycharm` as it will help reduce mistakes while you're writing your code. Please conform to the follwing guidelines: diff --git a/httpGUI.py b/httpGUI.py index 5380f4a9..06852e62 100644 --- a/httpGUI.py +++ b/httpGUI.py @@ -920,6 +920,7 @@ def getSubModHandlesRequestHandler(requestData): 'lastSubModID': self.lastSubModID, # The ID of the last submod installed to - only valid if an install is currently running. 'donationMonthsRemaining': self.donationMonthsRemaining, # How many months the server can be paid for with current funding 'donationProgressPercent': self.donationProgressPercent, # How close funding is to the 12 month donation goal, in percent + 'landingBannerHTML': self.getUpdate('Landing Banner'), # HTML for the index page landing banner }, } diff --git a/httpGUI/index.html b/httpGUI/index.html index 84ae08d4..5dfd3e7a 100644 --- a/httpGUI/index.html +++ b/httpGUI/index.html @@ -63,9 +63,7 @@