Device Name dialog validation (#676)

* fix: style on config page

* feat: added device name validation

* Update src/i18n/locales/en/dialog.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/components/Dialog/DeviceNameDialog.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/components/Dialog/DeviceNameDialog.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fixed typo

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Dan Ditomaso
2025-06-21 23:08:25 -04:00
committed by GitHub
co-authored by Copilot
parent c6a564f7e4
commit 43143bfdf6
8 changed files with 769 additions and 732 deletions
+16 -5
View File
@@ -7,7 +7,13 @@
"description": "The Device will restart once the config is saved.",
"longName": "Long Name",
"shortName": "Short Name",
"title": "Change Device Name"
"title": "Change Device Name",
"validation": {
"longNameMax": "Long name must not be more than 40 characters",
"shortNameMax": "Short name must not be more than 4 characters",
"longNameMin": "Long name must have at least 1 character",
"shortNameMin": "Short name must have at least 1 character"
}
},
"import": {
"description": "The current LoRa configuration will be overridden.",
@@ -21,9 +27,10 @@
"title": "Import Channel Set"
},
"locationResponse": {
"title": "Location: {{identifier}}",
"altitude": "Altitude: ",
"coordinates": "Coordinates: ",
"title": "Location: {{identifier}}"
"noCoordinates": "No Coordinates"
},
"pkiRegenerateDialog": {
"title": "Regenerate Pre-Shared Key?",
@@ -61,11 +68,15 @@
},
"bluetoothConnection": {
"noDevicesPaired": "No devices paired yet.",
"newDeviceButton": "New device"
"newDeviceButton": "New device",
"connectionFailed": "Connection failed",
"deviceDisconnected": "Device disconnected",
"unknownDevice": "Unknown Device",
"errorLoadingDevices": "Error loading devices",
"unknownErrorLoadingDevices": "Unknown error loading devices"
},
"validation": {
"requiresWebBluetooth": "This connection type requires <0>Web Bluetooth</0>. Please use a supported browser, like Chrome or Edge.",
"requiresWebSerial": "This connection type requires <0>Web Serial</0>. Please use a supported browser, like Chrome or Edge.",
"requiresFeatures": "This connection type requires <0></0>. Please use a supported browser, like Chrome or Edge.",
"requiresSecureContext": "This application requires a <0>secure context</0>. Please connect using HTTPS or localhost.",
"additionallyRequiresSecureContext": "Additionally, it requires a <0>secure context</0>. Please connect using HTTPS or localhost."
}