update something for new

add DPCloudev account
and more...
This commit is contained in:
dharm pimsen 2024-10-01 18:33:13 +07:00
parent eb683f89ec
commit 52fa2f7f25
20 changed files with 423 additions and 221 deletions

174
README.md
View File

@ -1,80 +1,6 @@
<p align="center"><img src="./app/assets/images/SealCircle.png" width="150px" height="150px" alt="aventium softworks"></p>
<h1 align="center">Helios Launcher</h1>
<em><h5 align="center">(formerly Electron Launcher)</h5></em>
[<p align="center"><img src="https://img.shields.io/github/actions/workflow/status/dscalzi/HeliosLauncher/build.yml?branch=master&style=for-the-badge" alt="gh actions">](https://github.com/dscalzi/HeliosLauncher/actions) [<img src="https://img.shields.io/github/downloads/dscalzi/HeliosLauncher/total.svg?style=for-the-badge" alt="downloads">](https://github.com/dscalzi/HeliosLauncher/releases) <img src="https://forthebadge.com/images/badges/winter-is-coming.svg" height="28px" alt="winter-is-coming"></p>
<p align="center">Join modded servers without worrying about installing Java, Forge, or other mods. We'll handle that for you.</p>
![Screenshot 1](https://i.imgur.com/6o7SmH6.png)
![Screenshot 2](https://i.imgur.com/x3B34n1.png)
## Features
* 🔒 Full account management.
* Add multiple accounts and easily switch between them.
* Microsoft (OAuth 2.0) + Mojang (Yggdrasil) authentication fully supported.
* Credentials are never stored and transmitted directly to Mojang.
* 📂 Efficient asset management.
* Receive client updates as soon as we release them.
* Files are validated before launch. Corrupt or incorrect files will be redownloaded.
* ☕ **Automatic Java validation.**
* If you have an incompatible version of Java installed, we'll install the right one *for you*.
* You do not need to have Java installed to run the launcher.
* 📰 News feed natively built into the launcher.
* ⚙️ Intuitive settings management, including a Java control panel.
* Supports all of our servers.
* Switch between server configurations with ease.
* View the player count of the selected server.
* Automatic updates. That's right, the launcher updates itself.
* View the status of Mojang's services.
This is not an exhaustive list. Download and install the launcher to gauge all it can do!
#### Need Help? [Check the wiki.][wiki]
#### Like the project? Leave a ⭐ star on the repository!
## Downloads
You can download from [GitHub Releases](https://github.com/dscalzi/HeliosLauncher/releases)
#### Latest Release
[![](https://img.shields.io/github/release/dscalzi/HeliosLauncher.svg?style=flat-square)](https://github.com/dscalzi/HeliosLauncher/releases/latest)
#### Latest Pre-Release
[![](https://img.shields.io/github/release/dscalzi/HeliosLauncher/all.svg?style=flat-square)](https://github.com/dscalzi/HeliosLauncher/releases)
**Supported Platforms**
If you download from the [Releases](https://github.com/dscalzi/HeliosLauncher/releases) tab, select the installer for your system.
| Platform | File |
| -------- | ---- |
| Windows x64 | `Helios-Launcher-setup-VERSION.exe` |
| macOS x64 | `Helios-Launcher-setup-VERSION-x64.dmg` |
| macOS arm64 | `Helios-Launcher-setup-VERSION-arm64.dmg` |
| Linux x64 | `Helios-Launcher-setup-VERSION.AppImage` |
## Console
To open the console, use the following keybind.
```console
ctrl + shift + i
```
Ensure that you have the console tab selected. Do not paste anything into the console unless you are 100% sure of what it will do. Pasting the wrong thing can expose sensitive information.
#### Export Output to a File
If you want to export the console output, simply right click anywhere on the console and click **Save as..**
![console example](https://i.imgur.com/T5e73jP.png)
# Unknow-DMB Project Launcher
Based on Helios Launcher
## Development
@ -84,28 +10,20 @@ This section details the setup of a basic developmentment environment.
**System Requirements**
* [Node.js][nodejs] v20
---
- nodejs v20
**Clone and Install Dependencies**
```console
> git clone https://github.com/dscalzi/HeliosLauncher.git
> cd HeliosLauncher
> npm install
```
---
**Launch Application**
```console
> npm start
```
---
**Build Installers**
To build for your current platform.
@ -123,89 +41,3 @@ Build for a specific platform.
| Linux x64 | `npm run dist:linux` |
Builds for macOS may not work on Windows/Linux and vice-versa.
---
### Visual Studio Code
All development of the launcher should be done using [Visual Studio Code][vscode].
Paste the following into `.vscode/launch.json`
```JSON
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/node_modules/electron/cli.js",
"args" : ["."],
"outputCapture": "std"
},
{
"name": "Debug Renderer Process",
"type": "chrome",
"request": "launch",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"runtimeArgs": [
"${workspaceFolder}/.",
"--remote-debugging-port=9222"
],
"webRoot": "${workspaceFolder}"
}
]
}
```
This adds two debug configurations.
#### Debug Main Process
This allows you to debug Electron's [main process][mainprocess]. You can debug scripts in the [renderer process][rendererprocess] by opening the DevTools Window.
#### Debug Renderer Process
This allows you to debug Electron's [renderer process][rendererprocess]. This requires you to install the [Debugger for Chrome][chromedebugger] extension.
Note that you **cannot** open the DevTools window while using this debug configuration. Chromium only allows one debugger, opening another will crash the program.
---
### Note on Third-Party Usage
Please give credit to the original author and provide a link to the original source. This is free software, please do at least this much.
For instructions on setting up Microsoft Authentication, see https://github.com/dscalzi/HeliosLauncher/blob/master/docs/MicrosoftAuth.md.
---
## Resources
* [Wiki][wiki]
* [Nebula (Create Distribution.json)][nebula]
* [v2 Rewrite Branch (Inactive)][v2branch]
The best way to contact the developers is on Discord.
[![discord](https://discordapp.com/api/guilds/211524927831015424/embed.png?style=banner3)][discord]
---
### See you ingame.
[nodejs]: https://nodejs.org/en/ 'Node.js'
[vscode]: https://code.visualstudio.com/ 'Visual Studio Code'
[mainprocess]: https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes 'Main Process'
[rendererprocess]: https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes 'Renderer Process'
[chromedebugger]: https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome 'Debugger for Chrome'
[discord]: https://discord.gg/zNWUXdt 'Discord'
[wiki]: https://github.com/dscalzi/HeliosLauncher/wiki 'wiki'
[nebula]: https://github.com/dscalzi/Nebula 'dscalzi/Nebula'
[v2branch]: https://github.com/dscalzi/HeliosLauncher/tree/ts-refactor 'v2 branch'

View File

@ -39,10 +39,27 @@
<%- include('overlay') %>
<div id="loadingContainer">
<div id="loadingContent">
<div id="loadSpinnerContainer">
<img id="loadCenterImage" src="assets/images/LoadingSeal.png">
<img id="loadSpinnerImage" class="rotating" src="assets/images/LoadingText.png">
</div>
<div class="spinner"></div>
<h3>Please wait...</h3>
<style>
.spinner {
border: 8px solid rgba(0, 0, 0, 0);
border-left-color: #fdd700b9;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
</div>
</div>
</body>

View File

@ -3223,7 +3223,7 @@ input:checked + .toggleSwitchSlider:before {
}
/* Icon which displays the status of the mojang services. */
#mojang_status_icon {
#mojang_status_icon, #DPCloudev_status_icon {
font-size: 30px;
color: #848484;
margin-left: 15px;

View File

@ -167,6 +167,57 @@ exports.addMojangAccount = async function(username, password) {
}
}
const axios = require('axios');
exports.addDPCloudevAccount = async function(username, password) {
try {
const response = await axios.post('https://api.damp11113.xyz/account/v3/login', {
username: username,
password: password
}, {
headers: {
'Content-Type': 'application/json'
}
});
console.log(response.data);
if (response.data && response.data.session) {
const responseinfo = await axios.post('https://api.damp11113.xyz/account/v3/info', {
clientToken: response.data.clientToken,
}, {
headers: {
'Content-Type': 'application/json'
}
});
console.log(responseinfo.data);
const ret = ConfigManager.addDPCloudevAuthAccount(
responseinfo.data.uuid,
response.data.session,
username,
responseinfo.data.username
);
if (ConfigManager.getClientToken() == null) {
ConfigManager.setClientToken(response.data.clientToken);
}
ConfigManager.save();
return ret;
} else {
return Promise.reject(mojangErrorDisplayable(response.data.error || MojangErrorCode.UNKNOWN));
}
} catch (err) {
console.error(err);
return Promise.reject(mojangErrorDisplayable(MojangErrorCode.UNKNOWN));
}
};
const AUTH_MODE = { FULL: 0, MS_REFRESH: 1, MC_REFRESH: 2 }
/**
@ -291,6 +342,34 @@ exports.removeMojangAccount = async function(uuid){
}
}
exports.removeDPCloudevAccount = async function(uuid){
try {
const authAcc = ConfigManager.getAuthAccount(uuid)
console.log(authAcc.accessToken)
console.log(ConfigManager.getClientToken())
const response = await axios.post('https://api.damp11113.xyz/account/v3/logout', {
session: authAcc.accessToken,
clientToken: ConfigManager.getClientToken()
}, {
headers: {
'Content-Type': 'application/json'
}
});
if (response.status === 200) {
ConfigManager.removeAuthAccount(uuid)
ConfigManager.save()
return Promise.resolve()
} else {
log.error('Error while removing account', response.error)
return Promise.reject(response.error)
}
} catch (err){
log.error('Error while removing account', err)
return Promise.reject(err)
}
}
/**
* Remove a Microsoft account. It is expected that the caller will invoke the OAuth logout
* through the ipc renderer.

View File

@ -349,6 +349,18 @@ exports.addMojangAuthAccount = function(uuid, accessToken, username, displayName
return config.authenticationDatabase[uuid]
}
exports.addDPCloudevAuthAccount = function(uuid, accessToken, username, displayName){
config.selectedAccount = uuid
config.authenticationDatabase[uuid] = {
type: 'dpcloudev',
accessToken,
username: username.trim(),
uuid: uuid.trim(),
displayName: displayName.trim()
}
return config.authenticationDatabase[uuid]
}
/**
* Update the tokens of an authenticated microsoft account.
*

View File

@ -2,6 +2,8 @@
* Script for landing.ejs
*/
// Requirements
const axios = require('axios');
const { URL } = require('url')
const {
MojangRestAPI,
@ -195,7 +197,7 @@ const refreshMojangStatuses = async function(){
greenCount = 0
greyCount = 0
console.log(statuses)
for(let i=0; i<statuses.length; i++){
const service = statuses[i]
@ -235,6 +237,100 @@ const refreshMojangStatuses = async function(){
document.getElementById('mojang_status_icon').style.color = MojangRestAPI.statusToHex(status)
}
const DPCloudevstatusToHex = function(status) {
switch (status) {
case 'green':
return '#00FF00'; // Green
case 'yellow':
return '#FFFF00'; // Yellow
case 'red':
return '#FF0000'; // Red
case 'grey':
return '#808080'; // Grey
default:
return '#000000'; // Default to black for unknown statuses
}
}
const DPCloudevgetColorFromStatus = (status) => {
switch (status) {
case 200:
return 'green';
case 500:
return 'red';
case 429: // Example for too many requests
case 503: // Example for service unavailable
return 'yellow';
default:
return 'grey'; // Default for unexpected status codes
}
};
const refreshDPCloudevStatuses = async function(){
loggerLanding.info('Refreshing DPCloudev Statuses..')
let status = 'grey'
let tooltipNonEssentialHTML = ''
const servicesToInclude = ['API', 'CDN', 'Dashboard'];
const response = await axios.get("https://status.damp11113.xyz/")
console.log(response)
let statuses
if (response.status === 200) {
// Convert the data into the desired array format, filtering for specific services
statuses = servicesToInclude.map(serviceName => ({
service: serviceName,
status: DPCloudevgetColorFromStatus(response.data.Service[serviceName.toLowerCase()]),
name: serviceName // Assuming 'name' is the same as the 'service'
}));
} else {
loggerLanding.warn('Unable to refresh DPCloudev service status.')
statuses = [
{ "service": "api", "status": "red", "name": "API" },
{ "service": "cdn", "status": "red", "name": "CDN" },
{ "service": "dashboard", "status": "red", "name": "Dashboard" }
]
}
greenCount = 0
greyCount = 0
for (let i=0; i<statuses.length; i++){
const service = statuses[i]
console.log(service)
const tooltipHTML = `<div class="dpcloudevStatusContainer">
<span class="mojangStatusIcon" style="color: ${DPCloudevstatusToHex(service.status)};">&#8226;</span>
<span class="mojangStatusName">${service.name}</span>
</div>`
tooltipNonEssentialHTML += tooltipHTML
if(service.status === 'yellow' && status !== 'red'){
status = 'yellow'
} else if(service.status === 'red'){
status = 'red'
} else {
if(service.status === 'grey'){
++greyCount
}
++greenCount
}
}
if(greenCount === statuses.length){
if(greyCount === statuses.length){
status = 'grey'
} else {
status = 'green'
}
}
document.getElementById('dpcloudevStatusContainer').innerHTML = tooltipNonEssentialHTML
document.getElementById('DPCloudev_status_icon').style.color = MojangRestAPI.statusToHex(status)
}
const refreshServerStatus = async (fade = false) => {
loggerLanding.info('Refreshing Server Status')
const serv = (await DistroAPI.getDistribution()).getServerById(ConfigManager.getSelectedServer())
@ -267,10 +363,12 @@ const refreshServerStatus = async (fade = false) => {
}
refreshMojangStatuses()
refreshDPCloudevStatuses()
// Server Status is refreshed in uibinder.js on distributionIndexDone.
// Refresh statuses every hour. The status page itself refreshes every day so...
let mojangStatusListener = setInterval(() => refreshMojangStatuses(true), 60*60*1000)
let DPCloudevStatusListener = setInterval(() => refreshDPCloudevStatuses(true), 60*60*1000)
// Set refresh rate to once every 5 minutes.
let serverStatusListener = setInterval(() => refreshServerStatus(true), 300000)
@ -615,6 +713,7 @@ async function dlAsync(login = true) {
setLaunchDetails(Lang.queryJS('landing.dlAsync.doneEnjoyServer'))
// Init Discord Hook
/*
if(distro.rawDistribution.discord != null && serv.rawServer.discord != null){
DiscordWrapper.initRPC(distro.rawDistribution.discord, serv.rawServer.discord)
hasRPC = true
@ -625,6 +724,7 @@ async function dlAsync(login = true) {
proc = null
})
}
*/
} catch(err) {

View File

@ -187,7 +187,7 @@ loginButton.addEventListener('click', () => {
// Show loading stuff.
loginLoading(true)
AuthManager.addMojangAccount(loginUsername.value, loginPassword.value).then((value) => {
AuthManager.addDPCloudevAccount(loginUsername.value, loginPassword.value).then((value) => {
updateSelectedAccount(value)
loginButton.innerHTML = loginButton.innerHTML.replace(Lang.queryJS('login.loggingIn'), Lang.queryJS('login.success'))
$('.circle-loader').toggleClass('load-complete')

View File

@ -28,7 +28,7 @@ loginOptionMicrosoft.onclick = (e) => {
})
}
loginOptionMojang.onclick = (e) => {
loginOptionDPCloudev.onclick = (e) => {
switchView(getCurrentView(), VIEWS.login, 500, 500, () => {
loginViewOnSuccess = loginOptionsViewOnLoginSuccess
loginViewOnCancel = loginOptionsViewOnLoginCancel

View File

@ -519,7 +519,7 @@ function processLogOut(val, isLastAccount){
ipcRenderer.send(MSFT_OPCODE.OPEN_LOGOUT, uuid, isLastAccount)
})
} else {
AuthManager.removeMojangAccount(uuid).then(() => {
AuthManager.removeDPCloudevAccount(uuid).then(() => {
if(!isLastAccount && uuid === prevSelAcc.uuid){
const selAcc = ConfigManager.getSelectedAccount()
refreshAuthAccountSelected(selAcc.uuid)

View File

@ -1,20 +1,20 @@
# Custom Language File for Launcher Customizer
[ejs.app]
title = "Helios Launcher"
title = "Unknow DMB"
[ejs.landing]
mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher"
mediaGitHubURL = "https://git.damp11113.xyz/Mirror/unknow-dmb"
mediaTwitterURL = "#"
mediaInstagramURL = "#"
mediaYouTubeURL = "#"
mediaDiscordURL = "https://discord.gg/zNWUXdt"
[ejs.settings]
sourceGithubLink = "https://github.com/dscalZi/HeliosLauncher"
supportLink = "https://github.com/dscalZi/HeliosLauncher/issues"
sourceGithubLink = "https://git.damp11113.xyz/Mirror/unknow-dmb"
supportLink = "https://damp11113.xyz/donate"
[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 arent 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."
welcomeHeader = "Welcome to Unknow-DMB Project"
welcomeDescription = "Hello world!"
welcomeDescCTA = "Hello world!"

View File

@ -20,24 +20,24 @@ newsErrorNoneSpan = "No News"
[ejs.login]
loginCancelText = "Cancel"
loginSubheader = "MINECRAFT LOGIN"
loginSubheader = "DPCloudev LOGIN"
loginEmailError = "* Invalid Value"
loginEmailPlaceholder = "EMAIL OR USERNAME"
loginEmailPlaceholder = "USERNAME"
loginPasswordError = "* Required"
loginPasswordPlaceholder = "PASSWORD"
loginForgotPasswordLink = "https://minecraft.net/password/forgot/"
loginForgotPasswordLink = "https://dashboard.damp11113.xyz/forgotpw"
loginForgotPasswordText = "forgot password?"
loginRememberMeText = "remember me?"
loginButtonText = "LOGIN"
loginNeedAccountLink = "https://minecraft.net/store/minecraft-java-edition/"
loginNeedAccountLink = "https://dashboard.damp11113.xyz/register"
loginNeedAccountText = "Need an Account?"
loginPasswordDisclaimer1 = "Your password is sent directly to mojang and never stored."
loginPasswordDisclaimer1 = "Your password is sent directly to DPCloudev and never stored."
loginPasswordDisclaimer2 = "{appName} is not affiliated with Mojang AB."
[ejs.loginOptions]
loginOptionsTitle = "Login Options"
loginWithMicrosoft = "Login with Microsoft"
loginWithMojang = "Login with Mojang"
loginWithDPCloudev = "Login with DPCloudev (Free user)"
cancelButton = "Cancel"
[ejs.overlay]
@ -62,8 +62,8 @@ tabAccountHeaderText = "Account Settings"
tabAccountHeaderDesc = "Add new accounts or manage existing ones."
microsoftAccount = "Microsoft"
addMicrosoftAccount = "+ Add Microsoft Account"
mojangAccount = "Mojang"
addMojangAccount = "+ Add Mojang Account"
DPCloudevAccount = "DPCloudev"
addDPCloudevAccount = "+ Add DPCloudev Account"
minecraftTabHeaderText = "Minecraft Settings"
minecraftTabHeaderDesc = "Options related to game launch."
gameResolutionTitle = "Game Resolution"

View File

@ -13,7 +13,7 @@
<% } else{ %>
<div id="frameContentWin">
<div id="frameTitleDock">
<span id="frameTitleText"><%= lang('app.title') %></span>
<span id="frameTitleText"><%= lang('app.title') %> | Powered by DPCloudev</span>
</div>
<div id="frameButtonDockWin">
<button class="frameButton fMb" id="frameButton_minimize" tabIndex="-1">

View File

@ -118,6 +118,17 @@
</div>
</div>
</div>
<div class="bot_divider"></div>
<div id="mojangStatusWrapper">
<span class="bot_label">DPClOUDEV STATUS</span>
<span id="DPCloudev_status_icon">&#8226;</span>
<div id="mojangStatusTooltip">
<div id="mojangStatusTooltipTitle"><%- lang('landing.mojangStatusTooltipTitle') %></div>
<div id="dpcloudevStatusContainer">
<!-- DPCloudev services are populated here. -->
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,7 +7,6 @@
</div>
<div id="loginContent">
<form id="loginForm">
<img id="loginImageSeal" src="assets/images/SealCircle.png"/>
<span id="loginSubheader"><%- lang('login.loginSubheader') %></span>
<div class="loginFieldContainer">
<svg id="profileSVG" class="loginSVG" viewBox="40 37 65.36 61.43">

View File

@ -15,13 +15,73 @@
</button>
</div>
<div class="loginOptionButtonContainer">
<button id="loginOptionMojang" class="loginOptionButton">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 9.677 9.667">
<path d="M-26.332-12.098h2.715c-1.357.18-2.574 1.23-2.715 2.633z" fill="#fff" />
<path d="M2.598.022h7.07L9.665 7c-.003 1.334-1.113 2.46-2.402 2.654H0V2.542C.134 1.2 1.3.195 2.598.022z" fill="#db2331" />
<path d="M1.54 2.844c.314-.76 1.31-.46 1.954-.528.785-.083 1.503.272 2.1.758l.164-.9c.327.345.587.756.964 1.052.28.254.655-.342.86-.013.42.864.408 1.86.54 2.795l-.788-.373C6.9 4.17 5.126 3.052 3.656 3.685c-1.294.592-1.156 2.65.06 3.255 1.354.703 2.953.51 4.405.292-.07.42-.34.87-.834.816l-4.95.002c-.5.055-.886-.413-.838-.89l.04-4.315z" fill="#fff" />
</svg>
<span><%- lang('loginOptions.loginWithMojang') %></span>
<button id="loginOptionDPCloudev" class="loginOptionButton">
<svg
width="22"
height="22"
viewBox="0 0 220 220"
version="1.1"
id="svg1"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><g
id="layer1"><g
id="g1"
transform="translate(6.9409594,21.553506)"><path
style="fill:#6f4119;stroke:none;stroke-width:1.62284"
d="m 185.35864,116.03244 v 27.48011 h 27.48013 v -27.48011 z"
id="path16" /><path
style="fill:#f9f9f9;stroke:none;stroke-width:2.29504"
d="m 157.87851,88.552311 v 54.960229 h 27.48013 V 88.552311 Z"
id="path15" /><path
style="fill:#653915;stroke:none;stroke-width:1.62284"
d="m -7.0022289,116.03244 v 27.48011 H 20.477893 v -27.48011 z"
id="path14" /><path
style="fill:#553111;stroke:none;stroke-width:1.62284"
d="m 185.35864,88.552295 v 27.480145 h 27.48013 V 88.552295 Z"
id="path13" /><path
style="fill:#010101;stroke:none;stroke-width:1.62284"
d="M 47.958016,88.552295 V 143.51254 H 75.438135 V 88.552295 H 47.958016 m 82.440384,0 v 54.960245 h 27.48011 V 88.552295 Z"
id="path12" /><path
style="fill:#f9f9f9;stroke:none;stroke-width:1.62284"
d="M 20.477893,88.552295 V 143.51254 H 47.958016 V 88.552295 Z"
id="path11" /><path
style="fill:#f7d185;stroke:none;stroke-width:1.62284"
d="M 47.958016,61.072173 V 88.552295 H 75.438135 V 143.51254 H -7.0022289 v 54.96024 H 212.83876 V 143.51254 H 130.3984 v -27.4801 H 102.91828 V 88.552295 H 75.438135 V 61.072173 Z"
id="path10" /><path
style="fill:#653915;stroke:none;stroke-width:1.62284"
d="m 130.3984,33.592054 v 27.480119 h 27.48011 V 33.592054 Z"
id="path9" /><path
style="fill:#6f4119;stroke:none;stroke-width:1.62284"
d="M 102.91828,33.592054 V 116.03244 H 130.3984 V 88.552295 h 54.96024 V 61.072173 H 130.3984 V 33.592054 Z"
id="path8" /><path
style="fill:#653915;stroke:none;stroke-width:1.62284"
d="M 75.438135,33.592054 V 88.552295 H 102.91828 V 33.592054 Z"
id="path7" /><path
style="fill:#553111;stroke:none;stroke-width:1.62284"
d="M 47.958 33.5921 L 47.958 61.0722 L 20.4779 61.0722 L 20.4779 88.5523 L -7.00223 88.5523 L -7.00223 116.032 L 20.4779 116.032 L 20.4779 88.5523 L 47.958 88.5523 L 47.958 61.0722 L 75.4381 61.0722 L 75.4381 33.5921 Z"
id="path6" /><path
style="fill:#fff5f3;stroke:none;stroke-width:1.62284"
d="M 20.477893,6.1119311 V 33.592054 H 47.958016 V 6.1119311 Z"
id="path5" /><path
style="fill:#fff5f3;stroke:none;stroke-width:1.62284"
d="M 157.87947,6.1119961 V 33.592103 h 27.48014 V 6.1119961 Z"
id="path5-0" /><path
style="fill:#010101;stroke:none;stroke-width:1.62284"
d="M 185.35864,-21.368191 V 6.1119311 h 27.48013 V -21.368191 Z"
id="path4" /><path
style="fill:#030303;stroke:none;stroke-width:1.62284"
d="M 157.87851,-21.368191 V 6.1119311 h 27.48013 V 33.592054 h 27.48012 V 6.1119311 H 185.35864 V -21.368191 Z"
id="path3" /><path
style="fill:#e18715;stroke:none;stroke-width:1.62284"
d="M 47.958016,-21.368191 V 33.592054 H -7.0022289 V 88.552295 H 20.477893 V 61.072173 H 47.958016 V 33.592054 H 157.87851 v 27.480119 h 27.48013 v 27.480122 h 27.48012 V 33.592054 h -54.96025 v -54.960245 z"
id="path2" /><path
style="fill:#030303;stroke:none;stroke-width:1.62284"
d="M -7.0022289,-21.368191 V 33.592054 H 20.477893 V 6.1119311 H 47.958016 V -21.368191 Z"
id="path1" /></g></g></svg>
<span><%- lang('loginOptions.loginWithDPCloudev') %></span>
</button>
</div>
</div>

View File

@ -52,15 +52,74 @@
<div class="settingsAuthAccountTypeContainer">
<div class="settingsAuthAccountTypeHeader">
<div class="settingsAuthAccountTypeHeaderLeft">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 9.677 9.667">
<path d="M-26.332-12.098h2.715c-1.357.18-2.574 1.23-2.715 2.633z" fill="#fff" />
<path d="M2.598.022h7.07L9.665 7c-.003 1.334-1.113 2.46-2.402 2.654H0V2.542C.134 1.2 1.3.195 2.598.022z" fill="#db2331" />
<path d="M1.54 2.844c.314-.76 1.31-.46 1.954-.528.785-.083 1.503.272 2.1.758l.164-.9c.327.345.587.756.964 1.052.28.254.655-.342.86-.013.42.864.408 1.86.54 2.795l-.788-.373C6.9 4.17 5.126 3.052 3.656 3.685c-1.294.592-1.156 2.65.06 3.255 1.354.703 2.953.51 4.405.292-.07.42-.34.87-.834.816l-4.95.002c-.5.055-.886-.413-.838-.89l.04-4.315z" fill="#fff" />
</svg>
<span><%- lang('settings.mojangAccount') %></span>
<svg
width="22"
height="22"
viewBox="0 0 220 220"
version="1.1"
id="svg1"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><g
id="layer1"><g
id="g1"
transform="translate(6.9409594,21.553506)"><path
style="fill:#6f4119;stroke:none;stroke-width:1.62284"
d="m 185.35864,116.03244 v 27.48011 h 27.48013 v -27.48011 z"
id="path16" /><path
style="fill:#f9f9f9;stroke:none;stroke-width:2.29504"
d="m 157.87851,88.552311 v 54.960229 h 27.48013 V 88.552311 Z"
id="path15" /><path
style="fill:#653915;stroke:none;stroke-width:1.62284"
d="m -7.0022289,116.03244 v 27.48011 H 20.477893 v -27.48011 z"
id="path14" /><path
style="fill:#553111;stroke:none;stroke-width:1.62284"
d="m 185.35864,88.552295 v 27.480145 h 27.48013 V 88.552295 Z"
id="path13" /><path
style="fill:#010101;stroke:none;stroke-width:1.62284"
d="M 47.958016,88.552295 V 143.51254 H 75.438135 V 88.552295 H 47.958016 m 82.440384,0 v 54.960245 h 27.48011 V 88.552295 Z"
id="path12" /><path
style="fill:#f9f9f9;stroke:none;stroke-width:1.62284"
d="M 20.477893,88.552295 V 143.51254 H 47.958016 V 88.552295 Z"
id="path11" /><path
style="fill:#f7d185;stroke:none;stroke-width:1.62284"
d="M 47.958016,61.072173 V 88.552295 H 75.438135 V 143.51254 H -7.0022289 v 54.96024 H 212.83876 V 143.51254 H 130.3984 v -27.4801 H 102.91828 V 88.552295 H 75.438135 V 61.072173 Z"
id="path10" /><path
style="fill:#653915;stroke:none;stroke-width:1.62284"
d="m 130.3984,33.592054 v 27.480119 h 27.48011 V 33.592054 Z"
id="path9" /><path
style="fill:#6f4119;stroke:none;stroke-width:1.62284"
d="M 102.91828,33.592054 V 116.03244 H 130.3984 V 88.552295 h 54.96024 V 61.072173 H 130.3984 V 33.592054 Z"
id="path8" /><path
style="fill:#653915;stroke:none;stroke-width:1.62284"
d="M 75.438135,33.592054 V 88.552295 H 102.91828 V 33.592054 Z"
id="path7" /><path
style="fill:#553111;stroke:none;stroke-width:1.62284"
d="M 47.958 33.5921 L 47.958 61.0722 L 20.4779 61.0722 L 20.4779 88.5523 L -7.00223 88.5523 L -7.00223 116.032 L 20.4779 116.032 L 20.4779 88.5523 L 47.958 88.5523 L 47.958 61.0722 L 75.4381 61.0722 L 75.4381 33.5921 Z"
id="path6" /><path
style="fill:#fff5f3;stroke:none;stroke-width:1.62284"
d="M 20.477893,6.1119311 V 33.592054 H 47.958016 V 6.1119311 Z"
id="path5" /><path
style="fill:#fff5f3;stroke:none;stroke-width:1.62284"
d="M 157.87947,6.1119961 V 33.592103 h 27.48014 V 6.1119961 Z"
id="path5-0" /><path
style="fill:#010101;stroke:none;stroke-width:1.62284"
d="M 185.35864,-21.368191 V 6.1119311 h 27.48013 V -21.368191 Z"
id="path4" /><path
style="fill:#030303;stroke:none;stroke-width:1.62284"
d="M 157.87851,-21.368191 V 6.1119311 h 27.48013 V 33.592054 h 27.48012 V 6.1119311 H 185.35864 V -21.368191 Z"
id="path3" /><path
style="fill:#e18715;stroke:none;stroke-width:1.62284"
d="M 47.958016,-21.368191 V 33.592054 H -7.0022289 V 88.552295 H 20.477893 V 61.072173 H 47.958016 V 33.592054 H 157.87851 v 27.480119 h 27.48013 v 27.480122 h 27.48012 V 33.592054 h -54.96025 v -54.960245 z"
id="path2" /><path
style="fill:#030303;stroke:none;stroke-width:1.62284"
d="M -7.0022289,-21.368191 V 33.592054 H 20.477893 V 6.1119311 H 47.958016 V -21.368191 Z"
id="path1" /></g></g></svg>
<span><%- lang('settings.DPCloudevAccount') %></span>
</div>
<div class="settingsAuthAccountTypeHeaderRight">
<button class="settingsAddAuthAccount" id="settingsAddMojangAccount"><%- lang('settings.addMojangAccount') %></button>
<button class="settingsAddAuthAccount" id="settingsAddMojangAccount"><%- lang('settings.addDPCloudevAccount') %></button>
</div>
</div>

View File

@ -2,7 +2,7 @@
<div id="waitingContent">
<div class="waitingSpinner"></div>
<div id="waitingTextContainer">
<h2><%- lang('waiting.waitingText') %></h2>
<h2>Please wait...</h2>
</div>
</div>
</div>

View File

@ -227,8 +227,8 @@ let win
function createWindow() {
win = new BrowserWindow({
width: 980,
height: 552,
width: 1280,
height: 720,
icon: getPlatformIcon('SealCircle'),
frame: false,
webPreferences: {

46
package-lock.json generated
View File

@ -11,6 +11,7 @@
"dependencies": {
"@electron/remote": "^2.1.2",
"adm-zip": "^0.5.12",
"axios": "^1.7.7",
"discord-rpc-patch": "^4.0.1",
"ejs": "^3.1.10",
"ejs-electron": "^3.0.0",
@ -1084,8 +1085,7 @@
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"dev": true
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/at-least-node": {
"version": "1.0.0",
@ -1096,6 +1096,17 @@
"node": ">= 4.0.0"
}
},
"node_modules/axios": {
"version": "1.7.7",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
"integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/b4a": {
"version": "1.6.6",
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz",
@ -1502,7 +1513,6 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dev": true,
"dependencies": {
"delayed-stream": "~1.0.0"
},
@ -1743,7 +1753,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"dev": true,
"engines": {
"node": ">=0.4.0"
}
@ -2459,6 +2468,26 @@
"resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz",
"integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw=="
},
"node_modules/follow-redirects": {
"version": "1.15.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"license": "MIT",
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/foreground-child": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
@ -2479,7 +2508,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dev": true,
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
@ -3398,7 +3426,6 @@
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"dev": true,
"engines": {
"node": ">= 0.6"
}
@ -3407,7 +3434,6 @@
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"dependencies": {
"mime-db": "1.52.0"
},
@ -3759,6 +3785,12 @@
"node": ">=10"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"license": "MIT"
},
"node_modules/pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",

View File

@ -25,6 +25,7 @@
"dependencies": {
"@electron/remote": "^2.1.2",
"adm-zip": "^0.5.12",
"axios": "^1.7.7",
"discord-rpc-patch": "^4.0.1",
"ejs": "^3.1.10",
"ejs-electron": "^3.0.0",