From 5d1321724a77df86d02b8a278de3185227851cf8 Mon Sep 17 00:00:00 2001 From: zhbaor Date: Thu, 6 Feb 2025 17:15:00 +0800 Subject: [PATCH] =?UTF-8?q?UI=E6=94=B9=E8=BF=9B=EF=BC=9B=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E8=87=B3AutoJs6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 383 +++++++++++++++++++++++++++++++-------------------- project.json | 36 +---- 2 files changed, 240 insertions(+), 179 deletions(-) diff --git a/main.js b/main.js index 1358051..ab771de 100644 --- a/main.js +++ b/main.js @@ -1,136 +1,97 @@ +"ui"; + storage = storages.create("mower-ng helper"); wx = storage.get("wx", 10); wy = storage.get("wy", 10); http_proto = storage.get("http_proto", "http"); -host = storage.get("host", "127.0.0.1:58000"); +host = storage.get("host", "127.0.0.1"); +port = storage.get("port", "58000"); -rawInput( - "连接地址(要写http://或https://,不写token)", - `${http_proto}://${host}`, - (url) => { - [http_proto, host] = url.split("://"); - storage.put("http_proto", http_proto); - storage.put("host", host); - } -); +function save_config() { + http_proto = ui.proto.getText(); + host = ui.host.getText(); + port = ui.port.getText(); + storage.put("http_proto", http_proto); + storage.put("host", host); + storage.put("port", port); +} -w = floaty.rawWindow( - - - - - - +w = null; + +ui.layout( + + + + + + - - + + + + + + + + + + + + + +