mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
Compare commits
5 Commits
808b078d98
...
ea250d565c
Author | SHA1 | Date | |
---|---|---|---|
|
ea250d565c | ||
|
490119987a | ||
|
d2aba8cf5c | ||
|
66efac7035 | ||
|
19d52beb2b |
@ -1,7 +1,7 @@
|
|||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-In6B8teKZQll5heMl9bS7CESTbGvuAt3VVV86BUQBDk='"/>
|
<meta charset="utf-8" http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-In6B8teKZQll5heMl9bS7CESTbGvuAt3VVV86BUQBDk='"/>
|
||||||
<title>Helios Launcher</title>
|
<title><%= lang('app.title') %></title>
|
||||||
<script src="./assets/js/scripts/uicore.js"></script>
|
<script src="./assets/js/scripts/uicore.js"></script>
|
||||||
<script src="./assets/js/scripts/uibinder.js"></script>
|
<script src="./assets/js/scripts/uibinder.js"></script>
|
||||||
<link type="text/css" rel="stylesheet" href="./assets/css/launcher.css">
|
<link type="text/css" rel="stylesheet" href="./assets/css/launcher.css">
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
const fs = require('fs-extra')
|
const fs = require('fs-extra')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const toml = require('toml')
|
const toml = require('toml')
|
||||||
|
const merge = require('lodash.merge')
|
||||||
|
|
||||||
let lang
|
let lang
|
||||||
|
|
||||||
exports.loadLanguage = function(id){
|
exports.loadLanguage = function(id){
|
||||||
lang = toml.parse(fs.readFileSync(path.join(__dirname, '..', 'lang', `${id}.toml`))) || {}
|
lang = merge(lang || {}, toml.parse(fs.readFileSync(path.join(__dirname, '..', 'lang', `${id}.toml`))) || {})
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.query = function(id, placeHolders){
|
exports.query = function(id, placeHolders){
|
||||||
@ -29,4 +30,17 @@ exports.queryJS = function(id, placeHolders){
|
|||||||
|
|
||||||
exports.queryEJS = function(id, placeHolders){
|
exports.queryEJS = function(id, placeHolders){
|
||||||
return exports.query(`ejs.${id}`, placeHolders)
|
return exports.query(`ejs.${id}`, placeHolders)
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.setupLanguage = function(){
|
||||||
|
// Load a Placeholder Language File for texts that do not require translation
|
||||||
|
exports.loadLanguage('_placeholder')
|
||||||
|
|
||||||
|
// Load Language Files
|
||||||
|
exports.loadLanguage('en_US')
|
||||||
|
// Uncomment this when translations are ready
|
||||||
|
//exports.loadLanguage('xx_XX')
|
||||||
|
|
||||||
|
// Load Custom Language File for Launcher Customizer
|
||||||
|
exports.loadLanguage('_custom')
|
||||||
}
|
}
|
@ -23,7 +23,7 @@ DistroAPI['commonDir'] = ConfigManager.getCommonDirectory()
|
|||||||
DistroAPI['instanceDir'] = ConfigManager.getInstanceDirectory()
|
DistroAPI['instanceDir'] = ConfigManager.getInstanceDirectory()
|
||||||
|
|
||||||
// Load Strings
|
// Load Strings
|
||||||
LangLoader.loadLanguage('en_US')
|
LangLoader.setupLanguage()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -202,7 +202,7 @@ const refreshMojangStatuses = async function(){
|
|||||||
const service = statuses[i]
|
const service = statuses[i]
|
||||||
|
|
||||||
const tooltipHTML = `<div class="mojangStatusContainer">
|
const tooltipHTML = `<div class="mojangStatusContainer">
|
||||||
<span class="mojangStatusIcon" style="color: ${MojangRestAPI.statusToHex(service.status)};">${Lang.queryEJS('landing.mojangStatus.icon')}</span>
|
<span class="mojangStatusIcon" style="color: ${MojangRestAPI.statusToHex(service.status)};">${Lang.queryJS('landing.mojangStatus.icon')}</span>
|
||||||
<span class="mojangStatusName">${service.name}</span>
|
<span class="mojangStatusName">${service.name}</span>
|
||||||
</div>`
|
</div>`
|
||||||
if(service.essential){
|
if(service.essential){
|
||||||
@ -335,7 +335,7 @@ async function asyncSystemScan(effectiveJavaOptions, launchAfter = true){
|
|||||||
$('#overlayContent').fadeOut(250, () => {
|
$('#overlayContent').fadeOut(250, () => {
|
||||||
//$('#overlayDismiss').toggle(false)
|
//$('#overlayDismiss').toggle(false)
|
||||||
setOverlayContent(
|
setOverlayContent(
|
||||||
Lang.queryJS('landing.systemScan.javaRequired'),
|
Lang.queryJS('landing.systemScan.javaRequired', { 'major': effectiveJavaOptions.suggestedMajor }),
|
||||||
Lang.queryJS('landing.systemScan.javaRequiredMessage', { 'major': effectiveJavaOptions.suggestedMajor }),
|
Lang.queryJS('landing.systemScan.javaRequiredMessage', { 'major': effectiveJavaOptions.suggestedMajor }),
|
||||||
Lang.queryJS('landing.systemScan.javaRequiredDismiss'),
|
Lang.queryJS('landing.systemScan.javaRequiredDismiss'),
|
||||||
Lang.queryJS('landing.systemScan.javaRequiredCancel')
|
Lang.queryJS('landing.systemScan.javaRequiredCancel')
|
||||||
@ -621,7 +621,7 @@ async function dlAsync(login = true) {
|
|||||||
DiscordWrapper.initRPC(distro.rawDistribution.discord, serv.rawServer.discord)
|
DiscordWrapper.initRPC(distro.rawDistribution.discord, serv.rawServer.discord)
|
||||||
hasRPC = true
|
hasRPC = true
|
||||||
proc.on('close', (code, signal) => {
|
proc.on('close', (code, signal) => {
|
||||||
loggerLaunchSuite.info(Lang.queryJS('landing.dlAsync.shuttingDownRPC'))
|
loggerLaunchSuite.info('Shutting down Discord Rich Presence..')
|
||||||
DiscordWrapper.shutdownRPC()
|
DiscordWrapper.shutdownRPC()
|
||||||
hasRPC = false
|
hasRPC = false
|
||||||
proc = null
|
proc = null
|
||||||
@ -738,7 +738,7 @@ let newsLoadingListener = null
|
|||||||
*/
|
*/
|
||||||
function setNewsLoading(val){
|
function setNewsLoading(val){
|
||||||
if(val){
|
if(val){
|
||||||
const nLStr = Lang.queryJS('landing.news.loading')
|
const nLStr = Lang.queryJS('landing.news.checking')
|
||||||
let dotStr = '..'
|
let dotStr = '..'
|
||||||
nELoadSpan.innerHTML = nLStr + dotStr
|
nELoadSpan.innerHTML = nLStr + dotStr
|
||||||
newsLoadingListener = setInterval(() => {
|
newsLoadingListener = setInterval(() => {
|
||||||
|
20
app/assets/lang/_custom.toml
Normal file
20
app/assets/lang/_custom.toml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Custom Language File for Launcher Customizer
|
||||||
|
|
||||||
|
[ejs.app]
|
||||||
|
title = "Helios Launcher"
|
||||||
|
|
||||||
|
[ejs.landing]
|
||||||
|
mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher"
|
||||||
|
mediaTwitterURL = "#"
|
||||||
|
mediaInstagramURL = "#"
|
||||||
|
mediaYouTubeURL = "#"
|
||||||
|
mediaDiscordURL = "https://discord.gg/zNWUXdt"
|
||||||
|
|
||||||
|
[ejs.settings]
|
||||||
|
sourceGithubLink = "https://github.com/dscalZi/HeliosLauncher"
|
||||||
|
supportLink = "https://github.com/dscalZi/HeliosLauncher/issues"
|
||||||
|
|
||||||
|
[ejs.welcome]
|
||||||
|
welcomeHeader = "WELCOME TO WESTEROSCRAFT"
|
||||||
|
welcomeDescription = "Our mission is to recreate the universe imagined by author George RR Martin in his fantasy series, A Song of Ice and Fire. Through the collaborative effort of thousands of community members, we have sought to create Westeros as accurately and precisely as possible within Minecraft. The world we are creating is yours to explore. Journey from Dorne to Castle Black, and if you aren’t afraid, beyond the Wall itself, but best not delay. As the words of House Stark ominously warn: Winter is Coming."
|
||||||
|
welcomeDescCTA = "You are just a few clicks away from Westeros."
|
19
app/assets/lang/_placeholder.toml
Normal file
19
app/assets/lang/_placeholder.toml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Placeholder Language File for texts that do not require translation
|
||||||
|
|
||||||
|
[ejs.landing]
|
||||||
|
newsArticleTitle = "Lorem Ipsum"
|
||||||
|
newsArticleDate = "Mar 15, 44 BC, 9:14 AM"
|
||||||
|
newsArticleAuthor = "by Cicero"
|
||||||
|
newsArticleComments = "0 Comments"
|
||||||
|
|
||||||
|
[ejs.overlay]
|
||||||
|
overlayTitle = "Lorem Ipsum:<br>Finis Illud"
|
||||||
|
overlayDesc = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.."
|
||||||
|
overlayAcknowledge = "Conare Iterum"
|
||||||
|
overlayDismiss = "Dismiss"
|
||||||
|
|
||||||
|
[ejs.settings]
|
||||||
|
versionValue = "0.0.1-alpha.18"
|
||||||
|
memoryTotalValue = "16G"
|
||||||
|
memoryAvailableValue = "7.3G"
|
||||||
|
javaExecVal = "null"
|
@ -3,11 +3,6 @@ updateAvailableTooltip = "Update Available"
|
|||||||
usernamePlaceholder = "Username"
|
usernamePlaceholder = "Username"
|
||||||
usernameEditButton = "Edit"
|
usernameEditButton = "Edit"
|
||||||
settingsTooltip = "Settings"
|
settingsTooltip = "Settings"
|
||||||
mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher"
|
|
||||||
mediaTwitterURL = "#"
|
|
||||||
mediaInstagramURL = "#"
|
|
||||||
mediaYouTubeURL = "#"
|
|
||||||
mediaDiscordURL = "https://discord.gg/zNWUXdt"
|
|
||||||
serverStatus = "SERVER"
|
serverStatus = "SERVER"
|
||||||
serverStatusPlaceholder = "OFFLINE"
|
serverStatusPlaceholder = "OFFLINE"
|
||||||
mojangStatus = "MOJANG STATUS"
|
mojangStatus = "MOJANG STATUS"
|
||||||
@ -19,10 +14,6 @@ launchButton = "PLAY"
|
|||||||
launchButtonPlaceholder = "• No Server Selected"
|
launchButtonPlaceholder = "• No Server Selected"
|
||||||
launchProgressLabel = "0%"
|
launchProgressLabel = "0%"
|
||||||
launchDetails = "Please wait.."
|
launchDetails = "Please wait.."
|
||||||
newsArticleTitle = "Lorem Ipsum"
|
|
||||||
newsArticleDate = "Mar 15, 44 BC, 9:14 AM"
|
|
||||||
newsArticleAuthor = "by Cicero"
|
|
||||||
newsArticleComments = "0 Comments"
|
|
||||||
newsNavigationStatus = "1 of 1"
|
newsNavigationStatus = "1 of 1"
|
||||||
newsErrorLoadSpan = "Checking for News.."
|
newsErrorLoadSpan = "Checking for News.."
|
||||||
newsErrorFailedSpan = "Failed to Load News"
|
newsErrorFailedSpan = "Failed to Load News"
|
||||||
@ -44,7 +35,7 @@ loginButtonText = "LOGIN"
|
|||||||
loginNeedAccountLink = "https://minecraft.net/store/minecraft-java-edition/"
|
loginNeedAccountLink = "https://minecraft.net/store/minecraft-java-edition/"
|
||||||
loginNeedAccountText = "Need an Account?"
|
loginNeedAccountText = "Need an Account?"
|
||||||
loginPasswordDisclaimer1 = "Your password is sent directly to mojang and never stored."
|
loginPasswordDisclaimer1 = "Your password is sent directly to mojang and never stored."
|
||||||
loginPasswordDisclaimer2 = "Helios Launcher is not affiliated with Mojang AB."
|
loginPasswordDisclaimer2 = "<%= lang('app.title') %> is not affiliated with Mojang AB."
|
||||||
|
|
||||||
[ejs.loginOptions]
|
[ejs.loginOptions]
|
||||||
loginOptionsTitle = "Login Options"
|
loginOptionsTitle = "Login Options"
|
||||||
@ -59,10 +50,6 @@ serverSelectCancel = "Cancel"
|
|||||||
accountSelectHeader = "Select an Account"
|
accountSelectHeader = "Select an Account"
|
||||||
accountSelectConfirm = "Select"
|
accountSelectConfirm = "Select"
|
||||||
accountSelectCancel = "Cancel"
|
accountSelectCancel = "Cancel"
|
||||||
overlayTitle = "Lorem Ipsum:<br>Finis Illud"
|
|
||||||
overlayDesc = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.."
|
|
||||||
overlayAcknowledge = "Conare Iterum"
|
|
||||||
overlayDismiss = "Dismiss"
|
|
||||||
|
|
||||||
[ejs.settings]
|
[ejs.settings]
|
||||||
navHeaderText = "Settings"
|
navHeaderText = "Settings"
|
||||||
@ -107,12 +94,9 @@ maxRAM = "Maximum RAM"
|
|||||||
minRAM = "Minimum RAM"
|
minRAM = "Minimum RAM"
|
||||||
memoryDesc = "The recommended minimum RAM is 3 gigabytes. Setting the minimum and maximum values to the same value may reduce lag."
|
memoryDesc = "The recommended minimum RAM is 3 gigabytes. Setting the minimum and maximum values to the same value may reduce lag."
|
||||||
memoryTotalTitle = "Total"
|
memoryTotalTitle = "Total"
|
||||||
memoryTotalValue = "16G"
|
|
||||||
memoryAvailableTitle = "Available"
|
memoryAvailableTitle = "Available"
|
||||||
memoryAvailableValue = "7.3G"
|
|
||||||
javaExecutableTitle = "Java Executable"
|
javaExecutableTitle = "Java Executable"
|
||||||
javaExecDetails = "Selected: Java 8 Update 172 (x64)"
|
javaExecDetails = "Selected: Java 8 Update 172 (x64)"
|
||||||
javaExecVal = "null"
|
|
||||||
javaExecSelDialogTitle = "Select Java Executable"
|
javaExecSelDialogTitle = "Select Java Executable"
|
||||||
javaExecSelButtonText = "Choose File"
|
javaExecSelButtonText = "Choose File"
|
||||||
javaExecDesc = "The Java executable is validated before game launch."
|
javaExecDesc = "The Java executable is validated before game launch."
|
||||||
@ -132,16 +116,13 @@ chooseFolder = "Choose Folder"
|
|||||||
dataDirectoryDesc = "All game files and local Java installations will be stored in the data directory.<br>Screenshots and world saves are stored in the instance folder for the corresponding server configuration."
|
dataDirectoryDesc = "All game files and local Java installations will be stored in the data directory.<br>Screenshots and world saves are stored in the instance folder for the corresponding server configuration."
|
||||||
aboutTabHeaderText = "About"
|
aboutTabHeaderText = "About"
|
||||||
aboutTabHeaderDesc = "View information and release notes for the current version."
|
aboutTabHeaderDesc = "View information and release notes for the current version."
|
||||||
aboutTitle = "Helios Launcher"
|
aboutTitle = "<%= lang('app.title') %>"
|
||||||
aboutCurrentVersionCheck = "Stable Release"
|
aboutCurrentVersionCheck = "Stable Release"
|
||||||
versionCheck = "✓"
|
versionCheck = "✓"
|
||||||
stableRelease = "Stable Release"
|
stableRelease = "Stable Release"
|
||||||
versionText = "Version "
|
versionText = "Version "
|
||||||
versionValue = "0.0.1-alpha.18"
|
|
||||||
sourceGithub = "Source (GitHub)"
|
sourceGithub = "Source (GitHub)"
|
||||||
sourceGithubLink = "https://github.com/dscalZi/HeliosLauncher"
|
|
||||||
support = "Support"
|
support = "Support"
|
||||||
supportLink = "https://github.com/dscalZi/HeliosLauncher/issues"
|
|
||||||
devToolsConsole = "DevTools Console"
|
devToolsConsole = "DevTools Console"
|
||||||
releaseNotes = "Release Notes"
|
releaseNotes = "Release Notes"
|
||||||
changelog = "Changelog"
|
changelog = "Changelog"
|
||||||
@ -158,9 +139,6 @@ updateReleaseNotes = "Update Release Notes"
|
|||||||
waitingText = "Waiting for Microsoft.."
|
waitingText = "Waiting for Microsoft.."
|
||||||
|
|
||||||
[ejs.welcome]
|
[ejs.welcome]
|
||||||
welcomeHeader = "WELCOME TO WESTEROSCRAFT"
|
|
||||||
welcomeDescription = "Our mission is to recreate the universe imagined by author George RR Martin in his fantasy series, A Song of Ice and Fire. Through the collaborative effort of thousands of community members, we have sought to create Westeros as accurately and precisely as possible within Minecraft. The world we are creating is yours to explore. Journey from Dorne to Castle Black, and if you aren’t afraid, beyond the Wall itself, but best not delay. As the words of House Stark ominously warn: Winter is Coming."
|
|
||||||
welcomeDescCTA = "You are just a few clicks away from Westeros."
|
|
||||||
continueButton = "CONTINUE"
|
continueButton = "CONTINUE"
|
||||||
|
|
||||||
|
|
||||||
@ -203,7 +181,7 @@ players = "PLAYERS"
|
|||||||
[js.landing.systemScan]
|
[js.landing.systemScan]
|
||||||
checking = "Checking system info.."
|
checking = "Checking system info.."
|
||||||
noCompatibleJava = "No Compatible<br>Java Installation Found"
|
noCompatibleJava = "No Compatible<br>Java Installation Found"
|
||||||
installJavaMessage = "In order to join WesterosCraft, you need a 64-bit installation of Java {major}. Would you like us to install a copy?"
|
installJavaMessage = "In order to launch Minecraft, you need a 64-bit installation of Java {major}. Would you like us to install a copy?"
|
||||||
installJava = "Install Java"
|
installJava = "Install Java"
|
||||||
installJavaManually = "Install Manually"
|
installJavaManually = "Install Manually"
|
||||||
javaDownloadPrepare = "Preparing Java Download.."
|
javaDownloadPrepare = "Preparing Java Download.."
|
||||||
@ -235,7 +213,6 @@ preparingToLaunch = "Preparing to launch.."
|
|||||||
launchingGame = "Launching game.."
|
launchingGame = "Launching game.."
|
||||||
launchWrapperNotDownloaded = "The main file, LaunchWrapper, failed to download properly. As a result, the game cannot launch.<br><br>To fix this issue, temporarily turn off your antivirus software and launch the game again.<br><br>If you have time, please <a href=\"https://github.com/dscalzi/HeliosLauncher/issues\">submit an issue</a> and let us know what antivirus software you use. We'll contact them and try to straighten things out."
|
launchWrapperNotDownloaded = "The main file, LaunchWrapper, failed to download properly. As a result, the game cannot launch.<br><br>To fix this issue, temporarily turn off your antivirus software and launch the game again.<br><br>If you have time, please <a href=\"https://github.com/dscalzi/HeliosLauncher/issues\">submit an issue</a> and let us know what antivirus software you use. We'll contact them and try to straighten things out."
|
||||||
doneEnjoyServer = "Done. Enjoy the server!"
|
doneEnjoyServer = "Done. Enjoy the server!"
|
||||||
shuttingDownRPC = "Shutting down Discord Rich Presence.."
|
|
||||||
checkConsoleForDetails = "Please check the console (CTRL + Shift + i) for more details."
|
checkConsoleForDetails = "Please check the console (CTRL + Shift + i) for more details."
|
||||||
|
|
||||||
[js.landing.news]
|
[js.landing.news]
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<% } else{ %>
|
<% } else{ %>
|
||||||
<div id="frameContentWin">
|
<div id="frameContentWin">
|
||||||
<div id="frameTitleDock">
|
<div id="frameTitleDock">
|
||||||
<span id="frameTitleText">Helios Launcher</span>
|
<span id="frameTitleText"><%= lang('app.title') %></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="frameButtonDockWin">
|
<div id="frameButtonDockWin">
|
||||||
<button class="frameButton fMb" id="frameButton_minimize" tabIndex="-1">
|
<button class="frameButton fMb" id="frameButton_minimize" tabIndex="-1">
|
||||||
|
@ -245,7 +245,7 @@
|
|||||||
<button class="settingsFileSelButton" id="settingsJavaExecSel" dialogTitle="<%- lang('settings.javaExecSelDialogTitle') %>" dialogDirectory="false"><%- lang('settings.javaExecSelButtonText') %></button>
|
<button class="settingsFileSelButton" id="settingsJavaExecSel" dialogTitle="<%- lang('settings.javaExecSelDialogTitle') %>" dialogDirectory="false"><%- lang('settings.javaExecSelButtonText') %></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="settingsFileSelDesc"><%- lang('settings.javaExecDesc') %> <strong id="settingsJavaReqDesc"><%- lang('settings.javaReqDesc') %></strong><br><%- lang('settings.javaPathDesc', {'pathSuffix': `bin${process.platform === 'win32' ? '\\\\javaw.exe' : '/java'}`}) %></div>
|
<div class="settingsFileSelDesc"><%- lang('settings.javaExecDesc') %> <strong id="settingsJavaReqDesc"><%- lang('settings.javaReqDesc') %></strong><br><%- lang('settings.javaPathDesc', {'pathSuffix': `bin${process.platform === 'win32' ? '\\javaw.exe' : '/java'}`}) %></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="settingsJVMOptsContainer">
|
<div id="settingsJVMOptsContainer">
|
||||||
<div id="settingsJVMOptsTitle"><%- lang('settings.jvmOptsTitle') %></div>
|
<div id="settingsJVMOptsTitle"><%- lang('settings.jvmOptsTitle') %></div>
|
||||||
@ -266,7 +266,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<input id="settingsJVMOptsVal" cValue="JVMOptions" serverDependent type="text">
|
<input id="settingsJVMOptsVal" cValue="JVMOptions" serverDependent type="text">
|
||||||
</div>
|
</div>
|
||||||
<div id="settingsJVMOptsDesc"><%- lang('settings.jvmOptsDesc') %><br><a href="<%- lang('settings.jvmOptsLink') %>" id="settingsJvmOptsLink"><%- evalEjs(lang('settings.jvmOptsLinkText')) %></a></div>
|
<div id="settingsJVMOptsDesc"><%- lang('settings.jvmOptsDesc') %><br><a href="<%- lang('settings.jvmOptsLink') %>" id="settingsJvmOptsLink"><%- lang('settings.jvmOptsLinkText') %></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="settingsTabLauncher" class="settingsTab" style="display: none;">
|
<div id="settingsTabLauncher" class="settingsTab" style="display: none;">
|
||||||
|
6
index.js
6
index.js
@ -12,10 +12,10 @@ const path = require('path')
|
|||||||
const semver = require('semver')
|
const semver = require('semver')
|
||||||
const { pathToFileURL } = require('url')
|
const { pathToFileURL } = require('url')
|
||||||
const { AZURE_CLIENT_ID, MSFT_OPCODE, MSFT_REPLY_TYPE, MSFT_ERROR, SHELL_OPCODE } = require('./app/assets/js/ipcconstants')
|
const { AZURE_CLIENT_ID, MSFT_OPCODE, MSFT_REPLY_TYPE, MSFT_ERROR, SHELL_OPCODE } = require('./app/assets/js/ipcconstants')
|
||||||
|
const LangLoader = require('./app/assets/js/langloader')
|
||||||
|
|
||||||
// Setup Lang
|
// Setup Lang
|
||||||
const LangLoader = require('./app/assets/js/langloader')
|
LangLoader.setupLanguage()
|
||||||
LangLoader.loadLanguage('en_US')
|
|
||||||
|
|
||||||
// Setup auto updater.
|
// Setup auto updater.
|
||||||
function initAutoUpdater(event, data) {
|
function initAutoUpdater(event, data) {
|
||||||
@ -243,7 +243,7 @@ function createWindow() {
|
|||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
bkid: Math.floor((Math.random() * fs.readdirSync(path.join(__dirname, 'app', 'assets', 'images', 'backgrounds')).length)),
|
bkid: Math.floor((Math.random() * fs.readdirSync(path.join(__dirname, 'app', 'assets', 'images', 'backgrounds')).length)),
|
||||||
lang: LangLoader.queryEJS,
|
lang: (str) => ejs.render(LangLoader.queryEJS(str), data),
|
||||||
evalEjs: (str) => ejs.render(str, data)
|
evalEjs: (str) => ejs.render(str, data)
|
||||||
}
|
}
|
||||||
Object.entries(data).forEach(([key, val]) => ejse.data(key, val))
|
Object.entries(data).forEach(([key, val]) => ejse.data(key, val))
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
"helios-core": "~2.0.5",
|
"helios-core": "~2.0.5",
|
||||||
"helios-distribution-types": "^1.2.0",
|
"helios-distribution-types": "^1.2.0",
|
||||||
"jquery": "^3.7.0",
|
"jquery": "^3.7.0",
|
||||||
|
"lodash.merge": "^4.6.2",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"toml": "^3.0.0"
|
"toml": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user