From ac870b13100a3d3d0433874dbf42e7c1d930553b Mon Sep 17 00:00:00 2001 From: White Red Date: Mon, 13 Jan 2025 14:43:51 +0200 Subject: [PATCH] feat: add start ap button to help reconfigure wifi --- data/assets/ap-icon.webp | Bin 0 -> 548 bytes data/index.html | 14 +++++++++++ main/main.cpp | 12 +++++++++ sdkconfig.defaults | 52 +++++++++++++++++++-------------------- 4 files changed, 51 insertions(+), 27 deletions(-) create mode 100644 data/assets/ap-icon.webp diff --git a/data/assets/ap-icon.webp b/data/assets/ap-icon.webp new file mode 100644 index 0000000000000000000000000000000000000000..46bf4a3e40a47368028186d825e896ea47732537 GIT binary patch literal 548 zcmV+<0^9vkNk&E-0ssJ4MM6+kP&il$0000G0000V0018V06|PpNYwxU009QLwY9fx zB-x#|Ns~Bx3+{nZIhEE7X#tkbq2~_Hi~vZ5{(TX_z-=Q%UdH2l1a^4&leu@fPUGm{{Z*StQW0YZLx}a zrMvCtu6^l8t74 z-U@hB0_7(0nN~3X0RH)HDJ&AF&n9c29V(HN+84?l$;Ie)`Dz*-%D0g-x9hff^fodR z1(GZ0UFaWR4yQ*k1i`4Fsl)`9b!kKkb3*x-R2@Aq^T!3UIzm!=Ez{)GDn#v+k7yFA z&(bXht1)KqJq8|W2_?2=PsRy182oAsUfqucZ!XQx{wEs33&&306^qViVz9@r2mq*z@ppk m5H*maERv2lB{t<2sZEXnI%{lU6r#htOzLO@8f9$hfB*o@Q}f0E literal 0 HcmV?d00001 diff --git a/data/index.html b/data/index.html index 7a1554f..7b20490 100644 --- a/data/index.html +++ b/data/index.html @@ -198,6 +198,13 @@ document.title = `HK-ESP32 - ${name.toUpperCase()}` } } + async function start_ap() { + if(confirm("Are you sure you want to start the AP?")){ + let data = await fetch("/start_config_ap"); + let string = await data.text(); + alert(string); + } + } async function reboot() { if(confirm("Are you sure you want to reboot the device?")){ let data = await fetch("/reboot_device"); @@ -327,6 +334,13 @@

+