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

Commit

Permalink
Update MJE addon to 2024.6-alpha.2
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldieeins committed Jun 8, 2024
1 parent 42f364a commit 11377ce
Show file tree
Hide file tree
Showing 11 changed files with 199 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,8 @@ public void executeJavaScript(String command) {
getBrowser().executeJavaScript(command,getBrowser().getURL(),5); // Execute JavaScript command
}

// Method to open a custom page
public void openCustomPage(String title, String pageId, String url) {
getBrowser().loadURL(ApplicationConfig.urlBase+ApplicationConfig.language+"/custom.html?title="+title+"&id="+pageId+"&url="+url);
}

public void executeCustomPageJS(String command) {
executeJavaScript("document.getElementById('iframe').contentWindow."+command);
}
}
Binary file modified application-main/src/main/resources/modules.zip
Binary file not shown.
56 changes: 52 additions & 4 deletions application-ui/content/assets/application/css/app-discover.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@
color: var(--foreground1);
}

.search .search-bar input:disabled {
cursor: not-allowed;
}

.search:hover .search-bar input {
transition: all 0.25s ease;
background: var(--background6);
Expand Down Expand Up @@ -187,10 +191,54 @@
}

.discover-content #discover-search .search-flex #search-content .search-result {
position: relative;
margin: 1.25rem 0 0 0;
width: calc(100% - 2.45rem);
max-width: calc(100% - 2.45rem);
height: 9rem;
max-height: 9rem;
padding: 0;
width: calc(100% - 0.45rem);
max-width: calc(100% - 0.45rem);
height: 11rem;
max-height: 11rem;
overflow: hidden;
}

.discover-content #discover-search .search-flex #search-content .search-result .flex {
position: absolute;
width: 100%;
height: 11rem;
max-height: 11rem;
max-width: 100%;
}

.discover-content #discover-search .search-flex #search-content .search-result .flex .search-image {
width: 11rem;
height: 11rem;
}


.discover-content #discover-search .search-flex #search-content .search-result .flex .search-image img {
width: calc(9.5rem - 4px);
height: calc(9.5rem - 4px);
border-radius: 0.5rem;
border: 2px solid var(--background2) !important;
transition: all 0.25s ease;
box-shadow: 0 0 0.8rem var(--shadow3);
margin: 0.75rem;
}

.discover-content #discover-search .search-flex #search-content .search-result .flex .search-image img:hover {
width: calc(10rem);
height: calc(10rem);
rotate: 1deg;
border: none !important;
box-shadow: 0 0 0.8rem var(--shadow);
margin: 0.5rem;
}

.discover-content #discover-search .search-flex #search-content .search-result .flex .search-details {
position: absolute;
right: 0; top: 0;
width: calc(100% - 12.5rem);
height: 9rem;
padding: 0.75rem 0.75rem 0.75rem 0;
overflow-y: auto;
}
77 changes: 77 additions & 0 deletions application-ui/content/assets/application/css/app-shared.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ li.disabled:hover {
animation: wiggle 1s infinite !important;
}

.wiggle-low {
animation: wiggle 30s infinite !important;
}

.hover-wiggle-extreme:hover {
animation: wiggle 0.1s linear infinite !important;
}
Expand Down Expand Up @@ -74,6 +78,7 @@ li:hover {

.cnt {
width: 100%;
height: 100%;
padding: 0;
border-top-left-radius: 1.5rem;
position: relative;
Expand All @@ -83,4 +88,76 @@ li:hover {

.highlighted, .active {
transition: all 0.25s ease !important;
}

#overlay {
position: absolute !important;
width: 100%; height: 100% !important;
opacity: 0 !important;
z-index: -1 !important;
transition: all 0.25s ease !important;
border-top-left-radius: 1.5rem !important;
overflow: hidden !important;
}

#overlay.active {
background: var(--background) !important;
opacity: 1 !important;
z-index: 999999 !important;
transition: all 2s ease !important;
overflow: hidden !important;
}

#overlay #overlay-frame {
border: none !important;
width: 100% !important;
height: 100% !important;
transition: all 0.25s ease !important;
border-top-left-radius: 1.5rem !important;
overflow: hidden !important;
opacity: 0 !important;
}

#overlay.active #overlay-frame {
opacity: 1 !important;
transition: all 1.5s ease !important;
}

#overlay .close-overlay {
position: fixed !important;
top: 0.75rem !important;
right: 0.25rem !important;
border-radius: 0.5rem !important;
backdrop-filter: blur(4px);
box-shadow: 0 0 0.4rem var(--shadow3);
background: #ff000050 !important;
border: 1px solid #ff000025;
transition: all 0.25s ease !important;
padding: 0.5rem 2.5rem 0.5rem 1rem !important;
color: #ffffff !important;
font-weight: 1000 !important;
overflow: hidden !important;
opacity: 0 !important;
}

#overlay.active .close-overlay {
opacity: 1 !important;
transition: all 1s ease !important;
}

#overlay .close-overlay:hover {
opacity: 1 !important;
transition: all 0.25s ease !important;
background: red !important;
cursor: pointer !important;
overflow: hidden !important;
}

