Skip to content

Commit

Permalink
Merge branch 'temp'
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekCornerGH committed Dec 18, 2020
2 parents 62719f0 + 7906bb6 commit 98e2efb
Show file tree
Hide file tree
Showing 6 changed files with 336 additions and 381 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<p align="center"><img src="./app/assets/images/SealCircle.png" width="150px" height="150px" alt="aventium softworks"></p>

<h1 align="center">RTMC Launcher</h1>

[<p align="center"><img src="https://img.shields.io/travis/GeekCornerGH/RTMC-Launcher.svg?style=for-the-badge" alt="travis">](https://travis-ci.org/github/GeekCornerGH/RTMC-Launcher) [<img src="https://img.shields.io/github/downloads/GeekCornerGH/RTMC-Launcher/total.svg?style=for-the-badge" alt="downloads">](https://github.com/GeekCornerGH/RTMC-Launcher/releases)[![](https://img.shields.io/david/geekcornergh/rtmc-launcher?style=for-the-badge)](#)</p>
[<p align="center"><img src="https://img.shields.io/travis/com/GeekCornerGH/RTMC-Launcher.svg?style=for-the-badge" alt="travis">](https://travis-ci.org/github/GeekCornerGH/RTMC-Launcher) [<img src="https://img.shields.io/github/downloads/GeekCornerGH/RTMC-Launcher/total.svg?style=for-the-badge" alt="downloads">](https://github.com/GeekCornerGH/RTMC-Launcher/releases)</p>

<p align="center">Rejoignez les serveurs RTMC sans avoir à vous soucier d'installer Java, Forge et les mods. Notre launcher s'occuper de tout ça pour vous.</p>

Expand Down
62 changes: 36 additions & 26 deletions app/assets/js/discordwrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,49 +27,59 @@ exports.initRPC = function(genSettings, servSettings, initialDetails = 'En atten
logger.log('Unable to initialize Discord Rich Presence, no client detected.')
} else {
logger.log('Unable to initialize Discord Rich Presence: ' + error.message, error)
}
}1
})
}

exports.updateState = function(state){
activity.state = state
client.setActivity(activity)
logger.log('Updated discord state to: ' + state)
if(client){
activity.state = state
client.setActivity(activity)
logger.log('Updated discord state to: ' + state)
}
}

exports.clearState = function(){
activity = {
details: activity.details,
largeImageKey: activity.largeImageKey,
largeImageText: activity.largeImageText,
startTimestamp: activity.startTimestamp,
instance: activity.instance
}
client.setActivity(activity)
logger.log('Cleared the activity state!')
//logger.log('Updated discord details to: ' + details)
if(client){
activity = {
details: activity.details,
largeImageKey: activity.largeImageKey,
largeImageText: activity.largeImageText,
startTimestamp: activity.startTimestamp,
instance: activity.instance
}
client.setActivity(activity)
logger.log('Cleared the activity state!')
}
}

