Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance/delcre #464

Merged
merged 4 commits into from
Feb 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Documentation of the credentials removal function
Hieromon committed Feb 16, 2022

Verified

This commit was signed with the committer’s verified signature.
myii Imran Iqbal
commit 6632ab5b743ef8e757a5f3981b333cb5487365c0
4 changes: 3 additions & 1 deletion mkdocs/api.md
Original file line number Diff line number Diff line change
@@ -212,7 +212,9 @@ This function only works for AutoConnect primary menu items. It has no effect on
: - **AC_MENUITEM_HOME** :
[HOME](menu.md#home)
: - **AC_MENUITEM_DEVINFO** :
[Device statistics](menu.md#where-the-from) as AutoConnect root page</dl>
[Device statistics](menu.md#where-the-from) as AutoConnect root page
: - **AC_MENUITEM_DELETESSID** :
Enable to delete credentials on [Open SSIDs](http://localhost:8000/AutoConnect/menu.html#open-ssids).</dl>

!!! note "It is added, not replaced."
The initial configuration of the AutoConnect menu items:
14 changes: 13 additions & 1 deletion mkdocs/apiconfig.md
Original file line number Diff line number Diff line change
@@ -220,13 +220,25 @@ Configure applying items of the [AutoConnect menu](menu.md). You can arbitrarily
<dd><span class="apidef">AC_MENUITEM_RESET</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends [Reset...](menu.md#reset) item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_UPDATE</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends [Update](menu.md#update) item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_HOME</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends [HOME](menu.md#home) item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_DEVINFO</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends the **Device info** item which links to [AutoConnect statistics page](menu.md##where-the-from).</span></dd></dl>
<dd><span class="apidef">AC_MENUITEM_DEVINFO</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends the **Device info** item which links to [AutoConnect statistics page](menu.md##where-the-from).</span></dd>
<dd><span class="apidef">AC_MENUITEM_DELETESSID</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Enables the ability to interactively delete credentials on the [Open SSIDs](menu.md#open-ssids) menu screen.</span></dd></dl>

!!! info "How to specify the value of the menu items"
An menuItems accepts the logical OR of AC_MENUITEM_t type value. For example, to enable only Open SSIDs and HOME items, specify:
```cpp
AutoConnect portal;
AutoConnectConfig config;

config.menuItems = AC_MENUITEM_OPENSSIDS | AC_MENUITEM_HOME;
portal.config(config);
```
Also, to enable the credentials removal feature, follow these settings procedures.
```cpp
AutoConnect portal;
AutoConnectConfig config;

config.menuItems = config.menuItems | AC_MENUITEM_DELETESSID;
portal.config(config);
```
However, even if you specify like the above, the AutoConnectAux page items still display on the menu. To remove the AutoConnectAux items, use the [AutoConnectAux::menu](apiaux.md#menu) function.

2 changes: 2 additions & 0 deletions mkdocs/changelabel.md
Original file line number Diff line number Diff line change
@@ -66,6 +66,8 @@ AutoConnect label texts are pre-assigned with a fixed string so that it can be d
<tr><td>Passphrase</td><td>AUTOCONNECT_PAGECONFIG_PASSPHRASE</td></tr>
<tr><td>Enable DHCP</td><td>AUTOCONNECT_PAGECONFIG_ENABLEDHCP</td></tr>
<tr><td>Apply</td><td>AUTOCONNECT_PAGECONFIG_APPLY</td></tr>
<tr><td rowspan="2">Page:[open SSIDs] text</td><td>Delete a credential?</td><td>AUTOCONNECT_TEXT_DELETECREDENTIAL</td></tr>
<tr><td>could not deleted</td><td>AUTOCONNECT_TEXT_COULDNOTDELETED</td></tr>
<tr><td rowspan="4">Page:[update] text</td><td>Updating firmware</td><td>AUTOCONNECT_TEXT_UPDATINGFIRMWARE</td></tr>
<tr><td>Select firmware:</td><td>AUTOCONNECT_TEXT_SELECTFIRMWARE</td></tr>
<tr><td>Successfully updated, rebooting...</td><td>AUTOCONNECT_TEXT_OTASUCCESS</td></tr>
Binary file removed mkdocs/images/open.png
Binary file not shown.
Binary file modified mkdocs/images/openssid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mkdocs/images/openssid_trash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion mkdocs/menu.md
Original file line number Diff line number Diff line change
@@ -40,7 +40,11 @@ If you want to configure with static IP, uncheck "**Enable DHCP**". Once the WiF

After WiFi connected, AutoConnect will automatically save the established SSID and password to the flash on the ESP module. **Open SSIDs** menu reads the saved SSID credentials and lists them as below. Listed items are clickable buttons and can initiate a connection to its access point.

<img src="images/open.png" style="border-style:solid;border-width:1px;border-color:lightgrey;width:280px;" />
<img src="images/openssid.png" style="border-style:solid;border-width:1px;border-color:lightgrey;width:280px;" />

Also, this menu allows you to interactively delete the stored credentials. <i class="fa fa-trash-alt"></i> icon will appear next to each SSID in the Open SSIDs menu when the credential removal feature is enabled with [AutoConnectConfig::menuItems](apiconfig.md#menuitems). Clicking the <i class="fa fa-trash-alt"></i> on this screen will delete the SSID. This feature is disabled by default.

<img src="images/openssid_trash.png" style="border-style:solid;border-width:1px;border-color:lightgrey;width:280px;" />

!!! note "Saved credentials data structure has changed"
A structure of AutoConnect saved credentials has changed in v1.1.0 and was lost backward compatibility. Credentials saved by AutoConnect v1.0.3 (or earlier) will not display properly with AutoConnect v1.1.0. You need to erase the flash of the ESP module using the esptool before the Sketch uploading.