diff --git a/console/atest-desktop/index.html b/console/atest-desktop/index.html
index b7f675e2..418c6b83 100644
--- a/console/atest-desktop/index.html
+++ b/console/atest-desktop/index.html
@@ -9,19 +9,51 @@
-
+
Server Status
-
-
-
- Port:
-
-
-
-
-
Log
-
+
+
@@ -39,6 +71,15 @@
}
})
+document.getElementById('open-from-browser').addEventListener('click', async (e) => {
+ const address = await window.electronAPI.getHomePage();
+ if (address) {
+ await window.electronAPI.openWithExternalBrowser(address);
+ } else {
+ alert('Please start the server first!');
+ }
+})
+
const openServerBut = document.getElementById('open-server-page');
openServerBut.addEventListener('click', async (e) => {
window.location = await window.electronAPI.getHomePage()
@@ -63,9 +104,27 @@
window.setInterval(loadServerStatus, 2000)
const portInput = document.getElementById('port');
+portInput.addEventListener("input", function(e) {
+ window.electronAPI.setPort(portInput.value)
+});
+
+const extensionRegistry = document.getElementById('extension-registry');
+extensionRegistry.addEventListener("input", function(e) {
+ window.electronAPI.setExtensionRegistry(extensionRegistry.value)
+});
+
+const downloadTimeout = document.getElementById('download-timeout');
+downloadTimeout.addEventListener("input", function(e) {
+ window.electronAPI.setDownloadTimeout(downloadTimeout.value)
+});
+
(async function() {
portInput.value = await window.electronAPI.getPort()
+ extensionRegistry.value = await window.electronAPI.getExtensionRegistry()
+ downloadTimeout.value = await window.electronAPI.getDownloadTimeout()
+
+ document.getElementById('address').innerText = await window.electronAPI.getHomePage();
})();
-