#overlay .close-overlay i {
font-weight: 1000 !important;
font-size: 1.75rem !important;
right: 0.65rem !important;
top: 0.3rem !important;
position: absolute !important;
overflow: hidden !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ function initModulePage() {
if(urlParams.get("url")) {
document.getElementById("iframe").src = urlParams.get("url");
}
}

function executeCustomScript(script) {
document.getElementById("iframe").contentWindow.eval(script);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
--border1: var(--border);
--border2: #4a4a4a;

--shadow: #ffffff99;
--shadow: #ffffff50;
--shadow1: var(--shadow);
--shadow2: #00000050;
--shadow3: #000000;
Expand Down
31 changes: 31 additions & 0 deletions application-ui/content/assets/cronos/javascript/app-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ document.addEventListener('dragstart', function(e){

function init() {
const urlParams = new URLSearchParams(window.location.search);
if(location.href.includes("http://localhost:63342/Zyneon-Application/")) {
if (!urlParams.get("_ij_reload")) {
if(location.href.includes("?")) {
location.href = location.href + "&_ij_reload=RELOAD_ON_SAVE";
} else {
location.href = location.href + "?_ij_reload=RELOAD_ON_SAVE";
}
}
}
let theme = colors;
if(localStorage.getItem("theme.colors")) {
theme = localStorage.getItem("theme.colors");
Expand Down Expand Up @@ -52,4 +61,26 @@ function changeTheme() {

function syncDesktop() {
desktop = true;
}

function enableOverlay(url) {
if(url) {
if(typeof url === "string") {
const overlay = document.getElementById("overlay");
const frame = document.getElementById("overlay-frame");
frame.src = url;
if (!overlay.classList.contains("active")) {
overlay.classList.add("active");
}
}
}
}

function disableOverlay() {
const overlay = document.getElementById("overlay");
if(overlay.classList.contains("active")) {
overlay.classList.remove("active");
}
const frame = document.getElementById("overlay-frame");
frame.src = "";
}
12 changes: 9 additions & 3 deletions application-ui/content/en/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,15 @@
</div>
</div>
</div><script>initMenu('menu');</script>
<iframe id="iframe" class="cnt" style="border: none;">
Error...
</iframe>
<div class="cnt">
<div id="overlay">
<iframe id="overlay-frame"></iframe>
<a class="close-overlay button danger hover-wiggle wiggle-low" onclick="disableOverlay();">Close <i class='bx bx-x'></i></a>
</div>
<iframe id="iframe" class="cnt" style="border: none;">
Error...
</iframe>
</div>
</div>
<script>initModulePage(); init();</script>
</body>
Expand Down
16 changes: 14 additions & 2 deletions application-ui/content/en/discover.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
</div>
</div><script>initMenu('menu');</script>
<div class="discover-content">
<div id="overlay">
<iframe id="overlay-frame"></iframe>
<a class="close-overlay button danger hover-wiggle wiggle-low" onclick="disableOverlay();">Close <i class='bx bx-x'></i></a>
</div>
<div class="card search flex" id="search-card">
<div class="search-buttons flex">
<div class="buttons" id="discover-buttons">
Expand Down Expand Up @@ -96,12 +100,20 @@ <h4 class="danger" id="close-search-button" onclick="closeSearch();">X</h4>
</div>
<div id="search-content">
<div class="card search-result" id="result-template">

<div class="flex">
<div class="search-image">
<img alt="result image" onclick="connector('java.overlay');" src="../assets/application/images/nero.png">
</div>
<div class="search-details">
<div class="flex">
<h2 class="search-title">title</h2>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
5 changes: 4 additions & 1 deletion application-ui/content/en/library.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@
</div><script>initMenu('menu');</script>
</div>
<div class="cnt">
<div id="overlay">
<iframe id="overlay-frame"></iframe>
<a class="close-overlay button danger hover-wiggle wiggle-low" onclick="disableOverlay();">Close <i class='bx bx-x'></i></a>
</div>
<div class="library flex">
<div class="library-menu">
<div class="card">
<h4 id="game-module-title">
Game:
<label>
<select id="select-game-module" onchange="onModuleChange();">
<option id="add-module-option" value="-1">Add game module...</option>
Expand Down
7 changes: 6 additions & 1 deletion application-ui/content/en/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<script src="../assets/cronos/javascript/app-menu.js"></script>
<script src="../assets/application/javascript/app-shared.js"></script>
<script src="../assets/application/javascript/app-settings.js"></script>
<script>console.log("[CONNECTOR] init.settings"); init();</script>
<script>init();</script>
</head>
<body>
<div class="flex full">
Expand Down Expand Up @@ -61,6 +61,10 @@
</div>
</div><script>initMenu('menu');</script>
<div class="cnt">
<div id="overlay">
<iframe id="overlay-frame"></iframe>
<a class="close-overlay button danger hover-wiggle wiggle-low" onclick="disableOverlay();">Close <i class='bx bx-x'></i></a>
</div>
<div class="settings">
<div class="settings-menu">
<div class="card card-disabled">
Expand Down Expand Up @@ -99,6 +103,7 @@ <h3>Modules</h3>
<span>Loading menu entry...</span>
</li>
</ul>
<script>connector('init.settings.modules');</script>
</div>
<h3>Actions</h3>
<ul>
Expand Down

0 comments on commit 11377ce

Please sign in to comment.