This commit is contained in:
cyber-dream 2024-01-21 23:21:16 +03:00
parent 3e8f52a200
commit fe5590287e
10 changed files with 28 additions and 20 deletions

View File

@ -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 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') const launcherDir = require('@electron/remote').app.getPath('userData')

View File

@ -6,8 +6,9 @@ const ConfigManager = require('./configmanager')
// exports.REMOTE_DISTRO_URL = 'http://mc.westeroscraft.com/WesterosCraftLauncher/distribution.json' // 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://skirda-minecraft-distribution.brzezinski.ru/distribution.json'
// exports.REMOTE_DISTRO_URL = 'https://helios-files.geekcorner.eu.org/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/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://gregbrzezinski:8080/distribution/manifest'
// exports.REMOTE_DISTRO_URL = 'http://localhost:8080/distribution/files/files/distribution.json' // exports.REMOTE_DISTRO_URL = 'http://localhost:8080/distribution/files/files/distribution.json'

View File

@ -406,10 +406,15 @@ class ProcessBuilder {
// Debug securejarhandler // Debug securejarhandler
// args.push('-Dbsl.debug=true') // args.push('-Dbsl.debug=true')
args.push('-Dminecraft.api.auth.host=http://localhost:8083/yggdrasil/auth') // 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.account.host=http://localhost:8083/yggdrasil/account')
args.push('-Dminecraft.api.session.host=http://localhost:8083/yggdrasil') // 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.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) { if(this.modManifest.arguments.jvm != null) {
for(const argStr of this.modManifest.arguments.jvm) { for(const argStr of this.modManifest.arguments.jvm) {

View File

@ -48,6 +48,7 @@ loginOptionOffline.onclick = (e) => {
} }
loginOptionSkirdaDiscord.onclick = (e) => { loginOptionSkirdaDiscord.onclick = (e) => {
InitSkirdaDiscordLogin()
switchView(getCurrentView(), VIEWS.loginSkirdaDiscord, 500, 500, () => { switchView(getCurrentView(), VIEWS.loginSkirdaDiscord, 500, 500, () => {
loginViewOnSuccess = loginOptionsViewOnLoginSuccess loginViewOnSuccess = loginOptionsViewOnLoginSuccess
loginViewOnCancel = loginOptionsViewOnLoginCancel loginViewOnCancel = loginOptionsViewOnLoginCancel

View File

@ -1,8 +1,8 @@
// const http = require('http') // const http = require('http')
// const fs = require('fs') // const fs = require('fs')
// const {addSkirdaAccount} = require('configmanager') // const {addSkirdaAccount} = require('configmanager')
const auth_api_url = 'http://192.168.88.10:8083' // const auth_api_url = 'http://192.168.88.10:8083'
// const auth_api_url = 'http://skirda-auth.brzezinski.ru' const auth_api_url = 'http://skirda-auth.brzezinski.ru'
class SkirdaDiscordAuth{ class SkirdaDiscordAuth{
/** /**
@ -107,7 +107,7 @@ class SkirdaDiscordAuth{
const skAuth = new SkirdaDiscordAuth() const skAuth = new SkirdaDiscordAuth()
const loginSkirdaDiscordButton = document.getElementById('loginSkirdaDiscordInitAuth') const loginSkirdaDiscordButton = document.getElementById('loginSkirdaDiscordInitAuth')
loginSkirdaDiscordButton.addEventListener('click', async () =>{ async function InitSkirdaDiscordLogin (){
const res = await skAuth.Init() const res = await skAuth.Init()
const redir = JSON.parse(res) //FIXME const redir = JSON.parse(res) //FIXME
@ -130,4 +130,4 @@ loginSkirdaDiscordButton.addEventListener('click', async () =>{
setTimeout(() => { setTimeout(() => {
switchView(VIEWS.loginSkirdaDiscord, VIEWS.landing, 500, 500) switchView(VIEWS.loginSkirdaDiscord, VIEWS.landing, 500, 500)
}, 1000) }, 1000)
}) }

View File

@ -64,7 +64,7 @@
<div id="center"> <div id="center">
<div class="bot_wrapper"> <div class="bot_wrapper">
<div id="content"> <div id="content">
<button id="newsButton"> <button id="newsButton" style="display: none">
<div id="newsButtonAlert" style="display: none;"></div> <div id="newsButtonAlert" style="display: none;"></div>
<svg xmlns="http://www.w3.org/2000/svg" id="mapsvg" viewBox="0 0 24 24" width="20" height="20"><path d="M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0ZM22,12a9.938,9.938,0,0,1-1.662,5.508l-1.192-1.193A.5.5,0,0,1,19,15.962V15a3,3,0,0,0-3-3H13a1,1,0,0,1-1-1v-.5a.5.5,0,0,1,.5-.5A2.5,2.5,0,0,0,15,7.5v-1a.5.5,0,0,1,.5-.5h1.379a2.516,2.516,0,0,0,1.767-.732l.377-.377A9.969,9.969,0,0,1,22,12Zm-19.951.963,3.158,3.158A2.978,2.978,0,0,0,7.329,17H10a1,1,0,0,1,1,1v3.949A10.016,10.016,0,0,1,2.049,12.963ZM13,21.949V18a3,3,0,0,0-3-3H7.329a1,1,0,0,1-.708-.293L2.163,10.249A9.978,9.978,0,0,1,17.456,3.63l-.224.224A.507.507,0,0,1,16.879,4H15.5A2.5,2.5,0,0,0,13,6.5v1a.5.5,0,0,1-.5.5A2.5,2.5,0,0,0,10,10.5V11a3,3,0,0,0,3,3h3a1,1,0,0,1,1,1v.962a2.516,2.516,0,0,0,.732,1.767l1.337,1.337A9.971,9.971,0,0,1,13,21.949Z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" id="mapsvg" viewBox="0 0 24 24" width="20" height="20"><path d="M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0ZM22,12a9.938,9.938,0,0,1-1.662,5.508l-1.192-1.193A.5.5,0,0,1,19,15.962V15a3,3,0,0,0-3-3H13a1,1,0,0,1-1-1v-.5a.5.5,0,0,1,.5-.5A2.5,2.5,0,0,0,15,7.5v-1a.5.5,0,0,1,.5-.5h1.379a2.516,2.516,0,0,0,1.767-.732l.377-.377A9.969,9.969,0,0,1,22,12Zm-19.951.963,3.158,3.158A2.978,2.978,0,0,0,7.329,17H10a1,1,0,0,1,1,1v3.949A10.016,10.016,0,0,1,2.049,12.963ZM13,21.949V18a3,3,0,0,0-3-3H7.329a1,1,0,0,1-.708-.293L2.163,10.249A9.978,9.978,0,0,1,17.456,3.63l-.224.224A.507.507,0,0,1,16.879,4H15.5A2.5,2.5,0,0,0,13,6.5v1a.5.5,0,0,1-.5.5A2.5,2.5,0,0,0,10,10.5V11a3,3,0,0,0,3,3h3a1,1,0,0,1,1,1v.962a2.516,2.516,0,0,0,.732,1.767l1.337,1.337A9.971,9.971,0,0,1,13,21.949Z"/></svg>
&#10;<span id="newsButtonText">MAP</span> &#10;<span id="newsButtonText">MAP</span>

View File

@ -12,7 +12,6 @@
</div> </div>
</div> </div>
<div id="settingsAboutButtons"> <div id="settingsAboutButtons">
<button id="loginSkirdaDiscordInitAuth">Повторить</button>-->
<span id="loginSkirdaAuthorizationNote">В случае, если это не произошло, откройте его самостоятельно</span> <span id="loginSkirdaAuthorizationNote">В случае, если это не произошло, откройте его самостоятельно</span>
</div> </div>
</div> </div>

View File

@ -1,3 +1,4 @@
owner: dscalzi owner: Skirda
repo: HeliosLauncher repo: SkirdaElectronLauncher
provider: github provider: generic
url:

4
package-lock.json generated
View File

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"@electron/remote": "^2.1.0", "@electron/remote": "^2.1.0",
"adm-zip": "^0.5.9", "adm-zip": "^0.5.9",
"bluebird": "^3.7.2",
"discord-rpc-patch": "^4.0.1", "discord-rpc-patch": "^4.0.1",
"ejs": "^3.1.9", "ejs": "^3.1.9",
"ejs-electron": "^2.1.1", "ejs-electron": "^2.1.1",
@ -922,8 +923,7 @@
"node_modules/bluebird": { "node_modules/bluebird": {
"version": "3.7.2", "version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
"dev": true
}, },
"node_modules/bluebird-lst": { "node_modules/bluebird-lst": {
"version": "1.0.9", "version": "1.0.9",

View File

@ -25,6 +25,7 @@
"dependencies": { "dependencies": {
"@electron/remote": "^2.1.0", "@electron/remote": "^2.1.0",
"adm-zip": "^0.5.9", "adm-zip": "^0.5.9",
"bluebird": "^3.7.2",
"discord-rpc-patch": "^4.0.1", "discord-rpc-patch": "^4.0.1",
"ejs": "^3.1.9", "ejs": "^3.1.9",
"ejs-electron": "^2.1.1", "ejs-electron": "^2.1.1",