Enable remote launcher catalog source
Some checks failed
Build / release (macos-latest) (push) Has been cancelled
Build / release (ubuntu-latest) (push) Has been cancelled
Build / release (windows-latest) (push) Has been cancelled
Windows Smoke Test / windows-smoke (push) Has been cancelled

This commit is contained in:
2026-05-05 22:46:03 +09:00
parent 9e8fd9e74b
commit 87c56a21d5
11 changed files with 188 additions and 38 deletions

View File

@@ -6,6 +6,7 @@ const {
ensureJavaDirIsRoot
} = require('helios-core/java')
const CatalogManager = require('./assets/js/catalogmanager')
const DropinModUtil = require('./assets/js/dropinmodutil')
const { MSFT_OPCODE, MSFT_REPLY_TYPE, MSFT_ERROR } = require('./assets/js/ipcconstants')
const settingsBackButton = document.getElementById('settingsBackButton')
@@ -326,22 +327,45 @@ function settingsSaveDisabled(v){
settingsNavDone.disabled = v
}
function fullSettingsSave() {
async function refreshCatalogSourceViews(){
await CatalogManager.getInstalledProfiles()
CatalogManager.applyConfiguredProfile()
if(typeof refreshInstallView === 'function'){
await refreshInstallView()
}
if(typeof refreshLibraryView === 'function'){
await refreshLibraryView()
}
if(typeof refreshSelectedProfileButton === 'function'){
refreshSelectedProfileButton()
}
if(typeof refreshServerStatus === 'function'){
await refreshServerStatus(true)
}
}
async function fullSettingsSave() {
const previousCatalogSource = ConfigManager.getLibraryCatalogSource()
saveSettingsValues()
saveModConfiguration()
ConfigManager.save()
saveDropinModConfiguration()
saveShaderpackSettings()
if(previousCatalogSource !== ConfigManager.getLibraryCatalogSource()){
await refreshCatalogSourceViews()
}
}
/* Closes the settings view and saves all data. */
settingsNavDone.onclick = () => {
fullSettingsSave()
settingsNavDone.onclick = async () => {
await fullSettingsSave()
switchView(getCurrentView(), VIEWS.landing)
}
settingsBackButton.onclick = () => {
fullSettingsSave()
settingsBackButton.onclick = async () => {
await fullSettingsSave()
switchView(getCurrentView(), VIEWS.landing)
}