Skip to content

Commit

Permalink
Updated for release 2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Dec 1, 2021
1 parent 8c7f028 commit 3874301
Show file tree
Hide file tree
Showing 11 changed files with 273 additions and 9 deletions.
1 change: 1 addition & 0 deletions html/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<img src="../images/about.png" alt="about box">
</div>
<div class="buttonArea">
<button id="system">System Information</button>
<button class="right" id="licenses">Licenses</button>
</div>
<script src="../js/about.js"></script>
Expand Down
34 changes: 34 additions & 0 deletions html/systemInfo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">

<head>
<title >System Information</title>
<link id="theme" rel="stylesheet" type="text/css" href="../css/light.css">
<link rel="stylesheet" type="text/css" href="../css/fonts.css">
</head>

<body id="body">

<table>
<tr>
<td>TMXEditor</td>
<td id="tmxeditor"></td>
</tr>
<tr>
<td>OpenXLIFF</td>
<td id="openxliff"></td>
</tr>
<tr>
<td>Java</td>
<td id="java"></td>
</tr>
<tr>
<td>Electron</td>
<td id="electron"></td>
</tr>
</table>
<script src="../js/keyboardHandler.js"></script>
<script src="../js/systemInfo.js"></script>
</body>

</html>
Binary file modified jars/openxliff.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tmxeditor",
"productName": "TMXEditor",
"version": "2.8.0",
"version": "2.9.0",
"description": "TMX Editor",
"main": "js/app.js",
"scripts": {
Expand All @@ -19,7 +19,7 @@
"url": "https://github.com/rmraya/TMXEditor.git"
},
"devDependencies": {
"electron": "^16.0.1",
"electron": "^16.0.3",
"typescript": "^4.5.2"
}
}
4 changes: 2 additions & 2 deletions src/com/maxprograms/tmxserver/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ private Constants() {
}

public static final String APPNAME = "TMXEditor";
public static final String VERSION = "2.8.0";
public static final String BUILD = "20211122_1037";
public static final String VERSION = "2.9.0";
public static final String BUILD = "20211201_0811";

public static final String REASON = "reason";
public static final String STATUS = "status";
Expand Down
11 changes: 11 additions & 0 deletions src/com/maxprograms/tmxserver/TMXServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ public void handle(HttpExchange t) throws IOException {
case "processTasks":
response = processTasks(json);
break;
case "systemInfo":
response = getSystemInformation();
break;
default:
JSONObject unknown = new JSONObject();
unknown.put(Constants.STATUS, Constants.ERROR);
Expand Down Expand Up @@ -721,4 +724,12 @@ private String getTuData(String id) {
private String getTuvData(String id, String lang) {
return service.getTuvData(id, lang).toString();
}

private static String getSystemInformation() {
JSONObject result = new JSONObject();
result.put("tmxeditor", Constants.VERSION + " Build: " + Constants.BUILD);
result.put("openxliff", com.maxprograms.converters.Constants.VERSION + " Build: " + com.maxprograms.converters.Constants.BUILD);
result.put("java", System.getProperty("java.version") + " Vendor: " + System.getProperty("java.vendor"));
return result.toString();
}
}
Binary file modified tmxeditor.pdf
Binary file not shown.
8 changes: 5 additions & 3 deletions ts/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ class About {
this.electron.ipcRenderer.on('set-version', (event: Electron.IpcRendererEvent, arg: any) => {
document.getElementById('version').innerHTML = arg;
});
document.getElementById('system').addEventListener('click', () => {
this.electron.ipcRenderer.send('system-info-clicked');
document.getElementById('system').blur();
});
document.getElementById('licenses').addEventListener('click', () => {
this.electron.ipcRenderer.send('licenses-clicked');
document.getElementById('licenses').blur();
});
document.addEventListener('keydown', (event: KeyboardEvent) => {
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
this.electron.ipcRenderer.send('licenses-clicked');
}
if (event.code === 'Escape') {
this.electron.ipcRenderer.send('close-about');
}
Expand Down
Loading

0 comments on commit 3874301

Please sign in to comment.