diff --git a/application-main/pom.xml b/application-main/pom.xml index 295cffc..aa759b4 100644 --- a/application-main/pom.xml +++ b/application-main/pom.xml @@ -11,8 +11,8 @@ application-main - 2024.8.1-beta.4 - Solus Lupus (2.0.0-build371) + 2024.8.2-beta.1 + Solus Lupus (2.0.0-build372) 17 @@ -23,7 +23,7 @@ com.zyneonstudios nexus-zyndex - 2024.7.5 + 2024.8 compile diff --git a/application-main/src/main/java/com/zyneonstudios/application/frame/FrameConnector.java b/application-main/src/main/java/com/zyneonstudios/application/frame/FrameConnector.java index b16815f..3310bb9 100644 --- a/application-main/src/main/java/com/zyneonstudios/application/frame/FrameConnector.java +++ b/application-main/src/main/java/com/zyneonstudios/application/frame/FrameConnector.java @@ -169,7 +169,6 @@ private void sync(String request) { request = request.replace("autoUpdates.",""); boolean update = request.equals("on"); ApplicationStorage.getUpdateSettings().set("updater.settings.autoUpdate",update); - frame.executeJavaScript("document.getElementById('updater-settings-enable-updates').checked = "+update+";"); } else if(request.startsWith("linuxFrame.")) { request = request.replace("linuxFrame.",""); boolean frame = request.equals("on"); @@ -208,7 +207,10 @@ private void syncSettings(String request) { } frame.executeJavaScript("document.getElementById('linux-settings-custom-frame').style.display = 'inherit'; linuxFrame = "+linuxCustomFrame+"; document.getElementById('linux-settings-enable-custom-frame').checked = linuxFrame;"); } - frame.executeJavaScript("updates = "+autoUpdate+"; document.getElementById('updater-settings-enable-updates').checked = updates; document.getElementById('updater-settings-update-channel').value = \""+channel+"\"; document.getElementById('updater-settings').style.display = 'inherit'; document.getElementById('general-settings-start-page').value = '"+ ApplicationStorage.startPage+"'; document.getElementById('updater-settings').style.display = 'inherit';"); + if(autoUpdate) { + frame.executeJavaScript("document.getElementById('updater-settings-enable-updates').classList.add('active');"); + } + frame.executeJavaScript("updates = "+autoUpdate+"; document.getElementById('updater-settings-update-channel').value = \""+channel+"\"; document.getElementById('updater-settings').style.display = 'inherit'; document.getElementById('general-settings-start-page').value = '"+ ApplicationStorage.startPage+"'; document.getElementById('updater-settings').style.display = 'inherit';"); } else if(request.equals("about")) { frame.executeJavaScript("document.getElementById('settings-global-application-version').innerText = \""+ ApplicationStorage.getApplicationVersion()+"\""); } diff --git a/application-main/src/main/java/com/zyneonstudios/application/frame/web/ApplicationFrame.java b/application-main/src/main/java/com/zyneonstudios/application/frame/web/ApplicationFrame.java index 45b8e8e..3f14f8b 100644 --- a/application-main/src/main/java/com/zyneonstudios/application/frame/web/ApplicationFrame.java +++ b/application-main/src/main/java/com/zyneonstudios/application/frame/web/ApplicationFrame.java @@ -32,6 +32,8 @@ public boolean onConsoleMessage(CefBrowser browser, CefSettings.LogSeverity leve NexusApplication.getLogger().error(message.replace("[ERR] ","")); } else if (message.startsWith("[DEB] ")) { NexusApplication.getLogger().debug(message.replace("[DEB] ","")); + } else { + NexusApplication.getLogger().debug("[FRAME] (Console) "+message); } return super.onConsoleMessage(browser, level, message, source, line); } diff --git a/application-main/src/main/java/com/zyneonstudios/application/main/ApplicationRunner.java b/application-main/src/main/java/com/zyneonstudios/application/main/ApplicationRunner.java index 4674199..249d165 100644 --- a/application-main/src/main/java/com/zyneonstudios/application/main/ApplicationRunner.java +++ b/application-main/src/main/java/com/zyneonstudios/application/main/ApplicationRunner.java @@ -35,7 +35,7 @@ public ScheduledExecutorService getExecutor() { public void start() { executor = Executors.newScheduledThreadPool(1); - executor.scheduleAtFixedRate(() -> CompletableFuture.runAsync(this::run), 0, 1, TimeUnit.SECONDS); + executor.scheduleAtFixedRate(this::run, 0, 1, TimeUnit.SECONDS); } int c = 0; @@ -148,7 +148,6 @@ private void checkVersion(JsonObject json) { NexusApplication.getLogger().debug("[RUNNER] Sending notification..."); //TODO: Application.getFrame().sendNotification("Update available!", "Version " + v + " has been released!", "InstallDynamic update", v, true); } - ; } } } \ No newline at end of file diff --git a/application-ui/content/assets/application/css/app-discover.css b/application-ui/content/assets/application/css/app-discover.css index 494af68..4910965 100644 --- a/application-ui/content/assets/application/css/app-discover.css +++ b/application-ui/content/assets/application/css/app-discover.css @@ -349,7 +349,6 @@ position: fixed; top: 0; bottom: 0; left: 0; right: 0; - backdrop-filter: blur(4px); background: linear-gradient(180deg, #00000000, var(--background)); z-index: 0; } @@ -366,6 +365,7 @@ } #discover-home { + border-top-left-radius: 1.5rem; background: url("../images/background/discover-home.png") no-repeat center; background-size: cover; diff --git a/application-ui/content/assets/application/css/app-library.css b/application-ui/content/assets/application/css/app-library.css index 93a31e4..ff82391 100644 --- a/application-ui/content/assets/application/css/app-library.css +++ b/application-ui/content/assets/application/css/app-library.css @@ -102,11 +102,28 @@ body { .library .library-content .title-menu-card .flex .title-options { position: absolute; - right: 0; top: 0; + right: -0.6rem; top: -0.15rem; padding: 0.7rem 1.2rem 0.7rem 0.25rem; font-size: 1.3rem; background: var(--background2); - display: none; + + h3 { + transition: all 0.25s ease; + padding: 0.2rem 0.45rem 0 0.4rem; + border-radius: 0.5rem; + } + + h3:hover, h3.active { + color: var(--background5); + background: var(--highlight); + box-shadow: 0 0 0.3rem var(--highlight); + animation: wiggle 2s infinite; + cursor: pointer; + + i { + animation: rotate 10s infinite; + } + } } .library .library-content .title-menu-card .flex .title-options .options-transition { @@ -214,7 +231,7 @@ body { transition: all 0.25s ease; font-family: MPLUS1p-ExtraBold, sans-serif; position: absolute; - bottom: 1rem; right: 0; + bottom: 1.75rem; right: 0.85rem; padding: 1rem; background: var(--background2); border: 2px solid var(--background3); @@ -241,8 +258,8 @@ body { } #view-launch.active { - background: var(--accent2); - border: 2px solid var(--accent); + background: var(--accent); + border: 2px solid var(--accent2); } #view-launch.active:hover { @@ -251,5 +268,184 @@ body { background: var(--accent); border: 2px solid var(--accent2); box-shadow: 0 0 0.4rem var(--accent); - animation: inherit !important; + animation: wiggle 2s infinite !important; +} + +#library-overlay { + z-index: 1; + width: calc(100% - 2rem - 4px); + height: calc(100% - 3rem - 4px); + display: none; + font-family: OpenSans, sans-serif; + overflow: hidden; + overflow-y: auto; + + .overlay-tabs { + width: 100%; + border-radius: 0.5rem; + box-shadow: 0 0 0.4rem var(--shadow3); + + h4 { + overflow: hidden; + text-align: center; + width: 100%; + padding: 0.5rem; + background: var(--foreground2); + color: var(--background5); + white-space: nowrap; + text-overflow: ellipsis; + } + + h4:hover { + background: var(--highlight); + box-shadow: 0 0 0.8rem var(--highlight); + color: var(--background5); + z-index: 1; + cursor: pointer; + transition: all 0.25s ease; + } + + h4.active { + background: linear-gradient(90deg, var(--accent), var(--accent2)); + box-shadow: 0 0 0.8rem var(--accent); + color: var(--highlight); + z-index: 2; + cursor: unset; + } + } + + .overlay-tabs.alt { + box-shadow: none; + margin-bottom: 1rem; + + h4 { + background: var(--background); + color: var(--foreground2); + box-shadow: none; + } + + h4:hover { + background: var(--background3); + } + + h4.active { + color: var(--background5); + background: var(--highlight); + } + } + + .overlay-group { + margin-top: 1rem; + display: none; + + h3.option { + position: relative; + background: var(--background3); + border: 2px solid var(--border2) !important; + padding: 0.125rem 0.5rem 0.25rem 0.5rem; + border-radius: 0.5rem; + transition: all 0.25s ease; + margin: 0 0.5rem 0.75rem 0.5rem; + color: var(--foreground); + + select { + position: absolute; + right: 0.25rem; top: 0.2rem; + font-size: 1.25rem; + color: var(--foreground2); + font-weight: 500; + + option { + background: var(--background1); + } + + option:checked { + text-align: right; + } + } + + .value-option { + font-weight: 500; + color: var(--foreground2); + position: absolute; + right: 2rem; + + i { + position: absolute; + right: -1.8rem; + top: 0; + font-size: 1rem; + border-radius: 0.4rem; + padding: 0.2rem; + border: 2px solid var(--border) !important; + background: var(--background2); + color: var(--foreground2); + transition: all 0.25s ease; + } + } + } + + h3.option:hover { + .value-option { + i { + border: 2px solid var(--border1) !important; + background: var(--background3); + } + + i:hover { + border: 2px solid var(--highlight) !important; + background: var(--highlight); + color: var(--background5); + cursor: pointer; + } + } + + background: var(--border2); + } + + h4.option { + color: var(--foreground2); + font-size: 1rem; + margin: 0.4rem 0 0.25rem 0.75rem; + } + + .option-group { + transition: background-color 0.25s ease !important; + padding: 0.5rem 0 0.5rem 0; + border-radius: 0.5rem; + + h3.option { + transition: background-color 0.25s ease !important; + margin: 0 0.5rem 0.5rem 0.5rem; + } + } + + .option-group:hover { + background: var(--background); + padding: 0.5rem; + + h3.option { + margin: 0 0 0.5rem 0; + } + + h4.option { + margin: 0.4rem 0 0.25rem 0.25rem; + } + } + + h3.option.disabled { + opacity: 0.5; + border-color: var(--border) !important; + background: var(--background2); + cursor: not-allowed; + } + } + + .overlay-group.active { + display: inherit; + } +} + +#library-overlay.active { + display: inherit; } \ No newline at end of file diff --git a/application-ui/content/assets/application/css/app-settings.css b/application-ui/content/assets/application/css/app-settings.css index 503e9c0..39adc7c 100644 --- a/application-ui/content/assets/application/css/app-settings.css +++ b/application-ui/content/assets/application/css/app-settings.css @@ -126,6 +126,43 @@ .settings { .settings-content { h3 { + .toggle { + position: absolute; + top: 0; right: 0; + margin: 0.3rem; + width: 2.75rem; + height: 1.5rem; + transition: all 0.25s ease; + background: var(--background2); + border-radius: 0.75rem; + + .toggle-slider { + position: absolute; + background: var(--foreground2); + opacity: 0.75; + width: 1rem; + height: 1rem; + margin: 0.25rem; + border-radius: 0.5rem; + transition: all 0.15s ease; + animation: toggleSlideLeft 0.15s ease-in-out; + animation-fill-mode: forwards; + } + } + + .toggle:hover { + cursor: pointer; + } + + .toggle.active { + .toggle-slider { + opacity: 1; + background: var(--highlight); + animation: toggleSlideRight 0.15s ease-in-out; + animation-fill-mode: forwards; + } + } + .value { .setting-button { position: absolute; @@ -150,6 +187,10 @@ } h3:hover { + .toggle { + background: var(--background3); + } + .setting-button { border: 2px solid var(--border1) !important; background: var(--background3); @@ -196,4 +237,22 @@ position: absolute; width: calc(100% - 1rem); height: calc(100% - 1rem); border-radius: 0.5rem; +} + +@keyframes toggleSlideRight { + 0% { + transform: translateX(0); + } + 100% { + transform: translateX(1.25rem); + } +} + +@keyframes toggleSlideLeft { + 0% { + transform: translateX(1.25rem); + } + 100% { + transform: translateX(0); + } } \ No newline at end of file diff --git a/application-ui/content/assets/application/css/app-shared.css b/application-ui/content/assets/application/css/app-shared.css index a7c32b7..01ac0e6 100644 --- a/application-ui/content/assets/application/css/app-shared.css +++ b/application-ui/content/assets/application/css/app-shared.css @@ -7,7 +7,7 @@ } @keyframes rotate { - 100% { transform: rotate(360deg); } + 100% { transform: rotate(360deg); translate: 0.1rem; } } body { diff --git a/application-ui/content/assets/application/javascript/app-library.js b/application-ui/content/assets/application/javascript/app-library.js index 5800f7d..22122b4 100644 --- a/application-ui/content/assets/application/javascript/app-library.js +++ b/application-ui/content/assets/application/javascript/app-library.js @@ -23,7 +23,6 @@ function initLibrary(skipConnector) { } } console.log("[CONNECTOR] init.library"); - log(moduleId); } function optionExists(selectId, value) { @@ -180,12 +179,40 @@ function setTitle(img,text,options_) { image.src = ""; } if(options_) { - image.style.display = "inherit"; - image.innerHTML = options_; + options.style.display = "inherit"; + options.innerHTML = options_; } else { options.style.display = "none"; options.innerHTML = ""; } + document.getElementById("library-overlay").classList.remove("active"); +} + +function toggleOverlay(button) { + const overlay = document.getElementById("library-overlay"); + if(overlay.classList.contains("active")) { + overlay.classList.remove("active"); + if(button) { + document.getElementById(button).classList.remove("active"); + } + } else { + overlay.classList.add("active"); + if(button) { + document.getElementById(button).classList.add("active"); + } + } +} + +function setOverlayContent(content) { + document.getElementById("library-overlay").innerHTML = content; +} + +function addOverlayContent(content) { + document.getElementById("library-overlay").innerHTML += content; +} + +function clearOverlay() { + document.getElementById("library-overlay").innerHTML = ""; } function setViewDescription(description) { @@ -212,7 +239,6 @@ function setViewImage(image_) { function showView(id) { document.getElementById("library-view").style.display = "inherit"; document.querySelector(".cnt").style.backgroundImage = "url('')"; - const button = document.getElementById(id); setTitle(); setViewImage(); setViewDescription(); disableLaunch(); connector("sync.library.module." + moduleId + ".view." + id); highlight(id); diff --git a/application-ui/content/assets/application/javascript/app-settings.js b/application-ui/content/assets/application/javascript/app-settings.js index 22a854b..1dafff7 100644 --- a/application-ui/content/assets/application/javascript/app-settings.js +++ b/application-ui/content/assets/application/javascript/app-settings.js @@ -4,12 +4,15 @@ let highlighted = undefined; let content = undefined; function toggleUpdates() { - if(updates) { + const updateSlider = document.getElementById("updater-settings-enable-updates"); + if(updateSlider.classList.contains("active")) { updates = false; connector('sync.autoUpdates.off'); + updateSlider.classList.remove("active"); } else { updates = true; connector('sync.autoUpdates.on'); + updateSlider.classList.add("active"); } } @@ -229,6 +232,34 @@ function addSelectToGroup(title,group,id,options,onchangeRequest) { } } +function addToggleToGroup(title,group,id,onchangeRequest,defaultState) { + 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 += "

"+title+"

"; + const toggle = document.getElementById(i); + if(defaultState) { + if(defaultState===true) { + toggle.classList.add("active"); + } + } + if(onchangeRequest) { + toggle.onclick = function () { + toggle.classList.toggle("active"); + connector(onchangeRequest+"."+toggle.classList.contains("active")); + } + } else { + toggle.onclick = function () { + toggle.classList.toggle("active"); + connector(i+"."+toggle.classList.contains("active")); + } + } + } +} + function addValueToGroup(title,group,id,onclickRequest,defaultValue) { if(title&&group) { const g = document.getElementById(group); diff --git a/application-ui/content/assets/cronos/css/app-tables.css b/application-ui/content/assets/cronos/css/app-tables.css new file mode 100644 index 0000000..551d11d --- /dev/null +++ b/application-ui/content/assets/cronos/css/app-tables.css @@ -0,0 +1,82 @@ +.table { + font-family: OpenSans, sans-serif; + background: var(--background2); + box-shadow: 0 0 0.4rem var(--shadow3); + border: 2px solid var(--border) !important; + border-radius: 1rem; + overflow: hidden; + display: flex; + width: 100%; + transition: all 0.25s ease; + white-space: nowrap; + text-overflow: ellipsis; + + div { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + text-align: center; + transition: all 0.25s ease; + width: 100%; + + h1, h2 ,h3, h4, h5, h6 { + overflow: hidden; + padding: 0.5rem 1.5rem; + margin: 0; + font-size: 1.25rem; + background: var(--border); + transition: all 0.25s ease; + white-space: nowrap; + text-overflow: ellipsis; + } + + p { + overflow: hidden; + padding: 0.5rem 1.5rem; + margin: 0; + background: var(--background2); + transition: all 0.25s ease; + white-space: nowrap; + text-overflow: ellipsis; + } + + p.alt { + background: var(--background3); + } + } + + div.left { + text-align: left; + border-left: none !important; + } + + div.right { + text-align: right; + border-right: none !important; + } +} + +.table:hover { + border-color: var(--border2) !important; + + div { + p { + background: var(--background3); + } + + p.alt { + background: var(--background2); + } + + h1, h2 ,h3, h4, h5, h6 { + background: var(--border2); + } + + /*h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover { + background: var(--foreground2); + color: var(--background5); + cursor: pointer; + opacity: 0.5; + }*/ + } +} \ No newline at end of file diff --git a/application-ui/content/assets/cronos/javascript/app-tables.js b/application-ui/content/assets/cronos/javascript/app-tables.js new file mode 100644 index 0000000..1f85abe --- /dev/null +++ b/application-ui/content/assets/cronos/javascript/app-tables.js @@ -0,0 +1,68 @@ +const tables = new Map(); + +function initializeTable(id,rows) { + if(tables.has(id)) { tables.delete(id); } + + const data = getTableData(id); + const table = document.getElementById(id); + table.innerHTML = ""; + + if (typeof rows !== 'number') { + rows = 2; + } + + for (let i = 0; i < rows; i++) { + data.set(i,new Map()); + data.get(i).set(0,"Column "+(i+1)); + } + reloadTable(id); +} + +function getTableData(id) { + if(!tables.has(id)) { + tables.set(id,new Map()); + } + return tables.get(id); +} + +function setTableContent(tableId,columnNumber,rowNumber,text) { + if(typeof columnNumber === 'number' && typeof rowNumber === 'number') { + getTableData(tableId).get(columnNumber).set(rowNumber,text); + reloadTable(tableId); + } +} + +function reloadTable(id) { + const table = document.getElementById(id); + const data = getTableData(id); + table.innerHTML = ""; + + for (let i = 0; i < data.size; i++) { + let column = id + "-column-" + i; + const columnData = data.get(i); + let columnClass = ""; + if(i===0) { + columnClass = "class='left' " + } else if(i===(data.size-1)) { + columnClass = "class='right' " + } + table.innerHTML += "
" + column = document.getElementById(column); + for (let j = 0; j < columnData.size; j++) { + let row = (column.id)+"-row-"+i; + let text = columnData.get(j); + if(typeof text === 'string') { + text = text.replaceAll('<','‹').replaceAll('>','›') + } + let rowClass = ""; + if (j % 2 === 0) { + rowClass="class='alt' "; + } + if(j===0) { + column.innerHTML += "

"+text+"

"; + } else { + column.innerHTML += "

"+text+"

"; + } + } + } +} diff --git a/application-ui/content/de/library.html b/application-ui/content/de/library.html index 2e467fd..513c571 100644 --- a/application-ui/content/de/library.html +++ b/application-ui/content/de/library.html @@ -8,11 +8,13 @@ + + @@ -134,6 +136,7 @@

Titel

+
 diff --git a/application-ui/content/de/settings.html b/application-ui/content/de/settings.html index 34cbdf5..a6db51d 100644 --- a/application-ui/content/de/settings.html +++ b/application-ui/content/de/settings.html @@ -159,16 +159,7 @@

Auf Aktualisierungen prüfen - - - +

Aktualisierungskanal diff --git a/application-ui/content/de/tables.html b/application-ui/content/de/tables.html new file mode 100644 index 0000000..d3db659 --- /dev/null +++ b/application-ui/content/de/tables.html @@ -0,0 +1,24 @@ + + + + + + Bibliothek + + + + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/application-ui/content/en/library.html b/application-ui/content/en/library.html index 163c66a..dd926fb 100644 --- a/application-ui/content/en/library.html +++ b/application-ui/content/en/library.html @@ -8,6 +8,7 @@ + @@ -134,6 +135,7 @@

title

+
 diff --git a/application-ui/content/en/settings.html b/application-ui/content/en/settings.html index a96fb95..625bf47 100644 --- a/application-ui/content/en/settings.html +++ b/application-ui/content/en/settings.html @@ -13,6 +13,7 @@ + @@ -159,16 +160,7 @@

Check for updates - - - +

Update channel