mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2025-01-02 17:12:13 -08:00
Apply fixes from master.
This commit is contained in:
parent
2279cb05b7
commit
9b1360b214
@ -781,7 +781,7 @@ async function toggleServerSelection(toggleState){
|
||||
* @param {string} acknowledge Acknowledge button text.
|
||||
* @param {string} dismiss Dismiss button text.
|
||||
*/
|
||||
function setOverlayContent(title, description, acknowledge, dismiss = 'Dismiss'){
|
||||
function setOverlayContent(title, description, acknowledge, dismiss = Lang.queryJS('overlay.dismiss')){
|
||||
document.getElementById('overlayTitle').innerHTML = title
|
||||
document.getElementById('overlayDesc').innerHTML = description
|
||||
document.getElementById('overlayAcknowledge').innerHTML = acknowledge
|
||||
@ -2175,7 +2175,7 @@ function bindDropinModsRemoveButton(){
|
||||
setOverlayContent(
|
||||
Lang.queryJS('settings.dropinMods.deleteFailedTitle', { fullName }),
|
||||
Lang.queryJS('settings.dropinMods.deleteFailedMessage'),
|
||||
Lang.queryJS('settings.okButton')
|
||||
Lang.queryJS('settings.dropinMods.okButton')
|
||||
)
|
||||
setOverlayHandler(null)
|
||||
toggleOverlay(true)
|
||||
@ -2230,7 +2230,7 @@ function saveDropinModConfiguration(){
|
||||
setOverlayContent(
|
||||
Lang.queryJS('settings.dropinMods.failedToggleTitle'),
|
||||
err.message,
|
||||
Lang.queryJS('settings.okButton')
|
||||
Lang.queryJS('settings.dropinMods.okButton')
|
||||
)
|
||||
setOverlayHandler(null)
|
||||
toggleOverlay(true)
|
||||
@ -3431,7 +3431,7 @@ async function dlAsync(login = true) {
|
||||
const onLoadComplete = () => {
|
||||
toggleLaunchArea(false)
|
||||
if(hasRPC){
|
||||
DiscordWrapper.updateDetails('Loading game..')
|
||||
DiscordWrapper.updateDetails(Lang.queryJS('landing.discord.loading'))
|
||||
proc.stdout.on('data', gameStateChange)
|
||||
}
|
||||
proc.stdout.removeListener('data', tempListener)
|
||||
@ -3458,9 +3458,9 @@ async function dlAsync(login = true) {
|
||||
const gameStateChange = function(data){
|
||||
data = data.trim()
|
||||
if(SERVER_JOINED_REGEX.test(data)){
|
||||
DiscordWrapper.updateDetails('Exploring the Realm!')
|
||||
DiscordWrapper.updateDetails(Lang.queryJS('landing.discord.joined'))
|
||||
} else if(GAME_JOINED_REGEX.test(data)){
|
||||
DiscordWrapper.updateDetails('Sailing to Westeros!')
|
||||
DiscordWrapper.updateDetails(Lang.queryJS('landing.discord.joining'))
|
||||
}
|
||||
}
|
||||
|
||||
@ -3483,7 +3483,7 @@ async function dlAsync(login = true) {
|
||||
setLaunchDetails(Lang.queryJS('landing.dlAsync.doneEnjoyServer'))
|
||||
|
||||
// Init Discord Hook
|
||||
if(distro.rawDistribution.discord != null && serv.rawServerdiscord != null){
|
||||
if(distro.rawDistribution.discord != null && serv.rawServer.discord != null){
|
||||
DiscordWrapper.initRPC(distro.rawDistribution.discord, serv.rawServer.discord)
|
||||
hasRPC = true
|
||||
proc.on('close', (code, signal) => {
|
||||
|
6
index.js
6
index.js
@ -19,7 +19,7 @@ const { DistroAPI } = require('./app/assets/js/main/distromanager')
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { HeliosDistribution } = require('helios-core/common')
|
||||
const { LoggerUtil } = require('helios-core')
|
||||
const { getLang, setupLanguage, queryEJS } = require('./app/assets/js/main/langloader')
|
||||
const { getLang, setupLanguage, queryEJS, queryJS } = require('./app/assets/js/main/langloader')
|
||||
|
||||
const logger = LoggerUtil.getLogger('Preloader')
|
||||
|
||||
@ -257,7 +257,7 @@ ipcMain.on(MSFT_OPCODE.OPEN_LOGIN, (ipcEvent, ...arguments_) => {
|
||||
msftAuthViewSuccess = arguments_[0]
|
||||
msftAuthViewOnClose = arguments_[1]
|
||||
msftAuthWindow = new BrowserWindow({
|
||||
title: LangLoader.queryJS('index.microsoftLoginTitle'),
|
||||
title: queryJS('index.microsoftLoginTitle'),
|
||||
backgroundColor: '#222222',
|
||||
width: 520,
|
||||
height: 600,
|
||||
@ -310,7 +310,7 @@ ipcMain.on(MSFT_OPCODE.OPEN_LOGOUT, (ipcEvent, uuid, isLastAccount) => {
|
||||
msftLogoutSuccess = false
|
||||
msftLogoutSuccessSent = false
|
||||
msftLogoutWindow = new BrowserWindow({
|
||||
title: LangLoader.queryJS('index.microsoftLogoutTitle'),
|
||||
title: queryJS('index.microsoftLogoutTitle'),
|
||||
backgroundColor: '#222222',
|
||||
width: 520,
|
||||
height: 600,
|
||||
|
Loading…
Reference in New Issue
Block a user