From fe5590287e2a051305249cc63d4d89fe1f4bd13f Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Sun, 21 Jan 2024 23:21:16 +0300 Subject: [PATCH] prod --- app/assets/js/configmanager.js | 2 +- app/assets/js/distromanager.js | 3 ++- app/assets/js/processbuilder.js | 13 +++++++++---- app/assets/js/scripts/loginOptions.js | 1 + app/assets/js/scripts/loginSkirdaDiscord.js | 8 ++++---- app/landing.ejs | 6 +++--- app/loginSkirdaDiscord.ejs | 1 - dev-app-update.yml | 7 ++++--- package-lock.json | 4 ++-- package.json | 3 ++- 10 files changed, 28 insertions(+), 20 deletions(-) diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index 24f317b..2aff420 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -7,7 +7,7 @@ const logger = LoggerUtil.getLogger('ConfigManager') const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME) -const dataPath = path.join(sysRoot, '.helioslauncher') +const dataPath = path.join(sysRoot, '.skirdalauncher') const launcherDir = require('@electron/remote').app.getPath('userData') diff --git a/app/assets/js/distromanager.js b/app/assets/js/distromanager.js index 805b060..e2b7278 100644 --- a/app/assets/js/distromanager.js +++ b/app/assets/js/distromanager.js @@ -6,8 +6,9 @@ const ConfigManager = require('./configmanager') // exports.REMOTE_DISTRO_URL = 'http://mc.westeroscraft.com/WesterosCraftLauncher/distribution.json' // exports.REMOTE_DISTRO_URL = 'https://skirda-minecraft-distribution.brzezinski.ru/distribution.json' // exports.REMOTE_DISTRO_URL = 'https://helios-files.geekcorner.eu.org/distribution.json' -exports.REMOTE_DISTRO_URL = 'http://192.168.88.10:8081/distribution/manifest' +// exports.REMOTE_DISTRO_URL = 'http://192.168.88.10:8081/distribution/manifest' // exports.REMOTE_DISTRO_URL = 'http://skirda-nebula.brzezinski.ru/distribution/manifest' +exports.REMOTE_DISTRO_URL = 'http://skirda-nebula.brzezinski.ru/distribution.json' // exports.REMOTE_DISTRO_URL = 'http://gregbrzezinski:8080/distribution/manifest' // exports.REMOTE_DISTRO_URL = 'http://localhost:8080/distribution/files/files/distribution.json' diff --git a/app/assets/js/processbuilder.js b/app/assets/js/processbuilder.js index 2f6c180..8038d9d 100644 --- a/app/assets/js/processbuilder.js +++ b/app/assets/js/processbuilder.js @@ -406,10 +406,15 @@ class ProcessBuilder { // Debug securejarhandler // args.push('-Dbsl.debug=true') - args.push('-Dminecraft.api.auth.host=http://localhost:8083/yggdrasil/auth') - args.push('-Dminecraft.api.account.host=http://localhost:8083/yggdrasil/account') - args.push('-Dminecraft.api.session.host=http://localhost:8083/yggdrasil') - args.push('-Dminecraft.api.services.host=http://localhost:8083/yggdrasil/services') + // args.push('-Dminecraft.api.auth.host=http://localhost:8083/yggdrasil/auth') + // args.push('-Dminecraft.api.account.host=http://localhost:8083/yggdrasil/account') + // args.push('-Dminecraft.api.session.host=http://localhost:8083/yggdrasil') + // args.push('-Dminecraft.api.services.host=http://localhost:8083/yggdrasil/services') + + args.push('-Dminecraft.api.auth.host=https://skirda-auth.brzezinski.ru/yggdrasil/auth') + args.push('-Dminecraft.api.account.host=https://skirda-auth.brzezinski.ru/yggdrasil/account') + args.push('-Dminecraft.api.session.host=https://skirda-auth.brzezinski.ru/yggdrasil') + args.push('-Dminecraft.api.services.host=https://skirda-auth.brzezinski.ru/yggdrasil/services') if(this.modManifest.arguments.jvm != null) { for(const argStr of this.modManifest.arguments.jvm) { diff --git a/app/assets/js/scripts/loginOptions.js b/app/assets/js/scripts/loginOptions.js index ef7a528..ab2a338 100644 --- a/app/assets/js/scripts/loginOptions.js +++ b/app/assets/js/scripts/loginOptions.js @@ -48,6 +48,7 @@ loginOptionOffline.onclick = (e) => { } loginOptionSkirdaDiscord.onclick = (e) => { + InitSkirdaDiscordLogin() switchView(getCurrentView(), VIEWS.loginSkirdaDiscord, 500, 500, () => { loginViewOnSuccess = loginOptionsViewOnLoginSuccess loginViewOnCancel = loginOptionsViewOnLoginCancel diff --git a/app/assets/js/scripts/loginSkirdaDiscord.js b/app/assets/js/scripts/loginSkirdaDiscord.js index 923145b..050eb43 100644 --- a/app/assets/js/scripts/loginSkirdaDiscord.js +++ b/app/assets/js/scripts/loginSkirdaDiscord.js @@ -1,8 +1,8 @@ // const http = require('http') // const fs = require('fs') // const {addSkirdaAccount} = require('configmanager') -const auth_api_url = 'http://192.168.88.10:8083' -// const auth_api_url = 'http://skirda-auth.brzezinski.ru' +// const auth_api_url = 'http://192.168.88.10:8083' +const auth_api_url = 'http://skirda-auth.brzezinski.ru' class SkirdaDiscordAuth{ /** @@ -107,7 +107,7 @@ class SkirdaDiscordAuth{ const skAuth = new SkirdaDiscordAuth() const loginSkirdaDiscordButton = document.getElementById('loginSkirdaDiscordInitAuth') -loginSkirdaDiscordButton.addEventListener('click', async () =>{ +async function InitSkirdaDiscordLogin (){ const res = await skAuth.Init() const redir = JSON.parse(res) //FIXME @@ -130,4 +130,4 @@ loginSkirdaDiscordButton.addEventListener('click', async () =>{ setTimeout(() => { switchView(VIEWS.loginSkirdaDiscord, VIEWS.landing, 500, 500) }, 1000) -}) +} diff --git a/app/landing.ejs b/app/landing.ejs index 3533147..3e8ef9b 100644 --- a/app/landing.ejs +++ b/app/landing.ejs @@ -64,7 +64,7 @@
-
-
+
diff --git a/app/loginSkirdaDiscord.ejs b/app/loginSkirdaDiscord.ejs index 10cc900..ad46af8 100644 --- a/app/loginSkirdaDiscord.ejs +++ b/app/loginSkirdaDiscord.ejs @@ -12,7 +12,6 @@
- --> В случае, если это не произошло, откройте его самостоятельно
diff --git a/dev-app-update.yml b/dev-app-update.yml index aa7ce8f..0135df7 100644 --- a/dev-app-update.yml +++ b/dev-app-update.yml @@ -1,3 +1,4 @@ -owner: dscalzi -repo: HeliosLauncher -provider: github +owner: Skirda +repo: SkirdaElectronLauncher +provider: generic +url: \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6eeb456..d50370d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@electron/remote": "^2.1.0", "adm-zip": "^0.5.9", + "bluebird": "^3.7.2", "discord-rpc-patch": "^4.0.1", "ejs": "^3.1.9", "ejs-electron": "^2.1.1", @@ -922,8 +923,7 @@ "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/bluebird-lst": { "version": "1.0.9", diff --git a/package.json b/package.json index cf843b5..cf219ee 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "dependencies": { "@electron/remote": "^2.1.0", "adm-zip": "^0.5.9", + "bluebird": "^3.7.2", "discord-rpc-patch": "^4.0.1", "ejs": "^3.1.9", "ejs-electron": "^2.1.1", @@ -49,4 +50,4 @@ "type": "git", "url": "git+https://github.com/dscalzi/HeliosLauncher.git" } -} \ No newline at end of file +}