feat #1611: Add confirmation dialog when changing to router role (#1636)

* Add confirmation dialog for changing to router role

Introduced a confirmation dialog that will be shown when changing the device role to "router".
The confirmation dialog includes links to the "Device Role Documentation" and "Choosing The Right Device Role" blog post.
The user must check a checkbox to confirm.

* Update router role handling

Modified the handling of the router role in `DeviceConfigItemList.kt` to avoid returning prematurely from the `onItemSelected` lambda. This ensures that the role is updated properly when a user selects the "ROUTER" role.

* removes konami code check, remove testing code

* Refactor router role confirmation text

- Moves the router role confirmation text to strings.xml.
- Updates to use `AnnotatedString.fromHtml` instead of `buildAnnotatedString` and `withLink`.
- Changes from hard-coded strings to string resources.
This commit is contained in:
James Rich 2025-03-05 07:26:19 -06:00 committed by GitHub
parent 888688176c
commit 2859bed416
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 83 additions and 1 deletions

View file

@ -328,4 +328,7 @@
<string name="channel_3">Channel 3</string>
<string name="current">Current</string>
<string name="voltage">Voltage</string>
<string name="are_you_sure">Are you sure?</string>
<string name="router_role_confirmation_text"><![CDATA[I have read the <a href="https://meshtastic.org/docs/configuration/radio/device/#roles">Device Role Documentation</a> and the blog post about <a href="http://meshtastic.org/blog/choosing-the-right-device-role">Choosing The Right Device Role</a>.]]></string>
<string name="i_know_what_i_m_doing">I know what I\'m doing.</string>
</resources>