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

Commit

Permalink
Fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldieeins committed Aug 11, 2024
1 parent 98f8913 commit ef26de1
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Zyneon Application ```2024.5 (Protonium)``` [Download latest version](https://github.com/danieldieeins/Zyneon-Application/releases/latest)
Zyneon Application ```2024.8 (Aurora Borealis)``` [Download latest version](https://github.com/danieldieeins/Zyneon-Application/releases/latest)
<br>`Contributions are welcome!` [Visit the rewrite branch to contribute](https://github.com/danieldieeins/Zyneon-Application/tree/shervann)

Download the Zyneon Application from https://github.com/danieldieeins/Zyneon-Application/releases and https://nexus.zyneonstudios.com/application only! All other sources are not verified and we assume no liability!
Expand Down
4 changes: 2 additions & 2 deletions application-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>application-main</artifactId>
<version>2024.7.1f</version>
<version>2024.8</version>

<properties>
<maven.compiler.source>21</maven.compiler.source>
Expand Down Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>fr.flowarg</groupId>
<artifactId>flowupdater</artifactId>
<version>LATEST</version>
<version>1.8.5</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions application-main/src/main/java/com/zyneonstudios/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public static void main(String[] args) {
splash = new ZyneonSplash();
splash.setVisible(true);
FileUtil.deleteFolder(new File(getDirectoryPath()+"temp/"));
version = "2024.7.1f";
version = "2024.8";
ArrayList<String> arguments = new ArrayList<>();
String name = "Transitum";
String name = "Aurora Borealis";
architecture = getArchitecture();
logger = new ZLogger("ZYNEON");
String fullVersion = version+" ▪ "+name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ private void syncSettings(String type) {

public void resolveRequest(String request) {
//frame.sendNotification("Resolving...","(BackendConnector) resolving "+request+"...","",false);
frame.executeJavaScript("checkForWeb();");
if (request.equals("button.copy.uuid")) {
StringSelection uuid = new StringSelection(StringUtil.addHyphensToUUID(Application.auth.getAuthInfos().getUuid()));
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
Expand Down Expand Up @@ -268,30 +269,30 @@ public void resolveRequest(String request) {
syncSettings("global");
}
} else if (request.contains("sync.instances.list")) {
SwingUtilities.invokeLater(() -> {
Application.getInstancePath();
String filePath = Main.getDirectoryPath() + "libs/zyneon/instances.json";
Gson gson = new Gson();
try (JsonReader reader = new JsonReader(new FileReader(filePath))) {
JsonObject jsonObject = gson.fromJson(reader, JsonObject.class);
JsonArray instances = jsonObject.getAsJsonArray("instances");
for (JsonElement element : instances) {
JsonObject instance = element.getAsJsonObject();
String png = "assets/zyneon/images/instances/" + instance.get("id").toString().replace("\"", "") + ".png";
if (new File(Application.getURLBase() + png).exists()) {
frame.executeJavaScript("addInstanceToList(" + instance.get("id") + "," + instance.get("name") + ",'" + png + "',true);");
} else if (instance.get("icon") != null) {
png = instance.get("icon").toString().replace("\"", "");
frame.executeJavaScript("addInstanceToList(" + instance.get("id") + "," + instance.get("name") + ",'" + png + "',true);");
} else {
frame.executeJavaScript("addInstanceToList(" + instance.get("id") + "," + instance.get("name") + ",true);");
}
CompletableFuture.runAsync(()->{
JsonObject instance = element.getAsJsonObject();
String png = "assets/zyneon/images/instances/" + instance.get("id").toString().replace("\"", "") + ".png";
if (new File(Application.getURLBase() + png).exists()) {
frame.executeJavaScript("addInstanceToList(" + instance.get("id") + "," + instance.get("name") + ",'" + png + "',true);");
} else if (instance.get("icon") != null) {
png = instance.get("icon").toString().replace("\"", "");
frame.executeJavaScript("addInstanceToList(" + instance.get("id") + "," + instance.get("name") + ",'" + png + "',true);");
} else {
frame.executeJavaScript("addInstanceToList(" + instance.get("id") + "," + instance.get("name") + ",true);");
}
});
}
} catch (IOException e) {
Main.getLogger().error(e.getMessage());
}
frame.executeJavaScript("loadTab('" + Application.lastInstance + "');");
});
} else if (request.contains("sync.web")) {
frame.getBrowser().loadURL(Application.getOnlineStartURL());
} else if (request.contains("sync.start")) {
Expand Down Expand Up @@ -349,7 +350,7 @@ public void resolveRequest(String request) {
SwingUtilities.invokeLater(() -> frame.getInstance().dispatchEvent(new WindowEvent(frame.getInstance(), WindowEvent.WINDOW_CLOSING)));
} else if (request.contains("button.instance.")) {
String id = request.replace("button.instance.", "").toLowerCase();
SwingUtilities.invokeLater(() -> {
CompletableFuture.runAsync(() -> {
File file = new File(Application.getInstancePath() + "instances/" + id + "/zyneonInstance.json");
if (file.exists()) {
ReadableInstance instance = new ReadableInstance(file);
Expand Down Expand Up @@ -465,7 +466,7 @@ public void resolveRequest(String request) {
resolveRequest("button.refresh.instances");
}
} else if (request.contains("sync.search.")) {
request = request.replace("sync.search.","");
request = request.replace("sync.search.","").replace("%DOT�",".de");
String[] request_ = request.split("\\.", 7);
String source = request_[0];
String type = request_[1];
Expand Down
Binary file modified application-main/src/main/resources/content.zip
Binary file not shown.
Binary file modified application-ui/content/assets/zyneon/images/zyneon-bg.png
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 application-ui/content/start.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h3 id="notification-actions"><a class="button">Restart</a><a class="button">Dyn
<div class="flex">
<div>
<h1>Zyneon Application</h1>
<h3>2024.7.1 - Transitum</h3>
<h3>2024.8 - Aurora Borealis</h3>
</div>
<div>
<div class="card">
Expand Down
2 changes: 1 addition & 1 deletion application-ui/content/sub/installing.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<body>
<div class="content-rows" id="top">
<div class="menu" id="main"></div>
<div class="content">
<div class="content" style="border-top-left-radius: 1.5rem;">
<div class="center">
<div class="card">
<h1>Installing... <i class='bx bx-loader-alt bx-spin bx-rotate-90' ></i></h1>
Expand Down
2 changes: 1 addition & 1 deletion application-ui/content/sub/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="content-rows" id="top">

<div class="menu" id="main"></div>
<div class="content">
<div class="content" style="border-top-left-radius: 1.5rem;">
<div class="center">
<div class="card">
<h1>Logging in... <i class='bx bx-loader-alt bx-spin bx-rotate-90' ></i></h1>
Expand Down
2 changes: 1 addition & 1 deletion application-ui/content/sub/updating.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<body>
<div class="content-rows" id="top">
<div class="menu" id="main"></div>
<div class="content">
<div class="content" style="border-top-left-radius: 1.5rem;">
<div class="center">
<div class="card">
<h1>Updating... <i class='bx bx-loader-alt bx-spin bx-rotate-90' ></i></h1>
Expand Down

0 comments on commit ef26de1

Please sign in to comment.