Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
2024.8.1-beta.3: Add new module options
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldieeins committed Aug 14, 2024
1 parent bf88993 commit 37cb26a
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 10 deletions.
4 changes: 2 additions & 2 deletions application-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</parent>

<artifactId>application-main</artifactId>
<version>2024.8.1-beta.2</version>
<name>Solus Lupus (2.0.0-build369)</name>
<version>2024.8.1-beta.3</version>
<name>Solus Lupus (2.0.0-build370)</name>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand Down
Binary file modified application-main/src/main/resources/content.zip
Binary file not shown.
42 changes: 42 additions & 0 deletions application-ui/content/assets/application/css/app-settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,48 @@
right: 0.7rem;
}

.settings {
.settings-content {
h3 {
.value {
.setting-button {
position: absolute;
right: 0.15rem;
top: 0.1rem;
font-size: 1rem;
border-radius: 0.4rem;
padding: 0.2rem 0.2rem 0 0.2rem;
border: 2px solid var(--border) !important;
background: var(--background2);
color: var(--foreground2);
transition: all 0.25s ease;
}

.setting-value {
position: absolute;
font-weight: 1;
right: 2rem;
top: 0.1375rem;
}
}
}

h3:hover {
.setting-button {
border: 2px solid var(--border1) !important;
background: var(--background3);
}

.setting-button:hover {
border: 2px solid var(--highlight) !important;
background: var(--highlight);
color: var(--background5);
cursor: pointer;
}
}
}
}

.settings .settings-content h3 select {
position: absolute;
top: 0; right: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,17 @@ function showTab(tabId) {
addEventListener("DOMContentLoaded", () => {
showTab("home");
initDiscover();
setMenuPanel("", "web app", "undefined version", true)
setMenuPanel("", "web app", "undefined version", true);

let theme = document.getElementById("css-colors").href;
if(theme.includes("app-colors-light.css")) {
theme="default.light";
} else if(theme.includes("app-colors-zyneon.css")) {
theme="default.zyneon";
} else {
theme="default.dark";
}
document.getElementById("news-frame").src="https://danieldieeins.github.io/Zyneon-Application/news/news.html?type=new&theme="+theme;

document.getElementById("search-bar").addEventListener('keydown', function(event) {
if (event.keyCode === 13) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,11 @@ function addModuleSetting(icon,text,onclick,id,image,group) {
if(onclick) {
entry.onclick = function() {
connector(onclick);
log(entry.id);
};
}

template.parentNode.insertBefore(entry,template);

if(!document.getElementById("settings-modules-section").classList.contains("active")) {
document.getElementById("settings-modules-section").classList.add("active");
}
}

function highlight(newHighlight) {
Expand Down Expand Up @@ -230,4 +227,27 @@ function addSelectToGroup(title,group,id,options,onchangeRequest) {
}
}
}
}

function addValueToGroup(title,group,id,onclickRequest,defaultValue) {
if(title&&group) {
const g = document.getElementById(group);
let i = (group+"-"+title).replaceAll(" ", "-").replace(/[^a-z0-9-_]/gi, '').toLowerCase();
if(id) {
i = id;
}
g.innerHTML += "<h3>"+title+" <span id='"+i+"' class='value flex'><div class='setting-value'></div><a class='setting-button'><i class='bx bxs-edit'></i></a></span></h3>";
if(defaultValue) {
document.getElementById(i).querySelector(".setting-value").innerText = defaultValue;
}
if(onclickRequest) {
document.getElementById(i).querySelector(".setting-button").onclick = function () {
connector(onclickRequest);
}
} else {
document.getElementById(i).querySelector(".setting-button").onclick = function () {
connector(i);
}
}
}
}
2 changes: 1 addition & 1 deletion application-ui/content/de/discover.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h3 class="fes" onclick="document.getElementById('search-bar').disabled = false;
<div id="discover-news" class="discover-tab">
<div class="discover-background"></div>
<div class="discover-tab-content">
<iframe src="https://danieldieeins.github.io/Zyneon-Application/news/news.html?type=new"></iframe>
<iframe id="news-frame"></iframe>
</div>
</div>
<div id="discover-games" class="discover-tab">
Expand Down
2 changes: 1 addition & 1 deletion application-ui/content/de/firstrun.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h3>Please select a language</h3>
</div>

<a class="button back disabled" id="fs-back">Zurück</a>
<a class="button proceed hover-wiggle" onclick="syncLang('en');" id="firstrun-continue-button" href="#theme">Weiter</a>
<a class="button proceed hover-wiggle" onclick="syncLang('de');" id="firstrun-continue-button" href="#theme">Weiter</a>
</div>
</div>
<div id="theme" class="start-full">
Expand Down
2 changes: 1 addition & 1 deletion application-ui/content/en/discover.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h3 class="fes" onclick="document.getElementById('search-bar').disabled = false;
<div id="discover-news" class="discover-tab">
<div class="discover-background"></div>
<div class="discover-tab-content">
<iframe src="https://danieldieeins.github.io/Zyneon-Application/news/news.html?type=new"></iframe>
<iframe id="news-frame"></iframe>
</div>
</div>
<div id="discover-games" class="discover-tab">
Expand Down

0 comments on commit 37cb26a

Please sign in to comment.