exports.clearDetails = function(){
activity = {
state: activity.state,
largeImageKey: activity.largeImageKey,
largeImageText: activity.largeImageText,
startTimestamp: activity.startTimestamp,
instance: activity.instance
if(client){
activity = {
state: activity.state,
largeImageKey: activity.largeImageKey,
largeImageText: activity.largeImageText,
startTimestamp: activity.startTimestamp,
instance: activity.instance
}
logger.log('Cleared the activity details!')
}
logger.log('Cleared the activity details!')
}

exports.resetTime = function(){
activity.startTimestamp = new Date().getTime()
client.setActivity(activity)
logger.log('Reset the activity time!')
if(client){
activity.startTimestamp = new Date().getTime()
client.setActivity(activity)
logger.log('Reset the activity time!')
}
}

exports.updateDetails = function(details){
activity.details = details
client.setActivity(activity)
if(client){
activity.details = details
client.setActivity(activity)
logger.log('Updated discord details to: ' + details)
}
}

exports.shutdownRPC = function(){
Expand Down
6 changes: 3 additions & 3 deletions app/assets/js/scripts/landing.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ const refreshMojangStatuses = async function () {
for (let i = 0; i < statuses.length; i++) {
const service = statuses[i]

// Mojang API is broken for these two. https://bugs.mojang.com/browse/WEB-2303
if (service.service === 'sessionserver.mojang.com' || service.service === 'minecraft.net') {
// Mojang API is broken for sessionserver. https://bugs.mojang.com/browse/WEB-2303
if (service.service === 'sessionserver.mojang.com') {
service.status = 'green'
}

Expand Down Expand Up @@ -759,7 +759,7 @@ function dlAsync(login = true) {
proc.stdout.on('data', tempListener)
proc.stderr.on('data', gameErrorListener)

setLaunchDetails('C\'est bon!<br>Bon jeu!')
setLaunchDetails('C\'est bon! </br> Bon jeu!')

proc.on('close', (code, signal) => {
if(hasRPC){
Expand Down
34 changes: 14 additions & 20 deletions app/settings.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,6 @@
</label>
</div>
</div>
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Ouvrir la console au démarrage du jeu</span>
<span class="settingsFieldDesc">Ceci ouvre la console dès que Minecraft démarre.</span>
</div>
<label class="toggleSwitch">
<input type="checkbox" cValue="ConsoleOnLaunch">
<span class="toggleSwitchSlider"></span>
</label>
</div>
</div>
</div>
<div id="settingsTabMods" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
Expand Down Expand Up @@ -154,14 +143,15 @@
<div id="settingsResourcePackContainer">
<div class="settingsModsHeader">Pack de ressources</div>
<div id="settingsResourcePackDesc">Activez et désactivez vos packs de ressources préférés.
Veuillez noter que plus la résolution de votre pack est élevée, plus vous devrez allouer de mémoire.
</div>
Veuillez noter que plus la résolution de votre pack est élevée, plus vous devrez allouer de
mémoire.
</div>
<div id="settingsResourcePackWrapper">
<button id="settingsResourcePackButton"> + </button>
<div class="settingsSelectContainer">
<div class="settingsSelectContainer">
<div class="settingsSelectSelected" id="settingsResourcePackSelected">Choisissez un pack
</div>
<div class="settingsSelectOptions" id="settingsResourcePackOptions" >
<div class="settingsSelectOptions" id="settingsResourcePackOptions">

</div>
</div>
Expand Down Expand Up @@ -324,7 +314,9 @@
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Activer l'intégration de Discord</span>
<span class="settingsFieldDesc">Cette fonction permet d'afficher sur votre profil Discord ce que vous êtes entrain de faire sur notre launcher.</br>Vous devrez redémarrer le launcher afin d'appliquer les changements.</span>
<span class="settingsFieldDesc">Cette fonction permet d'afficher sur votre profil Discord ce que
vous êtes entrain de faire sur notre launcher.</br>Vous devrez redémarrer le launcher afin
d'appliquer les changements.</span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
Expand Down Expand Up @@ -401,9 +393,11 @@

<a href="https://github.com/dscalzi/HeliosLauncher" id="settingsAboutSourceButton"
class="settingsAboutButton">Launcher original</a>
<a href="https://https://github.com/ModRealms-Network/ModRealmsLauncher" id="settingsAboutSourceButton"
class="settingsAboutButton">Certains extraits de code sont</br>issus du Launcher ModRealms</a>
<a href="https://https://github.com/GeekCornerGH" id="settingsAboutSourceButton" class="settingsAboutButton">Traduction et adaptation</br>par GeekCorner</a>
<a href="https://https://github.com/ModRealms-Network/ModRealmsLauncher"
id="settingsAboutSourceButton" class="settingsAboutButton">Certains extraits de code
sont</br>issus du Launcher ModRealms</a>
<a href="https://https://github.com/GeekCornerGH" id="settingsAboutSourceButton"
class="settingsAboutButton">Traduction et adaptation</br>par GeekCorner</a>
<a href="https://github.com/GeekCornerGH/RTMC-Launcher/issues" id="settingsAboutSupportButton"
class="settingsAboutButton">Support</a>
<a href="#" id="settingsAboutDevToolsButton" class="settingsAboutButton">DevTools Console</a>
Expand Down Expand Up @@ -465,4 +459,4 @@
</div>
</div>
<script src="./assets/js/scripts/settings.js"></script>
</div>
</div>
Loading

0 comments on commit 98e2efb

Please sign in to comment.