Skip to content

Commit

Permalink
Apply fixes from master.
Browse files Browse the repository at this point in the history
  • Loading branch information
dscalzi committed Nov 25, 2023
1 parent 2279cb0 commit 9b1360b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions app/assets/js/renderer/megascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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'))
}
}

Expand All @@ -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) => {
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9b1360b

Please sign in to comment.