diff --git a/httpGUI/python-patcher-index.js b/httpGUI/python-patcher-index.js index 02fe6cf4..354d0831 100644 --- a/httpGUI/python-patcher-index.js +++ b/httpGUI/python-patcher-index.js @@ -105,7 +105,7 @@ window.onload = function onWindowLoaded() { }, methods: { nav(gameName) { - setModNameAndNavigate(gameName); + setModNameAndNavigate(gameName, gameName.toLowerCase().includes('umineko') ? 'umineko-warning.html' : 'installer.html'); }, // if subModExtraProperties missing a game, use wrong image // to make it obvious that the table needs to be updated diff --git a/httpGUI/python-patcher-rest-lib.js b/httpGUI/python-patcher-rest-lib.js index e0a6ac55..e03f8d36 100644 --- a/httpGUI/python-patcher-rest-lib.js +++ b/httpGUI/python-patcher-rest-lib.js @@ -103,11 +103,11 @@ function doPost(requestType, requestData, onSuccessCallback, timeout, onErrorCal } // TODO: should always navigate to the same install page, as it is shared amongst all games -function setModNameAndNavigate(modName) { +function setModNameAndNavigate(modName, targetURL) { doPost('setModName', { modName }, (response) => { console.log(response); if (response.valid) { - window.location.href = 'installer.html'; + window.location.href = targetURL ?? 'installer.html'; } else { alert(`Error: "${modName}" is not the name of a mod in the JSON config file. Check web console for a list of valid mod names`); console.error('Invalid Mod Name! Valid names below:'); diff --git a/httpGUI/python-patcher-umineko-warning.js b/httpGUI/python-patcher-umineko-warning.js new file mode 100644 index 00000000..33719189 --- /dev/null +++ b/httpGUI/python-patcher-umineko-warning.js @@ -0,0 +1,86 @@ +'use strict'; + +let app = null; + +// +// TODO: use proper javascript import +// When the main window is loaded +// - Vue components are defined +// - Main Vue instance, called 'app', is initialized +// - the subModHandles are retrieved from the python server to populate the app.subModList property +window.onload = function onWindowLoaded() { + + // Forces all links which have been sanitized to open in new window (in this case, markdown links) + // See https://github.com/cure53/DOMPurify/issues/317#issuecomment-698800327 + DOMPurify.addHook('afterSanitizeAttributes', (node) => { + if ('target' in node) { + node.setAttribute('target', '_blank'); + node.setAttribute('rel', 'noopener'); + } + }); + + app = new Vue({ + el: '#app', + data: { + subModList: [], + masonryInitialized: false, + donationProgress: 'N months', + donationMonthsRemaining: 'XXX%', + metaInfo: { + buildInfo: '', // Installer Build Version and Date + installerIsLatest: [null, ''], // 2- Tuple of whether installer is latest, and description of version information + lockFileExists: false, // This indicates if a install is already running in a different instance, or a previous install was killed while running + operatingSystem: '', // The operating system - either 'windows', 'linux', or 'mac' + installAlreadyInProgress: false, // This is true if the install is currently running. Use to resume displaying an ongoing installation if the user accidentally closed the browser tab. + donationMonthsRemaining: '', // How many months the server can be paid for with current funding + donationProgressPercent: '', // How close funding is to the 12 month donation goal, in percent + }, + modalVisible: false, + }, + methods: { + nav(gameName) { + setModNameAndNavigate(gameName); + }, + clearModal() { + doPost('clearLatestInstallerWarning', [], () => {}); + this.modalVisible = false; + }, + }, + computed: { + versionInfoAvailable() { + return this.metaInfo.installerIsLatest[0] !== null; + }, + }, + watch: { + + }, + updated() { + // call initializeMasonry() from the theme's javascript js/script.js, on the first update call + if (!this.masonryInitialized) { + this.masonryInitialized = true; + initializeMasonry(); + } + }, + created() { + // populate the app.subModList with subMods from the python server + doPost('subModHandles', [], (responseData) => { + app.subModList = responseData.subModHandles; + const modNameToSubModHandleMap = {}; + console.log(responseData); + responseData.subModHandles.forEach((subModHandle) => { + modNameToSubModHandleMap[subModHandle.modName] = subModHandle; + }); + + app.metaInfo = responseData.metaInfo; + if (app.metaInfo.installerIsLatest[0] !== true) { + app.modalVisible = true; + } + + // Force user back to the install page if the tried to leave + if (app.metaInfo.installAlreadyInProgress) { + window.location = 'installer.html'; + } + }); + }, + }); +}; diff --git a/httpGUI/style.css b/httpGUI/style.css index 5188cde6..e9e7796c 100644 --- a/httpGUI/style.css +++ b/httpGUI/style.css @@ -386,3 +386,25 @@ The snackbar - position it at the bottom and in the middle of the screen */ font-weight: bold; color: black; } + +.button-tabs .warning-tab-title { + padding: 13px; + display: inline-block; + text-align: center; + min-width: 150px; + background: red; + color: #fff; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + transition: all 0.3s ease; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; +} + +.button-tabs .warning-tab-title:hover { + background: brown; +} \ No newline at end of file diff --git a/httpGUI/umineko-warning.html b/httpGUI/umineko-warning.html new file mode 100644 index 00000000..7c8471c1 --- /dev/null +++ b/httpGUI/umineko-warning.html @@ -0,0 +1,189 @@ + + + + + + + 07th-Mod Installer Index + + + + + + + + + + +
+ + + + +
+ +
+
+
+
+

Alternate Mod Recommendation

+
+
+ +
+
+
+
+ +
+
+ + +
+
Alternate mod recommendation
+

The 07th-Mod patches for Tsubasa, Hane and Saku were never fully completed. As of now, the Hane patch is the only one to have full voice and widescreen support, while the other two are simple graphic replacement packs with console sprites. All patches are also missing CGs and advanced features such as animations and lip sync.

+ +

If you are able to emulate or hack a Nintendo Switch we recommend patching the Switch game to run in English instead. You may find instructions on how to do so here.

+ +

The legacy patches will remain available for download in their unfinished state. If you are certain you would like to play with them, you may download them here.

+
+ +
+
+ + + This patch installs all PS3 content that the team has ported so far: +
    +
  • Has ADV mode, where text is shown in a textbox at the bottom of the screen. In the Question Arcs only, this can be toggled on or off at any time.
  • +
  • Japanese Text is ONLY supported with the Experimental Script option
  • +
  • PS3 voices
  • +
  • PS3 sprites
  • +
  • PS3 CGs (event images)
  • +
  • PS3 Backgrounds
  • +
  • Remake of original OP with PS3 graphics OR (spoilery) PS3 Game's OP movie (user option on startup)
  • +
  • DOES NOT add shader effects or lipsync from the PS3 game.
  • +
+ +
+
+ + + + + + + + + + + + + + + + + +
Alchemist/PS3 spritesMangagamer/Pachinko spritesRyukishi sprites
+ +
+
+ + + + +
+
+ +
+
+

Donation Status

+

+ Server time remaining: {{ metaInfo.donationMonthsRemaining }} months
+ This year's funding goal is {{ metaInfo.donationProgressPercent }}% complete.
+ Click Here to Donate!
+

+
+
{{ metaInfo.buildInfo }}
+
+
+
+ + + + + + + + + + + + + + + +