Skip to content

Commit

Permalink
Updated launcher with new dynamic background
Browse files Browse the repository at this point in the history
As well as various bug changes and fixes.
  • Loading branch information
HenrikoMagnifico authored May 2, 2021
1 parent ac7b0b8 commit d3540cb
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 31 deletions.
59 changes: 48 additions & 11 deletions app/assets/css/launcher.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ body, button {
color: white;
}

/*body {
background: url('./../images/backgrounds/0.jpg') no-repeat center center fixed;
/*
body {
background: url('http://i.stack.imgur.com/kx8MT.gif') no-repeat center center fixed;
background-size: cover;
}*/
}
*/

/*******************************************************************************
* *
Expand Down Expand Up @@ -239,7 +241,7 @@ body, button {
position: relative;
}

/*

.cloudDiv {
position: absolute;
height: 100%;
Expand Down Expand Up @@ -274,7 +276,7 @@ body, button {
background-position: 230%;
}
}
*/


#welcomeImageSeal {
border-radius: 50%;
Expand Down Expand Up @@ -2866,9 +2868,9 @@ input:checked + .toggleSwitchSlider:before {

/* Divider bar between the external and internal icons. */
.mediaDivider {
height: 4px;
width: 34px;
background: rgb(255, 255, 255);
height: 2px;
width: 44px;
background: rgb(156, 156, 156);
margin: 10px 0px;
}

Expand All @@ -2879,7 +2881,7 @@ input:checked + .toggleSwitchSlider:before {
transition: 0.25s ease;
cursor: pointer;
height: 35px;
width: 35px;
width: 45px;
}
.mediaSVG:hover,
.mediaURL:focus .mediaSVG,
Expand All @@ -2892,6 +2894,41 @@ input:checked + .toggleSwitchSlider:before {
outline: none;
}

#modpack_banners {
/*
text-align: left;
align-items: center;
display: flex;
border: none;
background: none;
width: 80%;
height: 70%;
margin: auto;
padding-top: 10%;
*/

background-color: rgb(165, 195, 37);
position: relative;
margin-top: 25px;
height: calc(100% - 90px);
width: 100px;
align-items: center;
}

.modpack_banner_img {
float: center;
text-align: left;
align-items: center;
display: flex;
padding: 30px;
margin-bottom: 40%;
border: none;
background: none;
margin-top: 20px;
width: 70%;
height: 70%;
}

