mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-21 19:22:13 -08:00
Compare commits
5 Commits
7275f80e0c
...
9e57728173
Author | SHA1 | Date | |
---|---|---|---|
|
9e57728173 | ||
|
6aaeeff9a4 | ||
|
9cca37ca8a | ||
|
75de114858 | ||
|
a02daa3842 |
@ -839,22 +839,18 @@ class ProcessBuilder {
|
||||
libs[mdl.getVersionlessMavenIdentifier()] = mdl.getPath()
|
||||
if(mdl.subModules.length > 0){
|
||||
const res = this._resolveModuleLibraries(mdl)
|
||||
if(res.length > 0){
|
||||
libs = {...libs, ...res}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Check for any libraries in our mod list.
|
||||
for(let i=0; i<mods.length; i++){
|
||||
if(mods.sub_modules != null){
|
||||
const res = this._resolveModuleLibraries(mods[i])
|
||||
if(res.length > 0){
|
||||
libs = {...libs, ...res}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return libs
|
||||
}
|
||||
@ -863,27 +859,25 @@ class ProcessBuilder {
|
||||
* Recursively resolve the path of each library required by this module.
|
||||
*
|
||||
* @param {Object} mdl A module object from the server distro index.
|
||||
* @returns {Array.<string>} An array containing the paths of each library this module requires.
|
||||
* @returns {{[id: string]: string}} An object containing the paths of each library this module requires.
|
||||
*/
|
||||
_resolveModuleLibraries(mdl){
|
||||
if(!mdl.subModules.length > 0){
|
||||
return []
|
||||
return {}
|
||||
}
|
||||
let libs = []
|
||||
let libs = {}
|
||||
for(let sm of mdl.subModules){
|
||||
if(sm.rawModule.type === Type.Library){
|
||||
|
||||
if(sm.rawModule.classpath ?? true) {
|
||||
libs.push(sm.getPath())
|
||||
libs[sm.getVersionlessMavenIdentifier()] = sm.getPath()
|
||||
}
|
||||
}
|
||||
// If this module has submodules, we need to resolve the libraries for those.
|
||||
// To avoid unnecessary recursive calls, base case is checked here.
|
||||
if(mdl.subModules.length > 0){
|
||||
const res = this._resolveModuleLibraries(sm)
|
||||
if(res.length > 0){
|
||||
libs = libs.concat(res)
|
||||
}
|
||||
libs = {...libs, ...res}
|
||||
}
|
||||
}
|
||||
return libs
|
||||
|
@ -961,6 +961,10 @@ async function loadNews(){
|
||||
const distroData = await DistroAPI.getDistribution()
|
||||
if(!distroData.rawDistribution.rss) {
|
||||
loggerLanding.debug('No RSS feed provided.')
|
||||
|
||||
// remove the news button
|
||||
await $('#newsButton').fadeOut(250).promise()
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
@ -5,9 +5,9 @@ title = "Helios Launcher"
|
||||
|
||||
[ejs.landing]
|
||||
mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher"
|
||||
mediaTwitterURL = "#"
|
||||
mediaInstagramURL = "#"
|
||||
mediaYouTubeURL = "#"
|
||||
mediaTwitterURL = ""
|
||||
mediaInstagramURL = ""
|
||||
mediaYouTubeURL = ""
|
||||
mediaDiscordURL = "https://discord.gg/zNWUXdt"
|
||||
|
||||
[ejs.settings]
|
||||
|
@ -27,8 +27,10 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<% if (lang('landing.mediaGitHubURL') + lang('landing.mediaTwitterURL') + lang('landing.mediaInstagramURL') + lang('landing.mediaYouTubeURL') + lang('landing.mediaDiscordURL') != "") { %>
|
||||
<div class="mediaDivider"></div>
|
||||
<div id="externalMedia">
|
||||
<% if (lang('landing.mediaGitHubURL') != "") { %>
|
||||
<div class="mediaContainer">
|
||||
<a href="<%- lang('landing.mediaGitHubURL') %>" class="mediaURL" id="linkURL">
|
||||
<svg id="linkSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
|
||||
@ -39,6 +41,8 @@
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (lang('landing.mediaTwitterURL') != "") { %>
|
||||
<div class="mediaContainer">
|
||||
<a href="<%- lang('landing.mediaTwitterURL') %>" class="mediaURL" id="twitterURL">
|
||||
<svg id="twitterSVG" class="mediaSVG" viewBox="0 0 5000 4060" preserveAspectRatio="xMidYMid meet">
|
||||
@ -48,6 +52,8 @@
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (lang('landing.mediaInstagramURL') != "") { %>
|
||||
<div class="mediaContainer">
|
||||
<a href="<%- lang('landing.mediaInstagramURL') %>" class="mediaURL" id="instagramURL">
|
||||
<svg id="instagramSVG" class="mediaSVG" viewBox="0 0 5040 5040">
|
||||
@ -68,6 +74,8 @@
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (lang('landing.mediaYouTubeURL') != "") { %>
|
||||
<div class="mediaContainer">
|
||||
<a href="<%- lang('landing.mediaYouTubeURL') %>" class="mediaURL" id="youtubeURL">
|
||||
<svg id="youtubeSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
|
||||
@ -77,6 +85,9 @@
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (lang('landing.mediaDiscordURL') != "") { %>
|
||||
<div class="mediaContainer">
|
||||
<a href="<%- lang('landing.mediaDiscordURL') %>" class="mediaURL" id="discordURL">
|
||||
<svg id="discordSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
|
||||
@ -86,7 +97,9 @@
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user