/* Internal media button shared styles. */
.mediaButton {
background: none;
Expand Down Expand Up @@ -3007,8 +3044,8 @@ input:checked + .toggleSwitchSlider:before {
height: 25px;
width: 2px;
background: rgba(107, 105, 105, 0.7);
margin-left: 70px;
margin-right: 30px;
margin-left: 80px;
margin-right: 38px;
}

/* * *
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/images/icons/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/assets/js/configmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ exports.getAbsoluteMaxRAM = function(){

function resolveMaxRAM(){
const mem = os.totalmem()
return mem >= 8000000000 ? '4G' : (mem >= 6000000000 ? '3G' : '2G')
return mem >= 8000000000 ? '6G' : (mem >= 6000000000 ? '5G' : '4G') //Automatically sets the ram to 6GB if the user has more than ~8GB in their PC. If they have ~6GB or more, set it to 5GB or 4GB.
}

function resolveMinRAM(){
Expand Down Expand Up @@ -86,7 +86,7 @@ const DEFAULT_CONFIG = {
resWidth: 1280,
resHeight: 720,
fullscreen: false,
autoConnect: true,
autoConnect: false,
launchDetached: true
},
launcher: {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/js/scripts/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ function populateSettingsUpdateInformation(data){
settingsUpdateButtonStatus('Check for Updates', false, () => {
if(!isDev){
ipcRenderer.send('autoUpdateAction', 'checkForUpdate')
settingsUpdateButtonStatus('Checking for Updates..', true)
settingsUpdateButtonStatus('Checking for Updates...', true)
}
})
}
Expand Down
4 changes: 3 additions & 1 deletion app/assets/js/scripts/uibinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ function showMainUI(data){
updateSelectedServer(data.getServer(ConfigManager.getSelectedServer()))
refreshServerStatus()
setTimeout(() => {

document.getElementById('frameBar').style.backgroundColor = 'rgba(0, 0, 0, 0.5)'
document.body.style.backgroundImage = `url('assets/images/backgrounds/${document.body.getAttribute('bkid')}.jpg')`
document.body.style.backgroundImage = `url('assets/images/backgrounds/henrikolauncher_background_gif_100q_night.gif')`
/*document.body.style.backgroundImage = `url('assets/images/backgrounds/${document.body.getAttribute('bkid')}.jpg')`*/
$('#main').show()

const isLoggedIn = Object.keys(ConfigManager.getAuthAccounts()).length > 0
Expand Down
11 changes: 2 additions & 9 deletions app/assets/js/scripts/uicore.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ window.eval = global.eval = function () {
throw new Error('Sorry, this app does not support window.eval().')
}

// Display warning when devtools window is opened.
remote.getCurrentWebContents().on('devtools-opened', () => {
console.log('%cThe console is dark and full of terrors.', 'color: white; -webkit-text-stroke: 4px #a02d2a; font-size: 60px; font-weight: bold')
console.log('%cIf you\'ve been told to paste something here, you\'re being scammed.', 'font-size: 16px')
console.log('%cUnless you know exactly what you\'re doing, close this window.', 'font-size: 16px')
})

// Disable zoom, needed for darwin.
webFrame.setZoomLevel(0)
webFrame.setVisualZoomLevelLimits(1, 1)
Expand All @@ -42,14 +35,14 @@ if(!isDev){
ipcRenderer.on('autoUpdateNotification', (event, arg, info) => {
switch(arg){
case 'checking-for-update':
loggerAutoUpdater.log('Checking for update..')
loggerAutoUpdater.log('Checking for update...')
settingsUpdateButtonStatus('Checking for Updates..', true)
break
case 'update-available':
loggerAutoUpdaterSuccess.log('New update available', info.version)

if(process.platform === 'darwin'){
info.darwindownload = `https://github.com/HenrikoMagnifico/HenrikoLauncher/releases/download/v${info.version}/helioslauncher-setup-${info.version}.dmg`
info.darwindownload = `https://github.com/HenrikoMagnifico/HenrikoLauncher/releases/download/v${info.version}/default.henrikolauncher-setup-${info.version}.dmg`
showUpdateUI(info)
}

Expand Down
7 changes: 5 additions & 2 deletions app/landing.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div id="landingContainer" style="display: none;">

<div id="upper">
<div id="left">
<div id="image_seal_container">
Expand Down Expand Up @@ -143,6 +144,7 @@
</div>
<div id="right">
<div class="bot_wrapper">

<div id="launch_content">
<button id="launch_button">PLAY</button>
<div class="bot_divider"></div>
Expand Down Expand Up @@ -228,10 +230,11 @@
<script src="./assets/js/scripts/landing.js"></script>
</div>

<!--
<div>
<!-- <iframe src="https://www.henrikomagnifico.com/yao-pack-mod-list" style="width:100%; height:400px;"></iframe> -->
<div style="border: 3px solid rgb(201, 0, 1); overflow: hidden; margin: 15px auto; max-width: 966px;" scrolling="no">
<iframe scrolling="no" allowtransparency="true" src="https://www.henrikomagnifico.com/yao-pack-mod-list" style="border: 0px none; margin-left: -60px; height: 1359px; margin-top: -233px; width: 1086px; background: transparent; background-color: transparent;";>
</iframe>
</div>
</div>
</div>
-->
2 changes: 1 addition & 1 deletion app/settings.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
<span id="settingsMinRAMLabel" class="settingsMemoryLabel">3G</span>
</div>
</div>
<div id="settingsMemoryDesc">The recommended minimum RAM is 4 gigabytes. Setting the minimum and maximum values to the same value may reduce lag.</div>
<div id="settingsMemoryDesc">The recommended minimum RAM is 4 gigabytes. 7GB or higher is recommended for an optimal experience. Setting the minimum and maximum values to the same value may reduce lag.</div>
</div>
<div id="settingsMemoryContentRight">
<div id="settingsMemoryStatus">
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "henrikolauncher",
"version": "v1.0.1",
"productName": "HenrikoLauncher",
"version": "1.0.1",
"productName": "Henriko Launcher",
"description": "Henriko Modpack Launcher",
"author": "Created by Henriko Magnifico. Original author is Daniel Scalzi (https://github.com/dscalzi/)",
"license": "UNLICENSED",
"license": "All Rights Reserved",
"homepage": "https://www.henrikomagnifico.com/",
"bugs": {
"url": "https://www.henrikomagnifico.com/"
Expand Down

0 comments on commit d3540cb

Please sign in to comment.