mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-15 07:04:26 +10:00
Compare commits
146 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa4da979af | |||
| 91608ff09e | |||
| 71f59d23df | |||
| e90742be25 | |||
| db935a7454 | |||
| 1ad5db27ca | |||
| 81758adc61 | |||
| c81791cf1e | |||
| 1fba5312a2 | |||
| 2f770bbd53 | |||
| 9db79e9d40 | |||
| 1913a5aa11 | |||
| 929c1c3d28 | |||
| 7a2bb20bf7 | |||
| a1b77bb29b | |||
| 4eecfc92dc | |||
| 90c8cf5f3e | |||
| 06fa176367 | |||
| e4285774a0 | |||
| b2da695102 | |||
| e1327a93c7 | |||
| 421bc71bb7 | |||
| fef73b7b62 | |||
| 84ec139ce6 | |||
| b748b96237 | |||
| c2671ac2ae | |||
| 8238b6197f | |||
| 435ba89982 | |||
| 0565cee461 | |||
| ab2b509d6a | |||
| eba95af31f | |||
| 04c016cfe1 | |||
| ea2354712d | |||
| 7a0b8aad3d | |||
| bd34bb5e88 | |||
| 81548fdc21 | |||
| b2770ef028 | |||
| 7c479f9121 | |||
| 1f2dfc555b | |||
| 8eb6f32fef | |||
| d96cd34771 | |||
| fb58a3262c | |||
| f584c4fba0 | |||
| b5b930646f | |||
| 3452bdae8c | |||
| 25fc9454a8 | |||
| 524558c511 | |||
| 367e47bb1e | |||
| 21ff765e41 | |||
| 38d40ca0a4 | |||
| 5b4535d5dc | |||
| f9b6299620 | |||
| 7cb84dbf6f | |||
| 44c0670dae | |||
| 74da9e82b5 | |||
| 63583dadda | |||
| 32632669c3 | |||
| 3c0c0d1dea | |||
| e6c9a3fea7 | |||
| f5154b0033 | |||
| 4c7ee3b3b0 | |||
| c2f544eeba | |||
| 98cdac4309 | |||
| d6d11eaad2 | |||
| 3cef9e81b6 | |||
| 5216e00807 | |||
| a0feb129e1 | |||
| f39a22668e | |||
| 781090243c | |||
| ca5784f3f8 | |||
| dcad5c586d | |||
| 4b24506310 | |||
| 47c4e0fb82 | |||
| c041e05972 | |||
| 612612795a | |||
| 3cec3dc233 | |||
| 3542adad1d | |||
| 115689ad95 | |||
| 9a0572e8e4 | |||
| 2d1160d992 | |||
| ee3af52c0f | |||
| 98f7c3b088 | |||
| f462815775 | |||
| 5f4333398e | |||
| c23a1da430 | |||
| 22a53439b1 | |||
| 7d8e049745 | |||
| 3502559fae | |||
| e125318137 | |||
| d53465d13b | |||
| a0efbbe4bd | |||
| bd5db9a9d5 | |||
| 79b17b53a0 | |||
| 647fe1523e | |||
| b7d5ee5754 | |||
| 38856c67e5 | |||
| 6bd3c17cdf | |||
| 6d0712c450 | |||
| ddeb1edc2e | |||
| 8d73602509 | |||
| fcab69f9f0 | |||
| d2640e1294 | |||
| b02225c02e | |||
| 128e99e3e7 | |||
| 12bf46bba1 | |||
| 92d8e7cd0b | |||
| 75610695c2 | |||
| 57ea30cae9 | |||
| e139383335 | |||
| 64428294c9 | |||
| e7a8c36bc4 | |||
| 2a62390903 | |||
| 75d25f6312 | |||
| 2a3119544c | |||
| fb41a5bf10 | |||
| d88786bb0f | |||
| e3148dd449 | |||
| 96371c03ae | |||
| cac65face6 | |||
| a777236cd9 | |||
| 7740698cde | |||
| c8f93f9902 | |||
| c34be44950 | |||
| 549fc62632 | |||
| 53d073d8f2 | |||
| 4975b5366e | |||
| c284e571b0 | |||
| a1ee0789a6 | |||
| 40ac95e8e6 | |||
| 377f1df445 | |||
| 9865a03c53 | |||
| a5555bd606 | |||
| 1b4d31a36e | |||
| 8e07440114 | |||
| 71129bdf4d | |||
| ab05cf8b3e | |||
| 452e5337f0 | |||
| 6ac987e7cf | |||
| 5522f9a236 | |||
| b4f79c1aae | |||
| b08defcff4 | |||
| 5676cbd84e | |||
| cf8f01128b | |||
| b5e47ce44f | |||
| 7b2f75047c | |||
| 6d63e49938 |
@@ -0,0 +1,38 @@
|
||||
name: Deploy to Cloudflare Workers
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
# Match local development version which provides Dart 3.11.0
|
||||
flutter-version: '3.41.2'
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Get dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Build Web
|
||||
run: bun run build
|
||||
|
||||
- name: Deploy to Cloudflare
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: deploy
|
||||
@@ -83,3 +83,6 @@ keystore.properties
|
||||
# IDE
|
||||
.vscode/launch.json
|
||||
.vscode/settings.json
|
||||
|
||||
# Cloudflare Wrangler
|
||||
.wrangler
|
||||
@@ -0,0 +1 @@
|
||||
6.2.4
|
||||
@@ -231,6 +231,11 @@ If you find MeshCore Open useful and would like to support development, you can
|
||||
|
||||
**Solana Address:** `F15YanjZj96YTBtKJYgNa8RLQLCZkx5CEwogPWkqXeoQ`
|
||||
|
||||
|
||||
**Monero Address:** `453TxnpUqjkJtXxzdjMsrgERNkBRXEGamPbpC45ENrvKAk9tH7kZbxWF82Hz66etgDZyXFPEBU2JUEqhLeJyWt9kBvTVy5m`
|
||||
|
||||
**Bitcoin Address:** `bc1qh45x28v8dslcg4v4upmqd9g0mvc3lnyffmyzr5`
|
||||
|
||||
Your support helps maintain and improve this open-source project!
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<!-- Camera permission for QR code scanning -->
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.usb.host" android:required="false"/>
|
||||
|
||||
<application
|
||||
android:label="meshcore_open"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
package com.meshcore.meshcore_open
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
|
||||
class MainActivity : FlutterActivity()
|
||||
class MainActivity : FlutterActivity() {
|
||||
private val usbFunctions by lazy { MeshcoreUsbFunctions(this) }
|
||||
|
||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
super.configureFlutterEngine(flutterEngine)
|
||||
usbFunctions.configureFlutterEngine(flutterEngine)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
usbFunctions.dispose()
|
||||
super.onDestroy()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,582 @@
|
||||
package com.meshcore.meshcore_open
|
||||
|
||||
import android.app.PendingIntent
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.hardware.usb.UsbConstants
|
||||
import android.hardware.usb.UsbDevice
|
||||
import android.hardware.usb.UsbDeviceConnection
|
||||
import android.hardware.usb.UsbEndpoint
|
||||
import android.hardware.usb.UsbInterface
|
||||
import android.hardware.usb.UsbManager
|
||||
import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugin.common.EventChannel
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
class MeshcoreUsbFunctions(
|
||||
private val activity: FlutterActivity,
|
||||
) {
|
||||
private companion object {
|
||||
const val usbRecipientInterface = 0x01
|
||||
}
|
||||
|
||||
private val usbMethodChannelName = "meshcore_open/android_usb_serial"
|
||||
private val usbEventChannelName = "meshcore_open/android_usb_serial_events"
|
||||
private val usbPermissionAction = "com.meshcore.meshcore_open.USB_PERMISSION"
|
||||
|
||||
private val usbManager by lazy {
|
||||
activity.getSystemService(Context.USB_SERVICE) as UsbManager
|
||||
}
|
||||
private val mainHandler = Handler(Looper.getMainLooper())
|
||||
private val usbIoExecutor: ExecutorService = Executors.newSingleThreadExecutor()
|
||||
|
||||
@Volatile private var eventSink: EventChannel.EventSink? = null
|
||||
@Volatile private var usbConnection: UsbDeviceConnection? = null
|
||||
@Volatile private var usbInEndpoint: UsbEndpoint? = null
|
||||
@Volatile private var usbOutEndpoint: UsbEndpoint? = null
|
||||
@Volatile private var controlInterface: UsbInterface? = null
|
||||
@Volatile private var dataInterface: UsbInterface? = null
|
||||
private var readThread: Thread? = null
|
||||
@Volatile private var isReading = false
|
||||
@Volatile private var connectedDeviceName: String? = null
|
||||
|
||||
private var pendingConnectResult: MethodChannel.Result? = null
|
||||
private var pendingConnectPortName: String? = null
|
||||
private var pendingConnectBaudRate: Int = 115200
|
||||
|
||||
private data class PortConfig(
|
||||
val controlInterface: UsbInterface?,
|
||||
val dataInterface: UsbInterface,
|
||||
val inEndpoint: UsbEndpoint,
|
||||
val outEndpoint: UsbEndpoint,
|
||||
)
|
||||
|
||||
private val permissionReceiver =
|
||||
object : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
when (intent?.action) {
|
||||
UsbManager.ACTION_USB_DEVICE_DETACHED -> {
|
||||
handleUsbDetached(intent)
|
||||
return
|
||||
}
|
||||
usbPermissionAction -> Unit
|
||||
else -> return
|
||||
}
|
||||
|
||||
val result = pendingConnectResult
|
||||
val portName = pendingConnectPortName
|
||||
pendingConnectResult = null
|
||||
pendingConnectPortName = null
|
||||
|
||||
if (result == null || portName == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val device = findUsbDevice(portName)
|
||||
if (device == null) {
|
||||
result.error(
|
||||
"usb_device_missing",
|
||||
null,
|
||||
null,
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
val granted =
|
||||
intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)
|
||||
if (!granted || !usbManager.hasPermission(device)) {
|
||||
result.error("usb_permission_denied", null, null)
|
||||
return
|
||||
}
|
||||
|
||||
openUsbDevice(device, pendingConnectBaudRate, result)
|
||||
}
|
||||
}
|
||||
|
||||
fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
registerUsbPermissionReceiver()
|
||||
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, usbMethodChannelName)
|
||||
.setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"listPorts" -> result.success(listUsbPorts())
|
||||
"connect" -> handleUsbConnect(call, result)
|
||||
"write" -> handleUsbWrite(call, result)
|
||||
"disconnect" -> {
|
||||
scheduleCloseUsbConnection {
|
||||
result.success(null)
|
||||
}
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
EventChannel(flutterEngine.dartExecutor.binaryMessenger, usbEventChannelName)
|
||||
.setStreamHandler(
|
||||
object : EventChannel.StreamHandler {
|
||||
override fun onListen(arguments: Any?, events: EventChannel.EventSink) {
|
||||
eventSink = events
|
||||
}
|
||||
|
||||
override fun onCancel(arguments: Any?) {
|
||||
eventSink = null
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fun dispose() {
|
||||
closeUsbConnection()
|
||||
usbIoExecutor.shutdownNow()
|
||||
try {
|
||||
activity.unregisterReceiver(permissionReceiver)
|
||||
} catch (_: IllegalArgumentException) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun registerUsbPermissionReceiver() {
|
||||
val filter =
|
||||
IntentFilter().apply {
|
||||
addAction(usbPermissionAction)
|
||||
addAction(UsbManager.ACTION_USB_DEVICE_DETACHED)
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
activity.registerReceiver(permissionReceiver, filter, Context.RECEIVER_NOT_EXPORTED)
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
activity.registerReceiver(permissionReceiver, filter)
|
||||
}
|
||||
}
|
||||
|
||||
private fun listUsbPorts(): List<String> {
|
||||
return usbManager.deviceList.values.map { device ->
|
||||
val productName = device.productName ?: "USB Serial Device"
|
||||
val vendorProduct =
|
||||
String.format(
|
||||
Locale.US,
|
||||
"VID:%04X PID:%04X",
|
||||
device.vendorId,
|
||||
device.productId,
|
||||
)
|
||||
"${device.deviceName} - $productName - $vendorProduct"
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleUsbConnect(call: MethodCall, result: MethodChannel.Result) {
|
||||
val portName = call.argument<String>("portName")
|
||||
val baudRate = call.argument<Int>("baudRate") ?: 115200
|
||||
if (portName.isNullOrBlank()) {
|
||||
result.error("usb_invalid_port", null, null)
|
||||
return
|
||||
}
|
||||
|
||||
val device = findUsbDevice(portName)
|
||||
if (device == null) {
|
||||
result.error("usb_device_missing", null, null)
|
||||
return
|
||||
}
|
||||
|
||||
if (usbManager.hasPermission(device)) {
|
||||
openUsbDevice(device, baudRate, result)
|
||||
return
|
||||
}
|
||||
|
||||
if (pendingConnectResult != null) {
|
||||
result.error("usb_busy", null, null)
|
||||
return
|
||||
}
|
||||
|
||||
pendingConnectResult = result
|
||||
pendingConnectPortName = portName
|
||||
pendingConnectBaudRate = baudRate
|
||||
|
||||
val permissionIntent = PendingIntent.getBroadcast(
|
||||
activity,
|
||||
0,
|
||||
Intent(usbPermissionAction).setPackage(activity.packageName),
|
||||
pendingIntentFlags(),
|
||||
)
|
||||
usbManager.requestPermission(device, permissionIntent)
|
||||
}
|
||||
|
||||
private fun handleUsbWrite(call: MethodCall, result: MethodChannel.Result) {
|
||||
val data = call.argument<ByteArray>("data")
|
||||
val connection = usbConnection
|
||||
val endpoint = usbOutEndpoint
|
||||
if (data == null) {
|
||||
result.error("usb_invalid_data", null, null)
|
||||
return
|
||||
}
|
||||
if (connection == null || endpoint == null) {
|
||||
result.error("usb_not_connected", null, null)
|
||||
return
|
||||
}
|
||||
|
||||
usbIoExecutor.execute {
|
||||
try {
|
||||
writeToDevice(data)
|
||||
mainHandler.post { result.success(null) }
|
||||
} catch (error: Exception) {
|
||||
mainHandler.post {
|
||||
result.error("usb_write_failed", error.message, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun findUsbDevice(portName: String): UsbDevice? {
|
||||
val devices = usbManager.deviceList.values
|
||||
val exactMatch = devices.firstOrNull { it.deviceName == portName }
|
||||
if (exactMatch != null) {
|
||||
return exactMatch
|
||||
}
|
||||
|
||||
val normalizedName = portName.substringBefore(" - ").trim()
|
||||
return devices.firstOrNull { it.deviceName == normalizedName }
|
||||
}
|
||||
|
||||
private fun openUsbDevice(
|
||||
device: UsbDevice,
|
||||
baudRate: Int,
|
||||
result: MethodChannel.Result,
|
||||
) {
|
||||
usbIoExecutor.execute {
|
||||
try {
|
||||
closeUsbConnection()
|
||||
|
||||
val config = resolvePortConfig(device)
|
||||
if (config == null) {
|
||||
mainHandler.post {
|
||||
result.error(
|
||||
"usb_driver_missing",
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
return@execute
|
||||
}
|
||||
|
||||
val connection = usbManager.openDevice(device)
|
||||
if (connection == null) {
|
||||
mainHandler.post {
|
||||
result.error(
|
||||
"usb_open_failed",
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
return@execute
|
||||
}
|
||||
|
||||
if (!connection.claimInterface(config.dataInterface, true)) {
|
||||
connection.close()
|
||||
mainHandler.post {
|
||||
result.error(
|
||||
"usb_open_failed",
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
return@execute
|
||||
}
|
||||
|
||||
if (config.controlInterface != null &&
|
||||
config.controlInterface.id != config.dataInterface.id &&
|
||||
!connection.claimInterface(config.controlInterface, true)
|
||||
) {
|
||||
connection.releaseInterface(config.dataInterface)
|
||||
connection.close()
|
||||
mainHandler.post {
|
||||
result.error(
|
||||
"usb_open_failed",
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
return@execute
|
||||
}
|
||||
|
||||
usbConnection = connection
|
||||
usbInEndpoint = config.inEndpoint
|
||||
usbOutEndpoint = config.outEndpoint
|
||||
controlInterface = config.controlInterface
|
||||
dataInterface = config.dataInterface
|
||||
|
||||
configureDevice(connection, config, baudRate)
|
||||
|
||||
connectedDeviceName = device.deviceName
|
||||
startReadLoop()
|
||||
|
||||
mainHandler.post {
|
||||
result.success(null)
|
||||
}
|
||||
} catch (error: Exception) {
|
||||
closeUsbConnection()
|
||||
mainHandler.post {
|
||||
result.error("usb_connect_failed", error.message, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun resolvePortConfig(device: UsbDevice): PortConfig? {
|
||||
var preferredDataInterface: UsbInterface? = null
|
||||
var preferredInEndpoint: UsbEndpoint? = null
|
||||
var preferredOutEndpoint: UsbEndpoint? = null
|
||||
var fallbackDataInterface: UsbInterface? = null
|
||||
var fallbackInEndpoint: UsbEndpoint? = null
|
||||
var fallbackOutEndpoint: UsbEndpoint? = null
|
||||
var preferredControlInterface: UsbInterface? = null
|
||||
|
||||
for (interfaceIndex in 0 until device.interfaceCount) {
|
||||
val usbInterface = device.getInterface(interfaceIndex)
|
||||
var inEndpoint: UsbEndpoint? = null
|
||||
var outEndpoint: UsbEndpoint? = null
|
||||
|
||||
for (endpointIndex in 0 until usbInterface.endpointCount) {
|
||||
val endpoint = usbInterface.getEndpoint(endpointIndex)
|
||||
if (endpoint.type != UsbConstants.USB_ENDPOINT_XFER_BULK) {
|
||||
continue
|
||||
}
|
||||
when (endpoint.direction) {
|
||||
UsbConstants.USB_DIR_IN -> if (inEndpoint == null) inEndpoint = endpoint
|
||||
UsbConstants.USB_DIR_OUT -> if (outEndpoint == null) outEndpoint = endpoint
|
||||
}
|
||||
}
|
||||
|
||||
val hasDataPair = inEndpoint != null && outEndpoint != null
|
||||
when {
|
||||
usbInterface.interfaceClass == UsbConstants.USB_CLASS_COMM &&
|
||||
preferredControlInterface == null -> {
|
||||
preferredControlInterface = usbInterface
|
||||
}
|
||||
hasDataPair &&
|
||||
usbInterface.interfaceClass == UsbConstants.USB_CLASS_CDC_DATA -> {
|
||||
preferredDataInterface = usbInterface
|
||||
preferredInEndpoint = inEndpoint
|
||||
preferredOutEndpoint = outEndpoint
|
||||
}
|
||||
hasDataPair && fallbackDataInterface == null -> {
|
||||
fallbackDataInterface = usbInterface
|
||||
fallbackInEndpoint = inEndpoint
|
||||
fallbackOutEndpoint = outEndpoint
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val dataInterface = preferredDataInterface ?: fallbackDataInterface ?: return null
|
||||
val inEndpoint = preferredInEndpoint ?: fallbackInEndpoint ?: return null
|
||||
val outEndpoint = preferredOutEndpoint ?: fallbackOutEndpoint ?: return null
|
||||
return PortConfig(preferredControlInterface, dataInterface, inEndpoint, outEndpoint)
|
||||
}
|
||||
|
||||
private fun configureDevice(
|
||||
connection: UsbDeviceConnection,
|
||||
config: PortConfig,
|
||||
baudRate: Int,
|
||||
) {
|
||||
val control = config.controlInterface ?: return
|
||||
val lineCoding =
|
||||
byteArrayOf(
|
||||
(baudRate and 0xFF).toByte(),
|
||||
((baudRate shr 8) and 0xFF).toByte(),
|
||||
((baudRate shr 16) and 0xFF).toByte(),
|
||||
((baudRate shr 24) and 0xFF).toByte(),
|
||||
0, // stop bits: 1
|
||||
0, // parity: none
|
||||
8, // data bits
|
||||
)
|
||||
|
||||
val lineCodingResult =
|
||||
connection.controlTransfer(
|
||||
UsbConstants.USB_DIR_OUT or
|
||||
UsbConstants.USB_TYPE_CLASS or
|
||||
usbRecipientInterface,
|
||||
0x20,
|
||||
0,
|
||||
control.id,
|
||||
lineCoding,
|
||||
lineCoding.size,
|
||||
1000,
|
||||
)
|
||||
if (lineCodingResult < 0) {
|
||||
throw IllegalStateException("Failed to configure USB line coding")
|
||||
}
|
||||
|
||||
val controlLineResult =
|
||||
connection.controlTransfer(
|
||||
UsbConstants.USB_DIR_OUT or
|
||||
UsbConstants.USB_TYPE_CLASS or
|
||||
usbRecipientInterface,
|
||||
0x22,
|
||||
0x0001, // DTR on, RTS off
|
||||
control.id,
|
||||
null,
|
||||
0,
|
||||
1000,
|
||||
)
|
||||
if (controlLineResult < 0) {
|
||||
throw IllegalStateException("Failed to configure USB control line state")
|
||||
}
|
||||
}
|
||||
|
||||
private fun startReadLoop() {
|
||||
val connection = usbConnection ?: return
|
||||
val endpoint = usbInEndpoint ?: return
|
||||
|
||||
isReading = true
|
||||
readThread =
|
||||
Thread({
|
||||
val packetSize = endpoint.maxPacketSize.coerceAtLeast(64)
|
||||
val buffer = ByteArray(packetSize * 4)
|
||||
try {
|
||||
while (isReading) {
|
||||
val bytesRead = connection.bulkTransfer(endpoint, buffer, buffer.size, 250)
|
||||
if (!isReading) {
|
||||
break
|
||||
}
|
||||
if (bytesRead <= 0) {
|
||||
continue
|
||||
}
|
||||
val packet = buffer.copyOf(bytesRead)
|
||||
mainHandler.post {
|
||||
eventSink?.success(packet)
|
||||
}
|
||||
}
|
||||
} catch (error: Exception) {
|
||||
if (isReading) {
|
||||
mainHandler.post {
|
||||
eventSink?.error(
|
||||
"usb_io_error",
|
||||
error.message ?: "USB serial I/O error",
|
||||
null,
|
||||
)
|
||||
}
|
||||
scheduleCloseUsbConnection()
|
||||
}
|
||||
}
|
||||
}, "MeshCoreUsbRead").also { thread ->
|
||||
thread.isDaemon = true
|
||||
thread.start()
|
||||
}
|
||||
}
|
||||
|
||||
private fun writeToDevice(data: ByteArray) {
|
||||
val connection = usbConnection ?: throw IllegalStateException("USB connection missing")
|
||||
val endpoint = usbOutEndpoint ?: throw IllegalStateException("USB output endpoint missing")
|
||||
var offset = 0
|
||||
val maxPacketSize = endpoint.maxPacketSize.coerceAtLeast(64)
|
||||
while (offset < data.size) {
|
||||
val chunkSize = minOf(maxPacketSize, data.size - offset)
|
||||
val chunk = data.copyOfRange(offset, offset + chunkSize)
|
||||
val bytesWritten = connection.bulkTransfer(endpoint, chunk, chunkSize, 1000)
|
||||
if (bytesWritten != chunkSize) {
|
||||
throw IllegalStateException("Short USB write: wrote $bytesWritten of $chunkSize bytes")
|
||||
}
|
||||
offset += chunkSize
|
||||
}
|
||||
}
|
||||
|
||||
private fun scheduleCloseUsbConnection(onComplete: (() -> Unit)? = null) {
|
||||
usbIoExecutor.execute {
|
||||
closeUsbConnection()
|
||||
if (onComplete != null) {
|
||||
mainHandler.post(onComplete)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
private fun closeUsbConnection() {
|
||||
isReading = false
|
||||
readThread?.interrupt()
|
||||
if (readThread != null && readThread !== Thread.currentThread()) {
|
||||
try {
|
||||
readThread?.join(300)
|
||||
} catch (_: InterruptedException) {
|
||||
Thread.currentThread().interrupt()
|
||||
}
|
||||
}
|
||||
readThread = null
|
||||
|
||||
val connection = usbConnection
|
||||
val claimedControl = controlInterface
|
||||
val claimedData = dataInterface
|
||||
|
||||
usbInEndpoint = null
|
||||
usbOutEndpoint = null
|
||||
controlInterface = null
|
||||
dataInterface = null
|
||||
usbConnection = null
|
||||
|
||||
if (connection != null) {
|
||||
if (claimedControl != null) {
|
||||
try {
|
||||
connection.releaseInterface(claimedControl)
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
}
|
||||
if (claimedData != null && claimedData.id != claimedControl?.id) {
|
||||
try {
|
||||
connection.releaseInterface(claimedData)
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
connection.close()
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
}
|
||||
connectedDeviceName = null
|
||||
}
|
||||
|
||||
private fun handleUsbDetached(intent: Intent) {
|
||||
val detachedDevice =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
intent.getParcelableExtra(UsbManager.EXTRA_DEVICE, UsbDevice::class.java)
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
intent.getParcelableExtra(UsbManager.EXTRA_DEVICE)
|
||||
}
|
||||
|
||||
val detachedName = detachedDevice?.deviceName ?: return
|
||||
|
||||
if (pendingConnectPortName == detachedName) {
|
||||
pendingConnectResult?.error(
|
||||
"usb_device_detached",
|
||||
"USB device was removed before the connection completed",
|
||||
null,
|
||||
)
|
||||
pendingConnectResult = null
|
||||
pendingConnectPortName = null
|
||||
}
|
||||
|
||||
if (connectedDeviceName == detachedName) {
|
||||
scheduleCloseUsbConnection {
|
||||
eventSink?.error(
|
||||
"usb_device_detached",
|
||||
"USB device was disconnected",
|
||||
null,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun pendingIntentFlags(): Int {
|
||||
var flags = PendingIntent.FLAG_UPDATE_CURRENT
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
flags = flags or PendingIntent.FLAG_MUTABLE
|
||||
}
|
||||
return flags
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
+1264
-221
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,70 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import '../services/app_debug_log_service.dart';
|
||||
import '../services/tcp_transport_service.dart';
|
||||
|
||||
/// Manages TCP transport for MeshCore devices.
|
||||
///
|
||||
/// Owns the [TcpTransportService] and TCP-specific connection state.
|
||||
/// The main [MeshCoreConnector] delegates all TCP operations here.
|
||||
class MeshCoreTcpConnector {
|
||||
final TcpTransportService _service = TcpTransportService();
|
||||
AppDebugLogService? _debugLog;
|
||||
StreamSubscription<Uint8List>? _frameSubscription;
|
||||
|
||||
// --- Getters ---
|
||||
String? get activeEndpoint => _service.activeEndpoint;
|
||||
bool get isConnected => _service.isConnected;
|
||||
|
||||
// --- Configuration ---
|
||||
void setDebugLogService(AppDebugLogService? service) {
|
||||
_debugLog = service;
|
||||
_service.setDebugLogService(service);
|
||||
}
|
||||
|
||||
// --- Connection lifecycle ---
|
||||
Future<void> connect({required String host, required int port}) async {
|
||||
_debugLog?.info('TcpConnector.connect endpoint=$host:$port', tag: 'TCP');
|
||||
await _frameSubscription?.cancel();
|
||||
_frameSubscription = null;
|
||||
await _service.connect(host: host, port: port);
|
||||
_debugLog?.info(
|
||||
'TcpConnector.connect done, endpoint=${_service.activeEndpoint}',
|
||||
tag: 'TCP',
|
||||
);
|
||||
}
|
||||
|
||||
StreamSubscription<Uint8List> listenFrames({
|
||||
required void Function(Uint8List) onFrame,
|
||||
required void Function(Object, StackTrace?) onError,
|
||||
required void Function() onDone,
|
||||
}) {
|
||||
_frameSubscription = _service.frameStream.listen(
|
||||
onFrame,
|
||||
onError: onError,
|
||||
onDone: onDone,
|
||||
);
|
||||
return _frameSubscription!;
|
||||
}
|
||||
|
||||
Future<void> cancelFrameSubscription() async {
|
||||
await _frameSubscription?.cancel();
|
||||
_frameSubscription = null;
|
||||
}
|
||||
|
||||
Future<void> disconnect() async {
|
||||
if (!_service.isConnected && _frameSubscription == null) return;
|
||||
_debugLog?.info('TcpConnector.disconnect', tag: 'TCP');
|
||||
await _frameSubscription?.cancel();
|
||||
_frameSubscription = null;
|
||||
await _service.disconnect();
|
||||
}
|
||||
|
||||
Future<void> write(Uint8List data) => _service.write(data);
|
||||
|
||||
void dispose() {
|
||||
_frameSubscription?.cancel();
|
||||
_service.dispose();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import '../services/app_debug_log_service.dart';
|
||||
import '../services/usb_serial_service.dart';
|
||||
|
||||
/// Manages USB serial transport for MeshCore devices.
|
||||
///
|
||||
/// Owns the [UsbSerialService] and USB-specific connection state.
|
||||
/// The main [MeshCoreConnector] delegates all USB operations here.
|
||||
class MeshCoreUsbManager {
|
||||
MeshCoreUsbManager();
|
||||
|
||||
final UsbSerialService _service = UsbSerialService();
|
||||
AppDebugLogService? _debugLog;
|
||||
String? _activePortKey;
|
||||
String? _activePortLabel;
|
||||
|
||||
// --- Getters ---
|
||||
String? get activePortKey => _activePortKey;
|
||||
String? get activePortDisplayLabel => _activePortLabel ?? _activePortKey;
|
||||
bool get isConnected => _service.isConnected;
|
||||
Stream<Uint8List> get frameStream => _service.frameStream;
|
||||
|
||||
// --- Configuration ---
|
||||
Future<List<String>> listPorts() => _service.listPorts();
|
||||
|
||||
void setRequestPortLabel(String label) => _service.setRequestPortLabel(label);
|
||||
|
||||
void setFallbackDeviceName(String label) =>
|
||||
_service.setFallbackDeviceName(label);
|
||||
|
||||
void setDebugLogService(AppDebugLogService? service) {
|
||||
_debugLog = service;
|
||||
_service.setDebugLogService(service);
|
||||
}
|
||||
|
||||
// --- Connection lifecycle ---
|
||||
Future<void> connect({
|
||||
required String portName,
|
||||
int baudRate = 115200,
|
||||
}) async {
|
||||
_debugLog?.info(
|
||||
'UsbManager.connect: portName=$portName baud=$baudRate',
|
||||
tag: 'USB',
|
||||
);
|
||||
await _service.connect(portName: portName, baudRate: baudRate);
|
||||
_activePortKey = _service.activePortKey ?? portName;
|
||||
_activePortLabel = _service.activePortDisplayLabel ?? portName;
|
||||
_debugLog?.info(
|
||||
'UsbManager.connect: done, key=$_activePortKey label=$_activePortLabel',
|
||||
tag: 'USB',
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> disconnect() async {
|
||||
if (!_service.isConnected && _activePortKey == null) {
|
||||
return;
|
||||
}
|
||||
_debugLog?.info('UsbManager.disconnect', tag: 'USB');
|
||||
await _service.disconnect();
|
||||
_activePortKey = null;
|
||||
_activePortLabel = null;
|
||||
}
|
||||
|
||||
Future<void> write(Uint8List data) => _service.write(data);
|
||||
|
||||
// --- Label management ---
|
||||
void updateConnectedLabel(String selfName) {
|
||||
_service.updateConnectedLabel(selfName);
|
||||
_activePortLabel = _service.activePortDisplayLabel ?? _activePortLabel;
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
_service.dispose();
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import 'dart:typed_data';
|
||||
// Buffer Reader - sequential binary data reader with pointer tracking
|
||||
class BufferReader {
|
||||
int _pointer = 0;
|
||||
int _lastPointer = 0;
|
||||
final Uint8List _buffer;
|
||||
|
||||
BufferReader(Uint8List data) : _buffer = Uint8List.fromList(data);
|
||||
@@ -13,6 +14,7 @@ class BufferReader {
|
||||
int readByte() => readBytes(1)[0];
|
||||
|
||||
Uint8List readBytes(int count) {
|
||||
_lastPointer = _pointer;
|
||||
if (_pointer + count > _buffer.length) {
|
||||
throw RangeError(
|
||||
'Attempted to read $count bytes at offset $_pointer, but only $remaining bytes remaining in buffer of length ${_buffer.length}',
|
||||
@@ -24,6 +26,7 @@ class BufferReader {
|
||||
}
|
||||
|
||||
void skipBytes(int count) {
|
||||
_lastPointer = _pointer;
|
||||
if (_pointer + count > _buffer.length) {
|
||||
throw RangeError(
|
||||
'Attempted to skip $count bytes at offset $_pointer, but only $remaining bytes remaining in buffer of length ${_buffer.length}',
|
||||
@@ -34,10 +37,18 @@ class BufferReader {
|
||||
|
||||
Uint8List readRemainingBytes() => readBytes(remaining);
|
||||
|
||||
String readString() =>
|
||||
utf8.decode(readRemainingBytes(), allowMalformed: true);
|
||||
String readString() {
|
||||
_lastPointer = _pointer;
|
||||
final value = readRemainingBytes();
|
||||
try {
|
||||
return utf8.decode(Uint8List.fromList(value), allowMalformed: true);
|
||||
} catch (e) {
|
||||
return String.fromCharCodes(value); // Latin-1 fallback
|
||||
}
|
||||
}
|
||||
|
||||
String readCString(int maxLength) {
|
||||
String readCStringGreedy(int maxLength) {
|
||||
_lastPointer = _pointer;
|
||||
final value = <int>[];
|
||||
final bytes = readBytes(maxLength);
|
||||
for (final byte in bytes) {
|
||||
@@ -51,6 +62,24 @@ class BufferReader {
|
||||
}
|
||||
}
|
||||
|
||||
String readCString(int maxLength) {
|
||||
final backupPointer = _pointer;
|
||||
final value = <int>[];
|
||||
int counter = 0;
|
||||
while (counter < maxLength) {
|
||||
final byte = readByte();
|
||||
if (byte == 0) break;
|
||||
value.add(byte);
|
||||
counter++;
|
||||
}
|
||||
_lastPointer = backupPointer;
|
||||
try {
|
||||
return utf8.decode(Uint8List.fromList(value), allowMalformed: true);
|
||||
} catch (e) {
|
||||
return String.fromCharCodes(value); // Latin-1 fallback
|
||||
}
|
||||
}
|
||||
|
||||
int readUInt8() => readBytes(1).buffer.asByteData().getUint8(0);
|
||||
int readInt8() => readBytes(1).buffer.asByteData().getInt8(0);
|
||||
int readUInt16LE() =>
|
||||
@@ -72,6 +101,9 @@ class BufferReader {
|
||||
if ((value & 0x800000) != 0) value -= 0x1000000;
|
||||
return value;
|
||||
}
|
||||
|
||||
void resetPointer() => _pointer = 0;
|
||||
void rewind() => _pointer = _lastPointer;
|
||||
}
|
||||
|
||||
// Buffer Writer - accumulating binary data builder
|
||||
@@ -114,23 +146,38 @@ class BufferWriter {
|
||||
}
|
||||
|
||||
void writeHex(String hex) {
|
||||
// Validate hex string length is even and not empty
|
||||
if (hex.isEmpty || hex.length % 2 != 0) {
|
||||
throw FormatException('Invalid hex string length: ${hex.length}');
|
||||
}
|
||||
List<int> result = [];
|
||||
for (int i = 0; i < hex.length ~/ 2; i++) {
|
||||
final hexByte = hex.substring(i * 2, i * 2 + 2);
|
||||
final byte = int.tryParse(hexByte, radix: 16);
|
||||
if (byte == null) {
|
||||
throw FormatException(
|
||||
'Invalid hex characters at position $i: $hexByte',
|
||||
);
|
||||
}
|
||||
result.add(byte);
|
||||
}
|
||||
writeBytes(Uint8List.fromList(result));
|
||||
writeBytes(hex2Uint8List(hex));
|
||||
}
|
||||
|
||||
void writeBytesPadded(Uint8List bytes, int totalLength) {
|
||||
// Path data (64 bytes, zero-padded)
|
||||
final bytesPadded = Uint8List(totalLength);
|
||||
final len = bytes.length < totalLength ? bytes.length : totalLength;
|
||||
if (bytes.isNotEmpty && len > 0) {
|
||||
final copyLen = bytes.length < totalLength ? bytes.length : totalLength;
|
||||
for (int i = 0; i < copyLen; i++) {
|
||||
bytesPadded[i] = bytes[i];
|
||||
}
|
||||
}
|
||||
writeBytes(bytesPadded);
|
||||
}
|
||||
}
|
||||
|
||||
Uint8List hex2Uint8List(String hex) {
|
||||
// Validate hex string length is even and not empty
|
||||
if (hex.isEmpty || hex.length % 2 != 0) {
|
||||
throw FormatException('Invalid hex string length: ${hex.length}');
|
||||
}
|
||||
List<int> result = [];
|
||||
for (int i = 0; i < hex.length ~/ 2; i++) {
|
||||
final hexByte = hex.substring(i * 2, i * 2 + 2);
|
||||
final byte = int.tryParse(hexByte, radix: 16);
|
||||
if (byte == null) {
|
||||
throw FormatException('Invalid hex characters at position $i: $hexByte');
|
||||
}
|
||||
result.add(byte);
|
||||
}
|
||||
return Uint8List.fromList(result);
|
||||
}
|
||||
|
||||
// Command codes (to device)
|
||||
@@ -162,11 +209,13 @@ const int cmdGetChannel = 31;
|
||||
const int cmdSetChannel = 32;
|
||||
const int cmdSendTracePath = 36;
|
||||
const int cmdSetOtherParams = 38;
|
||||
const int cmdGetRadioSettings = 57;
|
||||
const int cmdSendAnonReq = 57;
|
||||
const int cmdGetTelemetryReq = 39;
|
||||
const int cmdGetCustomVar = 40;
|
||||
const int cmdSetCustomVar = 41;
|
||||
const int cmdSendBinaryReq = 50;
|
||||
const int cmdSetAutoAddConfig = 58;
|
||||
const int cmdGetAutoAddConfig = 59;
|
||||
|
||||
// Text message types
|
||||
const int txtTypePlain = 0;
|
||||
@@ -200,8 +249,8 @@ const int respCodeDeviceInfo = 13;
|
||||
const int respCodeContactMsgRecvV3 = 16;
|
||||
const int respCodeChannelMsgRecvV3 = 17;
|
||||
const int respCodeChannelInfo = 18;
|
||||
const int respCodeRadioSettings = 25;
|
||||
const int respCodeCustomVars = 21;
|
||||
const int respCodeAutoAddConfig = 25;
|
||||
|
||||
// Push codes (async from device)
|
||||
const int pushCodeAdvert = 0x80;
|
||||
@@ -247,6 +296,18 @@ const int payloadTypeCONTROL = 0x0B; // a control/discovery packet
|
||||
const int payloadTypeRawCustom =
|
||||
0x0F; // custom packet as raw bytes, for applications with custom encryption, payloads, etc
|
||||
|
||||
//auto-add flags
|
||||
const int autoAddOverwriteOldestFlag =
|
||||
1 << 0; // 0x01 - overwrite oldest non-favourite when full
|
||||
const int autoAddChatFlag =
|
||||
1 << 1; // 0x02 - auto-add Chat (Companion) (ADV_TYPE_CHAT)
|
||||
const int autoAddRepeaterFlag =
|
||||
1 << 2; // 0x04 - auto-add Repeater (ADV_TYPE_REPEATER)
|
||||
const int autoAddRoomServerFlag =
|
||||
1 << 3; // 0x08 - auto-add Room Server (ADV_TYPE_ROOM)
|
||||
const int autoAddSensorFlag =
|
||||
1 << 4; // 0x10 - auto-add Sensor (ADV_TYPE_SENSOR)
|
||||
|
||||
// Sizes
|
||||
const int pubKeySize = 32;
|
||||
const int maxPathSize = 64;
|
||||
@@ -297,7 +358,7 @@ const int contactNameOffset = 100;
|
||||
const int contactTimestampOffset = 132;
|
||||
const int contactLatOffset = 136;
|
||||
const int contactLonOffset = 140;
|
||||
const int contactLastmodOffset = 144;
|
||||
const int contactLastModOffset = 144;
|
||||
const int contactFrameSize = 148;
|
||||
|
||||
// Message frame offsets
|
||||
@@ -628,14 +689,17 @@ Uint8List buildResetPathFrame(Uint8List pubKey) {
|
||||
}
|
||||
|
||||
// Build CMD_ADD_UPDATE_CONTACT frame to set custom path
|
||||
// Format: [cmd][pub_key x32][type][flags][path_len][path x64][name x32][timestamp x4]
|
||||
// Format: [cmd][pub_key x32][type][flags][path_len][path x64][name x32][Lat? x4, Lon? x4][timestamp? x4]
|
||||
Uint8List buildUpdateContactPathFrame(
|
||||
Uint8List pubKey,
|
||||
Uint8List customPath,
|
||||
Uint8List path,
|
||||
int pathLen, {
|
||||
int type = 1, // ADV_TYPE_CHAT
|
||||
int flags = 0,
|
||||
String name = '',
|
||||
double? lat,
|
||||
double? lon,
|
||||
DateTime? lastModified,
|
||||
}) {
|
||||
final writer = BufferWriter();
|
||||
writer.writeByte(cmdAddUpdateContact);
|
||||
@@ -644,17 +708,7 @@ Uint8List buildUpdateContactPathFrame(
|
||||
writer.writeByte(flags);
|
||||
writer.writeByte(pathLen);
|
||||
|
||||
// Path data (64 bytes, zero-padded)
|
||||
final pathPadded = Uint8List(maxPathSize);
|
||||
if (customPath.isNotEmpty && pathLen > 0) {
|
||||
final copyLen = customPath.length < maxPathSize
|
||||
? customPath.length
|
||||
: maxPathSize;
|
||||
for (int i = 0; i < copyLen; i++) {
|
||||
pathPadded[i] = customPath[i];
|
||||
}
|
||||
}
|
||||
writer.writeBytes(pathPadded);
|
||||
writer.writeBytesPadded(path, maxPathSize);
|
||||
|
||||
// Name (32 bytes, null-padded)
|
||||
writer.writeCString(name, maxNameSize);
|
||||
@@ -663,6 +717,27 @@ Uint8List buildUpdateContactPathFrame(
|
||||
final timestamp = DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||
writer.writeUInt32LE(timestamp);
|
||||
|
||||
if ((lat == null || lon == null) && lastModified != null) {
|
||||
// If lat/lon not provided, write zeros
|
||||
writer.writeInt32LE(0);
|
||||
writer.writeInt32LE(0);
|
||||
} else {
|
||||
// Latitude and Longitude are expected in degrees, convert to int by multiplying by 1e6
|
||||
// Latitude
|
||||
final latitude = lat ?? 0.0;
|
||||
writer.writeInt32LE((latitude * 1e6).round());
|
||||
|
||||
// Longitude
|
||||
final longitude = lon ?? 0.0;
|
||||
writer.writeInt32LE((longitude * 1e6).round());
|
||||
}
|
||||
|
||||
if (lastModified != null) {
|
||||
// Last modified
|
||||
final lastModifiedTimestamp = lastModified.millisecondsSinceEpoch ~/ 1000;
|
||||
writer.writeUInt32LE(lastModifiedTimestamp);
|
||||
}
|
||||
|
||||
return writer.toBytes();
|
||||
}
|
||||
|
||||
@@ -675,16 +750,15 @@ Uint8List buildGetContactByKeyFrame(Uint8List pubKey) {
|
||||
return writer.toBytes();
|
||||
}
|
||||
|
||||
// Build CMD_GET_RADIO_SETTINGS frame
|
||||
Uint8List buildGetRadioSettingsFrame() {
|
||||
return Uint8List.fromList([cmdGetRadioSettings]);
|
||||
}
|
||||
|
||||
//Build CMD_GET_CUSTOM_VARS frame
|
||||
Uint8List buildGetCustomVarsFrame() {
|
||||
return Uint8List.fromList([cmdGetCustomVar]);
|
||||
}
|
||||
|
||||
Uint8List buildGetAutoAddFlagsFrame() {
|
||||
return Uint8List.fromList([cmdGetAutoAddConfig]);
|
||||
}
|
||||
|
||||
// Calculate LoRa airtime for a packet
|
||||
// Based on Semtech SX127x datasheet formula
|
||||
// Returns airtime in milliseconds
|
||||
@@ -809,10 +883,10 @@ Uint8List buildExportContactFrame(Uint8List pubKey) {
|
||||
|
||||
// Build a import contact frame
|
||||
// [cmd][contact_frame x98+]
|
||||
Uint8List buildImportContactFrame(String contactFrame) {
|
||||
Uint8List buildImportContactFrame(Uint8List contactFrame) {
|
||||
final writer = BufferWriter();
|
||||
writer.writeByte(cmdImportContact);
|
||||
writer.writeHex(contactFrame);
|
||||
writer.writeBytes(contactFrame);
|
||||
return writer.toBytes();
|
||||
}
|
||||
|
||||
@@ -826,20 +900,40 @@ Uint8List buildZeroHopContact(Uint8List pubKey) {
|
||||
}
|
||||
|
||||
// Build CMD_SET_OTHER_PARAMS frame
|
||||
// Format: [cmd][allowAutoAddContacts][allowTelemetryFlags][advertLocationPolicy][multiAcks]
|
||||
// Format: [cmd][allowTelemetryFlags][advertLocationPolicy][multiAcks]
|
||||
Uint8List buildSetOtherParamsFrame(
|
||||
bool allowAutoAddContacts,
|
||||
int allowTelemetryFlags,
|
||||
int advertLocationPolicy,
|
||||
int multiAcks,
|
||||
) {
|
||||
final writer = BufferWriter();
|
||||
writer.writeByte(cmdSetOtherParams);
|
||||
writer.writeByte(
|
||||
allowAutoAddContacts ? 0x00 : 0x01,
|
||||
); // Allow Auto Add Contacts
|
||||
//Going forward the app will just set Auto Add Contacts to disabled, and use the filter flags
|
||||
//Allow Auto Add Contacts use inverted logic (0x01 = disabled, 0x00 = enabled).
|
||||
writer.writeByte(0x01);
|
||||
writer.writeByte(allowTelemetryFlags); // Allow Telemetry Flags
|
||||
writer.writeByte(advertLocationPolicy); // Advertisement Location Policy
|
||||
writer.writeByte(multiAcks); // Multi Acknowledgements
|
||||
return writer.toBytes();
|
||||
}
|
||||
|
||||
// Build CMD_SET_AUTO_ADD_CONFIG frame
|
||||
// Format: [cmd][flags]
|
||||
Uint8List buildSetAutoAddConfigFrame({
|
||||
required bool autoAddChat,
|
||||
required bool autoAddRepeater,
|
||||
required bool autoAddRoomServer,
|
||||
required bool autoAddSensor,
|
||||
required bool overwriteOldest,
|
||||
}) {
|
||||
final writer = BufferWriter();
|
||||
writer.writeByte(cmdSetAutoAddConfig);
|
||||
int flags = 0;
|
||||
if (autoAddChat) flags |= autoAddChatFlag;
|
||||
if (autoAddRepeater) flags |= autoAddRepeaterFlag;
|
||||
if (autoAddRoomServer) flags |= autoAddRoomServerFlag;
|
||||
if (autoAddSensor) flags |= autoAddSensorFlag;
|
||||
if (overwriteOldest) flags |= autoAddOverwriteOldestFlag;
|
||||
writer.writeByte(flags);
|
||||
return writer.toBytes();
|
||||
}
|
||||
|
||||
+90
-1
@@ -1606,6 +1606,8 @@
|
||||
"scanner_bluetoothOff": "Bluetooth е изключен.",
|
||||
"scanner_enableBluetooth": "Активирайте Bluetooth",
|
||||
"scanner_bluetoothOffMessage": "Моля, активирайте Bluetooth, за да сканирате за устройства.",
|
||||
"scanner_chromeRequired": "Изисква се браузър Chrome",
|
||||
"scanner_chromeRequiredMessage": "Това уеб приложение изисква Google Chrome или браузър, базиран на Chromium, за поддръжка на Bluetooth.",
|
||||
"snrIndicator_lastSeen": "Последно видян",
|
||||
"snrIndicator_nearByRepeaters": "Близки повтарящи се устройства",
|
||||
"chat_ShowAllPaths": "Покажи всички пътища",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_unread": "Непрочетено",
|
||||
"contacts_searchRepeaters": "Търсене на {number}{str} повтарящи се...",
|
||||
"contacts_searchContactsNoNumber": "Търси контакти...",
|
||||
"contacts_searchUsers": "Търсене на {number}{str} потребители..."
|
||||
"contacts_searchUsers": "Търсене на {number}{str} потребители...",
|
||||
"contactsSettings_title": "Настройки на контактите",
|
||||
"contactsSettings_autoAddTitle": "Автоматично откриване",
|
||||
"contactsSettings_autoAddUsersTitle": "Автоматично добавяне на потребители",
|
||||
"contactsSettings_otherTitle": "Други настройки свързани с контакти",
|
||||
"settings_contactSettingsSubtitle": "Настройки за добавяне на контакти.",
|
||||
"settings_contactSettings": "Настройки за контакти",
|
||||
"contactsSettings_autoAddSensorsTitle": "Автоматично добавяне на датчици",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Автоматично добавяне на сървъри на стаите",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Позволи на спътника да добавя автоматично откритите сървъри на стаите.",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Автоматично добавяне на повтарящи се елементи",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Позволи на спътника да добавя автоматично откритите потребители.",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Позволи на спътника да добавя автоматично откритите повтарящи се устройства.",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Позволи на спътника да добавя автоматично откритите датчици.",
|
||||
"contactsSettings_overwriteOldestTitle": "Премахни най-старото",
|
||||
"discoveredContacts_Title": "Открити контакти",
|
||||
"discoveredContacts_searchHint": "Търсене на открити контакти",
|
||||
"discoveredContacts_noMatching": "Няма съвпадащи контакти",
|
||||
"discoveredContacts_contactAdded": "Контакт добавен",
|
||||
"discoveredContacts_copyContact": "Копирай контакт в клипборда",
|
||||
"discoveredContacts_deleteContact": "Изтрий контакт",
|
||||
"discoveredContacts_addContact": "Добави контакт",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Когато списъкът с контакти е пълен, най-старият неключов контакт ще бъде заменен.",
|
||||
"discoveredContacts_deleteContactAll": "Изтриване на Всички Открити Контакти",
|
||||
"discoveredContacts_deleteContactAllContent": "Сигурни ли сте, че искате да изтриете всички открити контакти?",
|
||||
"common_deleteAll": "Изтрий всичко",
|
||||
"map_guessedLocation": "Предполагано местоположение",
|
||||
"map_showGuessedLocations": "Покажете местоположенията на предположените възли.",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenTitle": "Свържете се чрез USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenSubtitle": "Изберете открития сериен уред и свържете директно към вашия MeshCore възел.",
|
||||
"usbScreenStatus": "Изберете USB устройство",
|
||||
"usbScreenNote": "USB серийната връзка е активна на поддържаните Android устройства и настолни платформи.",
|
||||
"usbScreenEmptyState": "Няма открити USB устройства. Включете едно и опитайте отново.",
|
||||
"usbErrorPermissionDenied": "Не беше разрешено достъпът през USB.",
|
||||
"usbErrorDeviceMissing": "Избраното USB устройство вече не е налично.",
|
||||
"usbErrorInvalidPort": "Изберете валитно USB устройство.",
|
||||
"usbErrorBusy": "Друг мол за свързване през USB вече е в процес на изпълнение.",
|
||||
"usbErrorNotConnected": "Няма свързано USB устройство.",
|
||||
"usbErrorOpenFailed": "Не успях да отворя избраното USB устройство.",
|
||||
"usbErrorConnectFailed": "Не успях да се свържа с избраното USB устройство.",
|
||||
"usbErrorUnsupported": "USB серийната комуникация не се поддържа на тази платформа.",
|
||||
"usbErrorAlreadyActive": "USB връзката вече е активирана.",
|
||||
"usbErrorNoDeviceSelected": "Няма избран USB устройство.",
|
||||
"usbErrorPortClosed": "USB връзката не е активна.",
|
||||
"usbFallbackDeviceName": "Устройство за четене на уеб серийни данни",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_connecting": "Свързване към USB устройство...",
|
||||
"usbConnectionFailed": "Неуспешно свързване през USB: {error}",
|
||||
"usbStatus_notConnected": "Изберете USB устройство",
|
||||
"usbStatus_searching": "Търсене на USB устройства...",
|
||||
"usbErrorConnectTimedOut": "Връзката прекъсна. Уверете се, че устройството има софтуер за USB връзка.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpScreenTitle": "Свържете се чрез TCP",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpHostLabel": "IP адрес",
|
||||
"tcpPortLabel": "Пристанище",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Въведете крайната точка и свържете се.",
|
||||
"tcpStatus_connectingTo": "Свързване към {endpoint}...",
|
||||
"tcpErrorHostRequired": "Необходим е IP адрес.",
|
||||
"tcpErrorPortInvalid": "Портът трябва да бъде между 1 и 65535.",
|
||||
"tcpErrorUnsupported": "Транспортът чрез TCP не се поддържа на тази платформа.",
|
||||
"tcpErrorTimedOut": "Връзката TCP изтекла.",
|
||||
"tcpConnectionFailed": "Неуспешно е установено TCP връзката: {error}",
|
||||
"map_showDiscoveryContacts": "Покажи контакти за откриване",
|
||||
"map_setAsMyLocation": "Задайте като моя местоположение"
|
||||
}
|
||||
|
||||
+96
-7
@@ -296,8 +296,8 @@
|
||||
"contacts_filterContacts": "Filtert Kontakte...",
|
||||
"contacts_noContactsMatchFilter": "Keine Kontakte passen zu Ihrem Filter",
|
||||
"contacts_noMembers": "Keine Mitglieder",
|
||||
"contacts_lastSeenNow": "gerade gesehen",
|
||||
"contacts_lastSeenMinsAgo": "Letzte Sichtung vor {minutes} Minuten.",
|
||||
"contacts_lastSeenNow": "kürzlich",
|
||||
"contacts_lastSeenMinsAgo": "~ {minutes} Min.",
|
||||
"@contacts_lastSeenMinsAgo": {
|
||||
"placeholders": {
|
||||
"minutes": {
|
||||
@@ -305,8 +305,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts_lastSeenHourAgo": "Letzte Sichtung vor 1 Stunde.",
|
||||
"contacts_lastSeenHoursAgo": "Letzte Sichtung vor {hours} Stunden.",
|
||||
"contacts_lastSeenHourAgo": "~ 1 Std.",
|
||||
"contacts_lastSeenHoursAgo": "~ {hours} Std.",
|
||||
"@contacts_lastSeenHoursAgo": {
|
||||
"placeholders": {
|
||||
"hours": {
|
||||
@@ -314,8 +314,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts_lastSeenDayAgo": "Letzte Sichtung vor 1 Tag",
|
||||
"contacts_lastSeenDaysAgo": "Letzte Sichtung {days} Tage zuvor",
|
||||
"contacts_lastSeenDayAgo": "~ 1 Tag",
|
||||
"contacts_lastSeenDaysAgo": "~ {days} Tage",
|
||||
"@contacts_lastSeenDaysAgo": {
|
||||
"placeholders": {
|
||||
"days": {
|
||||
@@ -1635,6 +1635,8 @@
|
||||
"pathTrace_clearTooltip": "Pfad löschen",
|
||||
"map_pathTraceCancelled": "Pfadverfolgung abgebrochen.",
|
||||
"scanner_bluetoothOffMessage": "Bitte aktivieren Sie Bluetooth, um nach Geräten zu suchen.",
|
||||
"scanner_chromeRequired": "Chrome Browser erforderlich",
|
||||
"scanner_chromeRequiredMessage": "Diese Webanwendung erfordert Google Chrome oder einen Chromium-basierten Browser für die Bluetooth-Unterstützung.",
|
||||
"scanner_bluetoothOff": "Bluetooth ist deaktiviert.",
|
||||
"scanner_enableBluetooth": "Bluetooth aktivieren",
|
||||
"snrIndicator_lastSeen": "Zuletzt gesehen",
|
||||
@@ -1827,5 +1829,92 @@
|
||||
"contacts_searchRepeaters": "Suche {number}{str} Repeater...",
|
||||
"contacts_searchFavorites": "Suche {number}{str} Favoriten...",
|
||||
"contacts_searchUsers": "Suche {number}{str} Benutzer...",
|
||||
"contacts_searchRoomServers": "Suche {number}{str} Raumserver..."
|
||||
"contacts_searchRoomServers": "Suche {number}{str} Raumserver...",
|
||||
"settings_contactSettings": "Kontakteinstellungen",
|
||||
"contactsSettings_otherTitle": "Weitere Einstellungen zu Kontakten",
|
||||
"contactsSettings_title": "Kontakteinstellungen",
|
||||
"contactsSettings_autoAddTitle": "Automatische Erkennung",
|
||||
"contactsSettings_autoAddUsersTitle": "Automatische Hinzufügung von Benutzern",
|
||||
"settings_contactSettingsSubtitle": "Einstellungen für das Hinzufügen von Kontakten",
|
||||
"contactsSettings_autoAddSensorsTitle": "Automatisch Sensoren hinzufügen",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Ermöglichen Sie dem Begleiter, automatisch entdeckte Benutzer hinzuzufügen",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Automatisch Raumservers hinzufügen",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Ermöglichen Sie dem Begleiter, entdeckte Raumserver automatisch hinzuzufügen",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Automatisch Repeater hinzufügen",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Ermöglichen Sie dem Begleiter, automatisch entdeckte Repeater hinzuzufügen.",
|
||||
"discoveredContacts_noMatching": "Keine passenden Kontakte",
|
||||
"discoveredContacts_searchHint": "Entdeckte Kontakte suchen",
|
||||
"discoveredContacts_addContact": "Kontakt hinzufügen",
|
||||
"discoveredContacts_contactAdded": "Kontakt hinzugefügt",
|
||||
"discoveredContacts_deleteContact": "Kontakt löschen",
|
||||
"discoveredContacts_Title": "Entdeckte Kontakte",
|
||||
"discoveredContacts_copyContact": "Kontakt in die Zwischenablage kopieren",
|
||||
"contactsSettings_overwriteOldestTitle": "Überschreiben des Ältesten",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Ermöglichen Sie dem Begleiter, automatisch entdeckte Sensoren hinzuzufügen",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Wenn die Kontaktliste voll ist, wird der älteste nicht favorisierte Kontakt ersetzt.",
|
||||
"common_deleteAll": "Alles löschen",
|
||||
"discoveredContacts_deleteContactAllContent": "Sind Sie sicher, dass Sie alle gefundenen Kontakte löschen möchten?",
|
||||
"discoveredContacts_deleteContactAll": "Alle entdeckten Kontakte löschen",
|
||||
"map_showGuessedLocations": "Zeige die vermuteten Knotenpositionen",
|
||||
"map_guessedLocation": "Geschätzter Ort",
|
||||
"usbScreenSubtitle": "Wählen Sie ein erkannten serielles Gerät aus und verbinden Sie es direkt mit Ihrem MeshCore-Knoten.",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenTitle": "Verbinden über USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenStatus": "Wählen Sie ein USB-Gerät aus",
|
||||
"usbScreenNote": "Die USB-Serielle Schnittstelle ist auf unterstützten Android-Geräten und Desktop-Plattformen aktiv.",
|
||||
"usbScreenEmptyState": "Keine USB-Geräte gefunden. Schließen Sie eines an und aktualisieren Sie.",
|
||||
"usbErrorPermissionDenied": "Die USB-Berechtigung wurde abgelehnt.",
|
||||
"usbErrorDeviceMissing": "Das ausgewählte USB-Gerät ist nicht mehr verfügbar.",
|
||||
"usbErrorInvalidPort": "Wählen Sie ein gültiges USB-Gerät aus.",
|
||||
"usbErrorBusy": "Eine weitere Anfrage für eine USB-Verbindung ist bereits in Bearbeitung.",
|
||||
"usbErrorNotConnected": "Es ist kein USB-Gerät angeschlossen.",
|
||||
"usbErrorOpenFailed": "Fehlgeschlagen beim Öffnen des ausgewählten USB-Geräts.",
|
||||
"usbErrorConnectFailed": "Keine Verbindung zum ausgewählten USB-Gerät hergestellt.",
|
||||
"usbErrorUnsupported": "Die USB-Serielle Schnittstelle wird auf dieser Plattform nicht unterstützt.",
|
||||
"usbErrorAlreadyActive": "Eine USB-Verbindung ist bereits hergestellt.",
|
||||
"usbErrorNoDeviceSelected": "Kein USB-Gerät wurde ausgewählt.",
|
||||
"usbErrorPortClosed": "Die USB-Verbindung ist nicht aktiv.",
|
||||
"usbFallbackDeviceName": "Web-Serielle Geräte",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_searching": "Suche nach USB-Geräten...",
|
||||
"usbStatus_notConnected": "Wählen Sie ein USB-Gerät aus",
|
||||
"usbStatus_connecting": "Verbindung zum USB-Gerät...",
|
||||
"usbConnectionFailed": "Fehler beim USB-Verbindungsaufbau: {error}",
|
||||
"usbErrorConnectTimedOut": "Verbindung konnte nicht hergestellt werden. Stellen Sie sicher, dass das Gerät die entsprechende USB-Firmware enthält.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostLabel": "IP-Adresse",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpScreenTitle": "Verbinden über TCP",
|
||||
"tcpPortLabel": "Port",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Geben Sie den Endpunkt ein und verbinden Sie sich.",
|
||||
"tcpStatus_connectingTo": "Verbindung zu {endpoint}...",
|
||||
"tcpErrorHostRequired": "Eine IP-Adresse ist erforderlich.",
|
||||
"tcpErrorPortInvalid": "Die Portnummer muss zwischen 1 und 65535 liegen.",
|
||||
"tcpErrorUnsupported": "Die TCP-Übertragung wird auf dieser Plattform nicht unterstützt.",
|
||||
"tcpErrorTimedOut": "Die TCP-Verbindung ist abgelaufen.",
|
||||
"tcpConnectionFailed": "Fehler beim TCP-Verbindungsaufbau: {error}",
|
||||
"map_showDiscoveryContacts": "Entdeckungs-Kontakte anzeigen",
|
||||
"map_setAsMyLocation": "Als meine aktuelle Position festlegen"
|
||||
}
|
||||
|
||||
+96
-7
@@ -10,6 +10,7 @@
|
||||
"common_unknownDevice": "Unknown Device",
|
||||
"common_save": "Save",
|
||||
"common_delete": "Delete",
|
||||
"common_deleteAll": "Delete All",
|
||||
"common_close": "Close",
|
||||
"common_edit": "Edit",
|
||||
"common_add": "Add",
|
||||
@@ -46,6 +47,64 @@
|
||||
}
|
||||
},
|
||||
"scanner_title": "MeshCore Open",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpScreenTitle": "Connect over TCP",
|
||||
"tcpHostLabel": "IP Address",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpPortLabel": "Port",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Enter endpoint and connect",
|
||||
"tcpStatus_connectingTo": "Connecting to {endpoint}...",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpErrorHostRequired": "IP address is required.",
|
||||
"tcpErrorPortInvalid": "Port must be between 1 and 65535.",
|
||||
"tcpErrorUnsupported": "TCP transport is not supported on this platform.",
|
||||
"tcpErrorTimedOut": "TCP connection timed out.",
|
||||
"tcpConnectionFailed": "TCP connection failed: {error}",
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbScreenTitle": "Connect over USB",
|
||||
"usbScreenSubtitle": "Choose a detected serial device and connect directly to your MeshCore node.",
|
||||
"usbScreenStatus": "Select a USB device",
|
||||
"usbScreenNote": "USB serial is active on supported Android devices and desktop platforms.",
|
||||
"usbScreenEmptyState": "No USB devices found. Plug one in and refresh.",
|
||||
"usbErrorPermissionDenied": "USB permission was denied.",
|
||||
"usbErrorDeviceMissing": "The selected USB device is no longer available.",
|
||||
"usbErrorInvalidPort": "Select a valid USB device.",
|
||||
"usbErrorBusy": "Another USB connection request is already in progress.",
|
||||
"usbErrorNotConnected": "No USB device is connected.",
|
||||
"usbErrorOpenFailed": "Failed to open the selected USB device.",
|
||||
"usbErrorConnectFailed": "Failed to connect to the selected USB device.",
|
||||
"usbErrorUnsupported": "USB serial is not supported on this platform.",
|
||||
"usbErrorAlreadyActive": "A USB connection is already active.",
|
||||
"usbErrorNoDeviceSelected": "No USB device was selected.",
|
||||
"usbErrorPortClosed": "The USB connection is not open.",
|
||||
"usbErrorConnectTimedOut": "Connection timed out. Make sure the device has USB Companion firmware.",
|
||||
"usbFallbackDeviceName": "Web Serial Device",
|
||||
"usbStatus_notConnected": "Select a USB device",
|
||||
"usbStatus_connecting": "Connecting to USB device...",
|
||||
"usbStatus_searching": "Searching for USB devices...",
|
||||
"usbConnectionFailed": "USB connection failed: {error}",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scanner_scanning": "Scanning for devices...",
|
||||
"scanner_connecting": "Connecting...",
|
||||
"scanner_disconnecting": "Disconnecting...",
|
||||
@@ -72,6 +131,8 @@
|
||||
"scanner_scan": "Scan",
|
||||
"scanner_bluetoothOff": "Bluetooth is off",
|
||||
"scanner_bluetoothOffMessage": "Please turn on Bluetooth to scan for devices",
|
||||
"scanner_chromeRequired": "Chrome Browser Required",
|
||||
"scanner_chromeRequiredMessage": "This web application requires Google Chrome or a Chromium-based browser for Bluetooth support.",
|
||||
"scanner_enableBluetooth": "Enable Bluetooth",
|
||||
"device_quickSwitch": "Quick switch",
|
||||
"device_meshcore": "MeshCore",
|
||||
@@ -98,6 +159,8 @@
|
||||
"settings_locationIntervalInvalid": "Interval must be at least 60 seconds, and less than 86400 seconds.",
|
||||
"settings_latitude": "Latitude",
|
||||
"settings_longitude": "Longitude",
|
||||
"settings_contactSettings": "Contact Settings",
|
||||
"settings_contactSettingsSubtitle": "Settings for how contacts are added.",
|
||||
"settings_privacyMode": "Privacy Mode",
|
||||
"settings_privacyModeSubtitle": "Hide name/location in advertisements",
|
||||
"settings_privacyModeToggle": "Toggle privacy mode to hide your name and location in advertisements.",
|
||||
@@ -364,8 +427,8 @@
|
||||
"contacts_filterContacts": "Filter contacts...",
|
||||
"contacts_noContactsMatchFilter": "No contacts match your filter",
|
||||
"contacts_noMembers": "No members",
|
||||
"contacts_lastSeenNow": "Last seen now",
|
||||
"contacts_lastSeenMinsAgo": "Last seen {minutes} mins ago",
|
||||
"contacts_lastSeenNow": "recently",
|
||||
"contacts_lastSeenMinsAgo": "~ {minutes} min.",
|
||||
"@contacts_lastSeenMinsAgo": {
|
||||
"placeholders": {
|
||||
"minutes": {
|
||||
@@ -373,8 +436,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts_lastSeenHourAgo": "Last seen 1 hour ago",
|
||||
"contacts_lastSeenHoursAgo": "Last seen {hours} hours ago",
|
||||
"contacts_lastSeenHourAgo": "~ 1 hour",
|
||||
"contacts_lastSeenHoursAgo": "~ {hours} hours",
|
||||
"@contacts_lastSeenHoursAgo": {
|
||||
"placeholders": {
|
||||
"hours": {
|
||||
@@ -382,8 +445,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts_lastSeenDayAgo": "Last seen 1 day ago",
|
||||
"contacts_lastSeenDaysAgo": "Last seen {days} days ago",
|
||||
"contacts_lastSeenDayAgo": "~ 1 day",
|
||||
"contacts_lastSeenDaysAgo": "~ {days} days",
|
||||
"@contacts_lastSeenDaysAgo": {
|
||||
"placeholders": {
|
||||
"days": {
|
||||
@@ -744,6 +807,7 @@
|
||||
"map_source": "Source",
|
||||
"map_flags": "Flags",
|
||||
"map_shareMarkerHere": "Share marker here",
|
||||
"map_setAsMyLocation": "Set as my location",
|
||||
"map_pinLabel": "Pin label",
|
||||
"map_label": "Label",
|
||||
"map_pointOfInterest": "Point of interest",
|
||||
@@ -770,6 +834,9 @@
|
||||
"map_publicKeyPrefix": "Public key prefix",
|
||||
"map_markers": "Markers",
|
||||
"map_showSharedMarkers": "Show shared markers",
|
||||
"map_showGuessedLocations": "Show guessed node locations",
|
||||
"map_showDiscoveryContacts": "Show Discovery Contacts",
|
||||
"map_guessedLocation": "Guessed location",
|
||||
"map_lastSeenTime": "Last Seen Time",
|
||||
"map_sharedPin": "Shared pin",
|
||||
"map_joinRoom": "Join Room",
|
||||
@@ -1837,5 +1904,27 @@
|
||||
"settings_gpxExportShareText": "Map data exported from meshcore-open",
|
||||
"settings_gpxExportShareSubject": "meshcore-open GPX map data export",
|
||||
"snrIndicator_nearByRepeaters": "Nearby Repeaters",
|
||||
"snrIndicator_lastSeen": "Last seen"
|
||||
"snrIndicator_lastSeen": "Last seen",
|
||||
"contactsSettings_title": "Contacts settings",
|
||||
"contactsSettings_autoAddTitle": "Automatic Discovery",
|
||||
"contactsSettings_otherTitle": "Other contact related settings",
|
||||
"contactsSettings_autoAddUsersTitle": "Auto-add users",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Allow the companion to automatically add discovered users.",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Auto-add repeaters",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Allow the companion to automatically add discovered repeaters.",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Auto-add room servers",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Allow the companion to automatically add discovered room servers.",
|
||||
"contactsSettings_autoAddSensorsTitle": "Auto-add sensors",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Allow the companion to automatically add discovered sensors.",
|
||||
"contactsSettings_overwriteOldestTitle": "Overwrite Oldest",
|
||||
"contactsSettings_overwriteOldestSubtitle": "When the contact list is full, the oldest non-favorited contact will be replaced.",
|
||||
"discoveredContacts_Title": "Discovered Contacts",
|
||||
"discoveredContacts_noMatching": "No matching contacts",
|
||||
"discoveredContacts_searchHint": "Search discovered contacts",
|
||||
"discoveredContacts_contactAdded": "Contact added",
|
||||
"discoveredContacts_addContact": "Add Contact",
|
||||
"discoveredContacts_copyContact": "Copy Contact to clipboard",
|
||||
"discoveredContacts_deleteContact": "Delete Discovered Contact",
|
||||
"discoveredContacts_deleteContactAll": "Delete All Discovered Contacts",
|
||||
"discoveredContacts_deleteContactAllContent": "Are you sure you want to delete all discovered contacts?"
|
||||
}
|
||||
|
||||
+95
-6
@@ -297,7 +297,7 @@
|
||||
"contacts_noContactsMatchFilter": "No hay contactos que coincidan con tu filtro",
|
||||
"contacts_noMembers": "No miembros",
|
||||
"contacts_lastSeenNow": "Última vez que se vio ahora",
|
||||
"contacts_lastSeenMinsAgo": "Última vez visto hace {minutes} minutos.",
|
||||
"contacts_lastSeenMinsAgo": "~ {minutes} min.",
|
||||
"@contacts_lastSeenMinsAgo": {
|
||||
"placeholders": {
|
||||
"minutes": {
|
||||
@@ -305,8 +305,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts_lastSeenHourAgo": "Última vez que se vio hace 1 hora",
|
||||
"contacts_lastSeenHoursAgo": "Última vez visto hace {hours} horas.",
|
||||
"contacts_lastSeenHourAgo": "~ 1 hora",
|
||||
"contacts_lastSeenHoursAgo": "~ {hours} horas",
|
||||
"@contacts_lastSeenHoursAgo": {
|
||||
"placeholders": {
|
||||
"hours": {
|
||||
@@ -314,8 +314,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts_lastSeenDayAgo": "Última vez que se vio hace 1 día",
|
||||
"contacts_lastSeenDaysAgo": "Última vez visto hace {days} días.",
|
||||
"contacts_lastSeenDayAgo": "~ 1 día",
|
||||
"contacts_lastSeenDaysAgo": "~ {days} días",
|
||||
"@contacts_lastSeenDaysAgo": {
|
||||
"placeholders": {
|
||||
"days": {
|
||||
@@ -1632,6 +1632,8 @@
|
||||
"map_removeLast": "Eliminar último",
|
||||
"map_pathTraceCancelled": "Rastreo de ruta cancelado.",
|
||||
"scanner_bluetoothOffMessage": "Por favor, active el Bluetooth para escanear dispositivos.",
|
||||
"scanner_chromeRequired": "Navegador Chrome requerido",
|
||||
"scanner_chromeRequiredMessage": "Esta aplicación web requiere Google Chrome o un navegador basado en Chromium para el soporte de Bluetooth.",
|
||||
"scanner_bluetoothOff": "Bluetooth está desactivado.",
|
||||
"scanner_enableBluetooth": "Habilitar Bluetooth",
|
||||
"snrIndicator_nearByRepeaters": "Repetidores cercanos",
|
||||
@@ -1827,5 +1829,92 @@
|
||||
"contacts_searchFavorites": "Buscar {number}{str} Favoritos...",
|
||||
"contacts_searchUsers": "Buscar {number}{str} Usuarios...",
|
||||
"contacts_searchRepeaters": "Buscar {number}{str} Repetidores...",
|
||||
"contacts_searchRoomServers": "Buscar {number}{str} servidores de sala..."
|
||||
"contacts_searchRoomServers": "Buscar {number}{str} servidores de sala...",
|
||||
"contactsSettings_autoAddTitle": "Detección automática",
|
||||
"settings_contactSettings": "Configuración de contacto",
|
||||
"contactsSettings_autoAddUsersTitle": "Agregar usuarios automáticamente",
|
||||
"contactsSettings_otherTitle": "Otras configuraciones relacionadas con el contacto",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Permitir que el compañero agregue automáticamente a los usuarios descubiertos.",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Permitir que el compañero agregue automáticamente los repetidores descubiertos.",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Permitir que el compañero agregue automáticamente los servidores de salas descubiertos.",
|
||||
"contactsSettings_autoAddSensorsTitle": "Agregar sensores automáticamente",
|
||||
"contactsSettings_title": "Configuración de contactos",
|
||||
"settings_contactSettingsSubtitle": "Configuración de cómo se agregan los contactos.",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Permitir que el compañero agregue automáticamente los sensores descubiertos.",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Agregar repetidores automáticamente",
|
||||
"contactsSettings_overwriteOldestTitle": "Sobreescribir el más antiguo",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Agregar automáticamente servidores de sala",
|
||||
"discoveredContacts_noMatching": "No se encontraron contactos coincidentes",
|
||||
"discoveredContacts_contactAdded": "Contacto agregado",
|
||||
"discoveredContacts_copyContact": "Copiar contacto al portapapeles",
|
||||
"discoveredContacts_deleteContact": "Eliminar contacto",
|
||||
"discoveredContacts_Title": "Contactos descubiertos",
|
||||
"discoveredContacts_searchHint": "Buscar contactos descubiertos",
|
||||
"discoveredContacts_addContact": "Agregar contacto",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Cuando la lista de contactos esté llena, se reemplazará el contacto no favorito más antiguo.",
|
||||
"common_deleteAll": "Eliminar todo",
|
||||
"discoveredContacts_deleteContactAll": "Eliminar Todos los Contactos Descubiertos",
|
||||
"discoveredContacts_deleteContactAllContent": "¿Está seguro de que desea eliminar todos los contactos descubiertos!",
|
||||
"map_guessedLocation": "Ubicación estimada",
|
||||
"map_showGuessedLocations": "Mostrar las ubicaciones estimadas de los nodos.",
|
||||
"usbScreenTitle": "Conecte mediante USB",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenSubtitle": "Seleccione el dispositivo de serie detectado y conéctelo directamente a su nodo MeshCore.",
|
||||
"usbScreenStatus": "Seleccione un dispositivo USB",
|
||||
"usbScreenNote": "La comunicación serial a través de USB está activa en dispositivos Android compatibles y en plataformas de escritorio.",
|
||||
"usbScreenEmptyState": "No se encontraron dispositivos USB. Conecte uno y vuelva a intentar.",
|
||||
"usbErrorPermissionDenied": "Se denegó el permiso de acceso a través de USB.",
|
||||
"usbErrorDeviceMissing": "El dispositivo USB seleccionado ya no está disponible.",
|
||||
"usbErrorInvalidPort": "Seleccione un dispositivo USB válido.",
|
||||
"usbErrorBusy": "Ya se ha iniciado una solicitud de conexión USB adicional.",
|
||||
"usbErrorNotConnected": "No hay ningún dispositivo USB conectado.",
|
||||
"usbErrorOpenFailed": "No se pudo abrir el dispositivo USB seleccionado.",
|
||||
"usbErrorConnectFailed": "No se pudo conectar con el dispositivo USB seleccionado.",
|
||||
"usbErrorUnsupported": "La comunicación serial a través de USB no está soportada en esta plataforma.",
|
||||
"usbErrorAlreadyActive": "La conexión USB ya está activa.",
|
||||
"usbErrorNoDeviceSelected": "No se ha seleccionado ningún dispositivo USB.",
|
||||
"usbErrorPortClosed": "La conexión USB no está activa.",
|
||||
"usbFallbackDeviceName": "Dispositivo de serie web",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_connecting": "Conectándose al dispositivo USB...",
|
||||
"usbStatus_searching": "Buscando dispositivos USB...",
|
||||
"usbStatus_notConnected": "Seleccione un dispositivo USB",
|
||||
"usbConnectionFailed": "Error al conectar mediante USB: {error}",
|
||||
"usbErrorConnectTimedOut": "La conexión ha caducado. Asegúrese de que el dispositivo tenga el firmware USB Companion.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpScreenTitle": "Establecer conexión a través de TCP",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpHostLabel": "Dirección IP",
|
||||
"tcpPortLabel": "Puerto",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Ingrese la dirección final y conecte.",
|
||||
"tcpStatus_connectingTo": "Conectándose a {endpoint}...",
|
||||
"tcpErrorHostRequired": "Se requiere la dirección IP.",
|
||||
"tcpErrorPortInvalid": "El puerto debe estar entre 1 y 65535.",
|
||||
"tcpErrorUnsupported": "El protocolo de transporte TCP no está soportado en esta plataforma.",
|
||||
"tcpErrorTimedOut": "La conexión TCP ha caducado.",
|
||||
"tcpConnectionFailed": "Error en la conexión TCP: {error}",
|
||||
"map_showDiscoveryContacts": "Mostrar Contactos de Descubrimiento",
|
||||
"map_setAsMyLocation": "Establecer mi ubicación"
|
||||
}
|
||||
|
||||
+95
-6
@@ -297,7 +297,7 @@
|
||||
"contacts_noContactsMatchFilter": "Aucun contact ne correspond à votre filtre.",
|
||||
"contacts_noMembers": "Aucun membre",
|
||||
"contacts_lastSeenNow": "Vu maintenant",
|
||||
"contacts_lastSeenMinsAgo": "Vu il y a {minutes} minutes",
|
||||
"contacts_lastSeenMinsAgo": "~ {minutes} min.",
|
||||
"@contacts_lastSeenMinsAgo": {
|
||||
"placeholders": {
|
||||
"minutes": {
|
||||
@@ -305,8 +305,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts_lastSeenHourAgo": "Vu il y a 1 heure",
|
||||
"contacts_lastSeenHoursAgo": "Vu il y a {hours} heures",
|
||||
"contacts_lastSeenHourAgo": "~ 1 heure",
|
||||
"contacts_lastSeenHoursAgo": "~ {hours} heures",
|
||||
"@contacts_lastSeenHoursAgo": {
|
||||
"placeholders": {
|
||||
"hours": {
|
||||
@@ -314,8 +314,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"contacts_lastSeenDayAgo": "Vu il y a 1 jour",
|
||||
"contacts_lastSeenDaysAgo": "Vu il y a {days} jours",
|
||||
"contacts_lastSeenDayAgo": "~ 1 jour",
|
||||
"contacts_lastSeenDaysAgo": "~ {days} jours",
|
||||
"@contacts_lastSeenDaysAgo": {
|
||||
"placeholders": {
|
||||
"days": {
|
||||
@@ -1604,6 +1604,8 @@
|
||||
"map_removeLast": "Supprimer le dernier",
|
||||
"map_runTrace": "Exécuter la traçage de chemin",
|
||||
"scanner_bluetoothOffMessage": "Veuillez activer le Bluetooth pour rechercher des appareils.",
|
||||
"scanner_chromeRequired": "Navigateur Chrome requis",
|
||||
"scanner_chromeRequiredMessage": "Cette application web nécessite Google Chrome ou un navigateur basé sur Chromium pour le support Bluetooth.",
|
||||
"scanner_bluetoothOff": "Le Bluetooth est désactivé.",
|
||||
"scanner_enableBluetooth": "Activer le Bluetooth",
|
||||
"snrIndicator_lastSeen": "Dernière fois vu",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchUsers": "Rechercher {number}{str} utilisateurs...",
|
||||
"contacts_searchRoomServers": "Rechercher {number}{str} serveurs de salle...",
|
||||
"contacts_searchRepeaters": "Rechercher {number}{str} Répéteurs...",
|
||||
"contacts_searchContactsNoNumber": "Rechercher des contacts..."
|
||||
"contacts_searchContactsNoNumber": "Rechercher des contacts...",
|
||||
"settings_contactSettings": "Paramètres de contact",
|
||||
"settings_contactSettingsSubtitle": "Paramètres pour l'ajout de contacts",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Ajouter automatiquement les répéteurs",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Autoriser le compagnon à ajouter automatiquement les répéteurs découverts",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Ajouter automatiquement les serveurs de salle",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Autoriser le compagnon à ajouter automatiquement les serveurs de salles découverts",
|
||||
"contactsSettings_otherTitle": "Autres paramètres liés aux contacts",
|
||||
"contactsSettings_title": "Paramètres des contacts",
|
||||
"contactsSettings_autoAddUsersTitle": "Ajouter automatiquement les utilisateurs",
|
||||
"contactsSettings_autoAddTitle": "Découverte automatique",
|
||||
"contactsSettings_autoAddSensorsTitle": "Ajouter automatiquement les capteurs",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Autoriser le compagnon à ajouter automatiquement les utilisateurs découverts",
|
||||
"discoveredContacts_noMatching": "Aucun contact correspondant",
|
||||
"discoveredContacts_contactAdded": "Contact ajouté",
|
||||
"discoveredContacts_addContact": "Ajouter un contact",
|
||||
"discoveredContacts_copyContact": "Copier le contact dans le presse-papiers",
|
||||
"discoveredContacts_deleteContact": "Supprimer le contact",
|
||||
"contactsSettings_overwriteOldestTitle": "Écraser le plus ancien",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Autoriser le compagnon à ajouter automatiquement les capteurs découverts.",
|
||||
"discoveredContacts_Title": "Contacts découverts",
|
||||
"discoveredContacts_searchHint": "Rechercher des contacts découverts",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Lorsque la liste de contacts est pleine, le contact le plus ancien non favori sera remplacé.",
|
||||
"common_deleteAll": "Supprimer tout",
|
||||
"discoveredContacts_deleteContactAll": "Supprimer tous les contacts découverts",
|
||||
"discoveredContacts_deleteContactAllContent": "Êtes-vous sûr de vouloir supprimer tous les contacts découverts ?",
|
||||
"map_showGuessedLocations": "Afficher les emplacements des nœuds estimés",
|
||||
"map_guessedLocation": "Lieu deviné",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenTitle": "Connectez via USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenSubtitle": "Sélectionnez un périphérique série détecté et connectez-vous directement à votre nœud MeshCore.",
|
||||
"usbScreenStatus": "Sélectionnez un périphérique USB",
|
||||
"usbScreenNote": "La communication série USB est active sur les appareils Android et les plateformes de bureau compatibles.",
|
||||
"usbScreenEmptyState": "Aucun périphérique USB n'a été trouvé. Veuillez en brancher un et rafraîchir la page.",
|
||||
"usbErrorPermissionDenied": "L'accès via USB a été refusé.",
|
||||
"usbErrorDeviceMissing": "Le périphérique USB sélectionné n'est plus disponible.",
|
||||
"usbErrorInvalidPort": "Sélectionnez un périphérique USB valide.",
|
||||
"usbErrorBusy": "Une autre demande de connexion USB est déjà en cours.",
|
||||
"usbErrorNotConnected": "Aucun appareil USB n'est connecté.",
|
||||
"usbErrorOpenFailed": "Impossible d'ouvrir l'appareil USB sélectionné.",
|
||||
"usbErrorConnectFailed": "Impossible de se connecter à l'appareil USB sélectionné.",
|
||||
"usbErrorUnsupported": "La communication série USB n'est pas prise en charge sur cette plateforme.",
|
||||
"usbErrorAlreadyActive": "Une connexion USB est déjà établie.",
|
||||
"usbErrorNoDeviceSelected": "Aucun appareil USB n'a été sélectionné.",
|
||||
"usbErrorPortClosed": "La connexion USB n'est pas établie.",
|
||||
"usbFallbackDeviceName": "Dispositif de communication série sur le Web",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_notConnected": "Sélectionnez un périphérique USB",
|
||||
"usbConnectionFailed": "Échec de la connexion USB : {error}",
|
||||
"usbStatus_connecting": "Connexion au périphérique USB...",
|
||||
"usbStatus_searching": "Recherche de périphériques USB...",
|
||||
"usbErrorConnectTimedOut": "La connexion a expiré. Assurez-vous que l'appareil dispose du firmware USB Companion.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostLabel": "Adresse IP",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpScreenTitle": "Établir une connexion via TCP",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpPortLabel": "Port",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Entrez l'adresse de destination et connectez-vous.",
|
||||
"tcpStatus_connectingTo": "Connexion à {endpoint}...",
|
||||
"tcpErrorHostRequired": "Une adresse IP est obligatoire.",
|
||||
"tcpErrorPortInvalid": "La taille du port doit être comprise entre 1 et 65535.",
|
||||
"tcpErrorUnsupported": "Le protocole TCP n'est pas pris en charge sur cette plateforme.",
|
||||
"tcpErrorTimedOut": "La connexion TCP a expiré.",
|
||||
"tcpConnectionFailed": "Échec de la connexion TCP : {error}",
|
||||
"map_showDiscoveryContacts": "Afficher les contacts de découverte",
|
||||
"map_setAsMyLocation": "Définir comme ma localisation"
|
||||
}
|
||||
|
||||
+90
-1
@@ -1605,6 +1605,8 @@
|
||||
"map_tapToAdd": "Tocca i nodi per aggiungerli al percorso.",
|
||||
"scanner_bluetoothOff": "Il Bluetooth è disattivato.",
|
||||
"scanner_bluetoothOffMessage": "Si prega di attivare il Bluetooth per effettuare la scansione dei dispositivi.",
|
||||
"scanner_chromeRequired": "Browser Chrome richiesto",
|
||||
"scanner_chromeRequiredMessage": "Questa applicazione web richiede Google Chrome o un browser basato su Chromium per il supporto Bluetooth.",
|
||||
"scanner_enableBluetooth": "Abilita il Bluetooth",
|
||||
"snrIndicator_nearByRepeaters": "Ripetitori vicini",
|
||||
"snrIndicator_lastSeen": "Ultimo accesso",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchFavorites": "Cerca {number}{str} Preferiti...",
|
||||
"contacts_unread": "Non letti",
|
||||
"contacts_searchRepeaters": "Cerca {number}{str} Ripetitori...",
|
||||
"contacts_searchRoomServers": "Cerca {number}{str} server Room..."
|
||||
"contacts_searchRoomServers": "Cerca {number}{str} server Room...",
|
||||
"contactsSettings_title": "Impostazioni dei contatti",
|
||||
"settings_contactSettings": "Impostazioni di contatto",
|
||||
"contactsSettings_otherTitle": "Altre impostazioni relative ai contatti",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Consenti al compagno di aggiungere automaticamente gli utenti scoperti.",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Aggiungere ripetitori automaticamente",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Consenti al compagno di aggiungere automaticamente i server delle stanze scoperte.",
|
||||
"contactsSettings_autoAddSensorsTitle": "Aggiungere automaticamente i sensori",
|
||||
"settings_contactSettingsSubtitle": "Impostazioni per l'aggiunta dei contatti",
|
||||
"contactsSettings_autoAddUsersTitle": "Aggiungere utenti automaticamente",
|
||||
"contactsSettings_autoAddTitle": "Scoperta automatica",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Consenti al compagno di aggiungere automaticamente i sensori scoperti",
|
||||
"discoveredContacts_noMatching": "Nessun contatto corrispondente",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Consenti al compagno di aggiungere automaticamente i ripetitori scoperti.",
|
||||
"discoveredContacts_searchHint": "Cerca contatti scoperti",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Aggiungere automaticamente i server delle stanze",
|
||||
"discoveredContacts_addContact": "Aggiungi contatto",
|
||||
"contactsSettings_overwriteOldestTitle": "Sostituisci il più vecchio",
|
||||
"discoveredContacts_Title": "Contatti scoperti",
|
||||
"discoveredContacts_contactAdded": "Contatto aggiunto",
|
||||
"discoveredContacts_deleteContact": "Elimina Contatto",
|
||||
"discoveredContacts_copyContact": "Copia contatto negli appunti",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Quando l'elenco dei contatti è pieno, il contatto più vecchio non tra i preferiti verrà sostituito.",
|
||||
"common_deleteAll": "Elimina tutto",
|
||||
"discoveredContacts_deleteContactAllContent": "Sei sicuro di voler eliminare tutti i contatti scoperti?",
|
||||
"discoveredContacts_deleteContactAll": "Eliminare tutti i contatti scoperti",
|
||||
"map_guessedLocation": "Località indovinata",
|
||||
"map_showGuessedLocations": "Mostra le posizioni stimate dei nodi",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenSubtitle": "Seleziona il dispositivo seriale rilevato e connettilo direttamente al tuo nodo MeshCore.",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenTitle": "Connessione tramite USB",
|
||||
"usbScreenStatus": "Seleziona un dispositivo USB",
|
||||
"usbScreenNote": "La comunicazione seriale USB è attiva sui dispositivi Android supportati e sulle piattaforme desktop.",
|
||||
"usbScreenEmptyState": "Nessun dispositivo USB rilevato. Collegare uno e aggiornare.",
|
||||
"usbErrorPermissionDenied": "È stato negato l'accesso tramite USB.",
|
||||
"usbErrorDeviceMissing": "Il dispositivo USB selezionato non è più disponibile.",
|
||||
"usbErrorInvalidPort": "Seleziona un dispositivo USB valido.",
|
||||
"usbErrorBusy": "Un'altra richiesta di connessione tramite USB è già in corso.",
|
||||
"usbErrorNotConnected": "Non è collegato alcun dispositivo USB.",
|
||||
"usbErrorOpenFailed": "Impossibile aprire il dispositivo USB selezionato.",
|
||||
"usbErrorConnectFailed": "Impossibile connettersi al dispositivo USB selezionato.",
|
||||
"usbErrorUnsupported": "La comunicazione seriale tramite USB non è supportata su questa piattaforma.",
|
||||
"usbErrorAlreadyActive": "La connessione USB è già attiva.",
|
||||
"usbErrorNoDeviceSelected": "Non è stato selezionato alcun dispositivo USB.",
|
||||
"usbErrorPortClosed": "La connessione USB non è attiva.",
|
||||
"usbFallbackDeviceName": "Dispositivo per comunicazione seriale su rete",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_searching": "Ricerca di dispositivi USB...",
|
||||
"usbConnectionFailed": "Errore nella connessione USB: {error}",
|
||||
"usbStatus_notConnected": "Seleziona un dispositivo USB",
|
||||
"usbStatus_connecting": "Connessione al dispositivo USB...",
|
||||
"usbErrorConnectTimedOut": "La connessione è scaduta. Assicurarsi che il dispositivo abbia il firmware USB Companion.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostLabel": "Indirizzo IP",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpScreenTitle": "Stabilire una connessione tramite TCP",
|
||||
"tcpPortLabel": "Porta",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Inserisci l'endpoint e connettiti.",
|
||||
"tcpStatus_connectingTo": "Connessione a {endpoint}...",
|
||||
"tcpErrorHostRequired": "È necessario fornire un indirizzo IP.",
|
||||
"tcpErrorPortInvalid": "La dimensione della porta deve essere compresa tra 1 e 65535.",
|
||||
"tcpErrorUnsupported": "Il protocollo TCP non è supportato su questa piattaforma.",
|
||||
"tcpErrorTimedOut": "La connessione TCP è scaduta.",
|
||||
"tcpConnectionFailed": "Impossibile stabilire la connessione TCP: {error}",
|
||||
"map_showDiscoveryContacts": "Mostra Contatti di Discovery",
|
||||
"map_setAsMyLocation": "Imposta come la mia posizione"
|
||||
}
|
||||
|
||||
@@ -184,6 +184,12 @@ abstract class AppLocalizations {
|
||||
/// **'Delete'**
|
||||
String get common_delete;
|
||||
|
||||
/// No description provided for @common_deleteAll.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Delete All'**
|
||||
String get common_deleteAll;
|
||||
|
||||
/// No description provided for @common_close.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -316,6 +322,228 @@ abstract class AppLocalizations {
|
||||
/// **'MeshCore Open'**
|
||||
String get scanner_title;
|
||||
|
||||
/// No description provided for @connectionChoiceUsbLabel.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'USB'**
|
||||
String get connectionChoiceUsbLabel;
|
||||
|
||||
/// No description provided for @connectionChoiceBluetoothLabel.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Bluetooth'**
|
||||
String get connectionChoiceBluetoothLabel;
|
||||
|
||||
/// No description provided for @connectionChoiceTcpLabel.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'TCP'**
|
||||
String get connectionChoiceTcpLabel;
|
||||
|
||||
/// No description provided for @tcpScreenTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Connect over TCP'**
|
||||
String get tcpScreenTitle;
|
||||
|
||||
/// No description provided for @tcpHostLabel.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'IP Address'**
|
||||
String get tcpHostLabel;
|
||||
|
||||
/// No description provided for @tcpHostHint.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'192.168.40.10'**
|
||||
String get tcpHostHint;
|
||||
|
||||
/// No description provided for @tcpPortLabel.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Port'**
|
||||
String get tcpPortLabel;
|
||||
|
||||
/// No description provided for @tcpPortHint.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'5000'**
|
||||
String get tcpPortHint;
|
||||
|
||||
/// No description provided for @tcpStatus_notConnected.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Enter endpoint and connect'**
|
||||
String get tcpStatus_notConnected;
|
||||
|
||||
/// No description provided for @tcpStatus_connectingTo.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Connecting to {endpoint}...'**
|
||||
String tcpStatus_connectingTo(String endpoint);
|
||||
|
||||
/// No description provided for @tcpErrorHostRequired.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'IP address is required.'**
|
||||
String get tcpErrorHostRequired;
|
||||
|
||||
/// No description provided for @tcpErrorPortInvalid.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Port must be between 1 and 65535.'**
|
||||
String get tcpErrorPortInvalid;
|
||||
|
||||
/// No description provided for @tcpErrorUnsupported.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'TCP transport is not supported on this platform.'**
|
||||
String get tcpErrorUnsupported;
|
||||
|
||||
/// No description provided for @tcpErrorTimedOut.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'TCP connection timed out.'**
|
||||
String get tcpErrorTimedOut;
|
||||
|
||||
/// No description provided for @tcpConnectionFailed.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'TCP connection failed: {error}'**
|
||||
String tcpConnectionFailed(String error);
|
||||
|
||||
/// No description provided for @usbScreenTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Connect over USB'**
|
||||
String get usbScreenTitle;
|
||||
|
||||
/// No description provided for @usbScreenSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Choose a detected serial device and connect directly to your MeshCore node.'**
|
||||
String get usbScreenSubtitle;
|
||||
|
||||
/// No description provided for @usbScreenStatus.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Select a USB device'**
|
||||
String get usbScreenStatus;
|
||||
|
||||
/// No description provided for @usbScreenNote.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'USB serial is active on supported Android devices and desktop platforms.'**
|
||||
String get usbScreenNote;
|
||||
|
||||
/// No description provided for @usbScreenEmptyState.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'No USB devices found. Plug one in and refresh.'**
|
||||
String get usbScreenEmptyState;
|
||||
|
||||
/// No description provided for @usbErrorPermissionDenied.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'USB permission was denied.'**
|
||||
String get usbErrorPermissionDenied;
|
||||
|
||||
/// No description provided for @usbErrorDeviceMissing.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'The selected USB device is no longer available.'**
|
||||
String get usbErrorDeviceMissing;
|
||||
|
||||
/// No description provided for @usbErrorInvalidPort.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Select a valid USB device.'**
|
||||
String get usbErrorInvalidPort;
|
||||
|
||||
/// No description provided for @usbErrorBusy.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Another USB connection request is already in progress.'**
|
||||
String get usbErrorBusy;
|
||||
|
||||
/// No description provided for @usbErrorNotConnected.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'No USB device is connected.'**
|
||||
String get usbErrorNotConnected;
|
||||
|
||||
/// No description provided for @usbErrorOpenFailed.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Failed to open the selected USB device.'**
|
||||
String get usbErrorOpenFailed;
|
||||
|
||||
/// No description provided for @usbErrorConnectFailed.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Failed to connect to the selected USB device.'**
|
||||
String get usbErrorConnectFailed;
|
||||
|
||||
/// No description provided for @usbErrorUnsupported.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'USB serial is not supported on this platform.'**
|
||||
String get usbErrorUnsupported;
|
||||
|
||||
/// No description provided for @usbErrorAlreadyActive.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'A USB connection is already active.'**
|
||||
String get usbErrorAlreadyActive;
|
||||
|
||||
/// No description provided for @usbErrorNoDeviceSelected.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'No USB device was selected.'**
|
||||
String get usbErrorNoDeviceSelected;
|
||||
|
||||
/// No description provided for @usbErrorPortClosed.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'The USB connection is not open.'**
|
||||
String get usbErrorPortClosed;
|
||||
|
||||
/// No description provided for @usbErrorConnectTimedOut.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Connection timed out. Make sure the device has USB Companion firmware.'**
|
||||
String get usbErrorConnectTimedOut;
|
||||
|
||||
/// No description provided for @usbFallbackDeviceName.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Web Serial Device'**
|
||||
String get usbFallbackDeviceName;
|
||||
|
||||
/// No description provided for @usbStatus_notConnected.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Select a USB device'**
|
||||
String get usbStatus_notConnected;
|
||||
|
||||
/// No description provided for @usbStatus_connecting.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Connecting to USB device...'**
|
||||
String get usbStatus_connecting;
|
||||
|
||||
/// No description provided for @usbStatus_searching.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Searching for USB devices...'**
|
||||
String get usbStatus_searching;
|
||||
|
||||
/// No description provided for @usbConnectionFailed.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'USB connection failed: {error}'**
|
||||
String usbConnectionFailed(String error);
|
||||
|
||||
/// No description provided for @scanner_scanning.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -388,6 +616,18 @@ abstract class AppLocalizations {
|
||||
/// **'Please turn on Bluetooth to scan for devices'**
|
||||
String get scanner_bluetoothOffMessage;
|
||||
|
||||
/// No description provided for @scanner_chromeRequired.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Chrome Browser Required'**
|
||||
String get scanner_chromeRequired;
|
||||
|
||||
/// No description provided for @scanner_chromeRequiredMessage.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'This web application requires Google Chrome or a Chromium-based browser for Bluetooth support.'**
|
||||
String get scanner_chromeRequiredMessage;
|
||||
|
||||
/// No description provided for @scanner_enableBluetooth.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -544,6 +784,18 @@ abstract class AppLocalizations {
|
||||
/// **'Longitude'**
|
||||
String get settings_longitude;
|
||||
|
||||
/// No description provided for @settings_contactSettings.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Contact Settings'**
|
||||
String get settings_contactSettings;
|
||||
|
||||
/// No description provided for @settings_contactSettingsSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Settings for how contacts are added.'**
|
||||
String get settings_contactSettingsSubtitle;
|
||||
|
||||
/// No description provided for @settings_privacyMode.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -1489,37 +1741,37 @@ abstract class AppLocalizations {
|
||||
/// No description provided for @contacts_lastSeenNow.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Last seen now'**
|
||||
/// **'recently'**
|
||||
String get contacts_lastSeenNow;
|
||||
|
||||
/// No description provided for @contacts_lastSeenMinsAgo.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Last seen {minutes} mins ago'**
|
||||
/// **'~ {minutes} min.'**
|
||||
String contacts_lastSeenMinsAgo(int minutes);
|
||||
|
||||
/// No description provided for @contacts_lastSeenHourAgo.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Last seen 1 hour ago'**
|
||||
/// **'~ 1 hour'**
|
||||
String get contacts_lastSeenHourAgo;
|
||||
|
||||
/// No description provided for @contacts_lastSeenHoursAgo.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Last seen {hours} hours ago'**
|
||||
/// **'~ {hours} hours'**
|
||||
String contacts_lastSeenHoursAgo(int hours);
|
||||
|
||||
/// No description provided for @contacts_lastSeenDayAgo.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Last seen 1 day ago'**
|
||||
/// **'~ 1 day'**
|
||||
String get contacts_lastSeenDayAgo;
|
||||
|
||||
/// No description provided for @contacts_lastSeenDaysAgo.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Last seen {days} days ago'**
|
||||
/// **'~ {days} days'**
|
||||
String contacts_lastSeenDaysAgo(int days);
|
||||
|
||||
/// No description provided for @channels_title.
|
||||
@@ -2494,6 +2746,12 @@ abstract class AppLocalizations {
|
||||
/// **'Share marker here'**
|
||||
String get map_shareMarkerHere;
|
||||
|
||||
/// No description provided for @map_setAsMyLocation.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Set as my location'**
|
||||
String get map_setAsMyLocation;
|
||||
|
||||
/// No description provided for @map_pinLabel.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -2608,6 +2866,24 @@ abstract class AppLocalizations {
|
||||
/// **'Show shared markers'**
|
||||
String get map_showSharedMarkers;
|
||||
|
||||
/// No description provided for @map_showGuessedLocations.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Show guessed node locations'**
|
||||
String get map_showGuessedLocations;
|
||||
|
||||
/// No description provided for @map_showDiscoveryContacts.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Show Discovery Contacts'**
|
||||
String get map_showDiscoveryContacts;
|
||||
|
||||
/// No description provided for @map_guessedLocation.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Guessed location'**
|
||||
String get map_guessedLocation;
|
||||
|
||||
/// No description provided for @map_lastSeenTime.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -5380,6 +5656,138 @@ abstract class AppLocalizations {
|
||||
/// In en, this message translates to:
|
||||
/// **'Last seen'**
|
||||
String get snrIndicator_lastSeen;
|
||||
|
||||
/// No description provided for @contactsSettings_title.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Contacts settings'**
|
||||
String get contactsSettings_title;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Automatic Discovery'**
|
||||
String get contactsSettings_autoAddTitle;
|
||||
|
||||
/// No description provided for @contactsSettings_otherTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Other contact related settings'**
|
||||
String get contactsSettings_otherTitle;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddUsersTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Auto-add users'**
|
||||
String get contactsSettings_autoAddUsersTitle;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddUsersSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Allow the companion to automatically add discovered users.'**
|
||||
String get contactsSettings_autoAddUsersSubtitle;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddRepeatersTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Auto-add repeaters'**
|
||||
String get contactsSettings_autoAddRepeatersTitle;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddRepeatersSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Allow the companion to automatically add discovered repeaters.'**
|
||||
String get contactsSettings_autoAddRepeatersSubtitle;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddRoomServersTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Auto-add room servers'**
|
||||
String get contactsSettings_autoAddRoomServersTitle;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddRoomServersSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Allow the companion to automatically add discovered room servers.'**
|
||||
String get contactsSettings_autoAddRoomServersSubtitle;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddSensorsTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Auto-add sensors'**
|
||||
String get contactsSettings_autoAddSensorsTitle;
|
||||
|
||||
/// No description provided for @contactsSettings_autoAddSensorsSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Allow the companion to automatically add discovered sensors.'**
|
||||
String get contactsSettings_autoAddSensorsSubtitle;
|
||||
|
||||
/// No description provided for @contactsSettings_overwriteOldestTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Overwrite Oldest'**
|
||||
String get contactsSettings_overwriteOldestTitle;
|
||||
|
||||
/// No description provided for @contactsSettings_overwriteOldestSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'When the contact list is full, the oldest non-favorited contact will be replaced.'**
|
||||
String get contactsSettings_overwriteOldestSubtitle;
|
||||
|
||||
/// No description provided for @discoveredContacts_Title.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Discovered Contacts'**
|
||||
String get discoveredContacts_Title;
|
||||
|
||||
/// No description provided for @discoveredContacts_noMatching.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'No matching contacts'**
|
||||
String get discoveredContacts_noMatching;
|
||||
|
||||
/// No description provided for @discoveredContacts_searchHint.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Search discovered contacts'**
|
||||
String get discoveredContacts_searchHint;
|
||||
|
||||
/// No description provided for @discoveredContacts_contactAdded.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Contact added'**
|
||||
String get discoveredContacts_contactAdded;
|
||||
|
||||
/// No description provided for @discoveredContacts_addContact.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Add Contact'**
|
||||
String get discoveredContacts_addContact;
|
||||
|
||||
/// No description provided for @discoveredContacts_copyContact.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Copy Contact to clipboard'**
|
||||
String get discoveredContacts_copyContact;
|
||||
|
||||
/// No description provided for @discoveredContacts_deleteContact.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Delete Discovered Contact'**
|
||||
String get discoveredContacts_deleteContact;
|
||||
|
||||
/// No description provided for @discoveredContacts_deleteContactAll.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Delete All Discovered Contacts'**
|
||||
String get discoveredContacts_deleteContactAll;
|
||||
|
||||
/// No description provided for @discoveredContacts_deleteContactAllContent.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Are you sure you want to delete all discovered contacts?'**
|
||||
String get discoveredContacts_deleteContactAllContent;
|
||||
}
|
||||
|
||||
class _AppLocalizationsDelegate
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Изтрий';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Изтрий всичко';
|
||||
|
||||
@override
|
||||
String get common_close => 'Затвори';
|
||||
|
||||
@@ -108,6 +111,134 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Свържете се чрез TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP адрес';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Пристанище';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Въведете крайната точка и свържете се.';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Свързване към $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Необходим е IP адрес.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid => 'Портът трябва да бъде между 1 и 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Транспортът чрез TCP не се поддържа на тази платформа.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'Връзката TCP изтекла.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Неуспешно е установено TCP връзката: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Свържете се чрез USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Изберете открития сериен уред и свържете директно към вашия MeshCore възел.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Изберете USB устройство';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'USB серийната връзка е активна на поддържаните Android устройства и настолни платформи.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Няма открити USB устройства. Включете едно и опитайте отново.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied => 'Не беше разрешено достъпът през USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Избраното USB устройство вече не е налично.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Изберете валитно USB устройство.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Друг мол за свързване през USB вече е в процес на изпълнение.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Няма свързано USB устройство.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Не успях да отворя избраното USB устройство.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Не успях да се свържа с избраното USB устройство.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'USB серийната комуникация не се поддържа на тази платформа.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'USB връзката вече е активирана.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected => 'Няма избран USB устройство.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'USB връзката не е активна.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Връзката прекъсна. Уверете се, че устройството има софтуер за USB връзка.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName =>
|
||||
'Устройство за четене на уеб серийни данни';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Изберете USB устройство';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Свързване към USB устройство...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Търсене на USB устройства...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Неуспешно свързване през USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Сканиране за устройства...';
|
||||
|
||||
@@ -150,6 +281,13 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Моля, активирайте Bluetooth, за да сканирате за устройства.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Изисква се браузър Chrome';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Това уеб приложение изисква Google Chrome или браузър, базиран на Chromium, за поддръжка на Bluetooth.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Активирайте Bluetooth';
|
||||
|
||||
@@ -234,6 +372,13 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Дължина';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Настройки за контакти';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Настройки за добавяне на контакти.';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Режим на поверителност';
|
||||
|
||||
@@ -1366,6 +1511,9 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Споделете маркер тук';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Задайте като моя местоположение';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Етикетиране на пин';
|
||||
|
||||
@@ -1426,6 +1574,16 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Покажи споделени маркери';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Покажете местоположенията на предположените възли.';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Покажи контакти за откриване';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Предполагано местоположение';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Последна видяна дата';
|
||||
|
||||
@@ -3112,4 +3270,82 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Последно видян';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Настройки на контактите';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Автоматично откриване';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Други настройки свързани с контакти';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Автоматично добавяне на потребители';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Позволи на спътника да добавя автоматично откритите потребители.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Автоматично добавяне на повтарящи се елементи';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Позволи на спътника да добавя автоматично откритите повтарящи се устройства.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Автоматично добавяне на сървъри на стаите';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Позволи на спътника да добавя автоматично откритите сървъри на стаите.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Автоматично добавяне на датчици';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Позволи на спътника да добавя автоматично откритите датчици.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Премахни най-старото';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Когато списъкът с контакти е пълен, най-старият неключов контакт ще бъде заменен.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Открити контакти';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Няма съвпадащи контакти';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Търсене на открити контакти';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Контакт добавен';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Добави контакт';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => 'Копирай контакт в клипборда';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Изтрий контакт';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Изтриване на Всички Открити Контакти';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Сигурни ли сте, че искате да изтриете всички открити контакти?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Löschen';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Alles löschen';
|
||||
|
||||
@override
|
||||
String get common_close => 'Schließen';
|
||||
|
||||
@@ -108,6 +111,137 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Verbinden über TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP-Adresse';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Port';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected =>
|
||||
'Geben Sie den Endpunkt ein und verbinden Sie sich.';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Verbindung zu $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Eine IP-Adresse ist erforderlich.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid =>
|
||||
'Die Portnummer muss zwischen 1 und 65535 liegen.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Die TCP-Übertragung wird auf dieser Plattform nicht unterstützt.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'Die TCP-Verbindung ist abgelaufen.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Fehler beim TCP-Verbindungsaufbau: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Verbinden über USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Wählen Sie ein erkannten serielles Gerät aus und verbinden Sie es direkt mit Ihrem MeshCore-Knoten.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Wählen Sie ein USB-Gerät aus';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'Die USB-Serielle Schnittstelle ist auf unterstützten Android-Geräten und Desktop-Plattformen aktiv.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Keine USB-Geräte gefunden. Schließen Sie eines an und aktualisieren Sie.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'Die USB-Berechtigung wurde abgelehnt.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Das ausgewählte USB-Gerät ist nicht mehr verfügbar.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Wählen Sie ein gültiges USB-Gerät aus.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Eine weitere Anfrage für eine USB-Verbindung ist bereits in Bearbeitung.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Es ist kein USB-Gerät angeschlossen.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Fehlgeschlagen beim Öffnen des ausgewählten USB-Geräts.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Keine Verbindung zum ausgewählten USB-Gerät hergestellt.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'Die USB-Serielle Schnittstelle wird auf dieser Plattform nicht unterstützt.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive =>
|
||||
'Eine USB-Verbindung ist bereits hergestellt.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected => 'Kein USB-Gerät wurde ausgewählt.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'Die USB-Verbindung ist nicht aktiv.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Verbindung konnte nicht hergestellt werden. Stellen Sie sicher, dass das Gerät die entsprechende USB-Firmware enthält.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName => 'Web-Serielle Geräte';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Wählen Sie ein USB-Gerät aus';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Verbindung zum USB-Gerät...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Suche nach USB-Geräten...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Fehler beim USB-Verbindungsaufbau: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Scannen nach Geräten...';
|
||||
|
||||
@@ -150,6 +284,13 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Bitte aktivieren Sie Bluetooth, um nach Geräten zu suchen.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Chrome Browser erforderlich';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Diese Webanwendung erfordert Google Chrome oder einen Chromium-basierten Browser für die Bluetooth-Unterstützung.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Bluetooth aktivieren';
|
||||
|
||||
@@ -233,6 +374,13 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Längengrad';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Kontakteinstellungen';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Einstellungen für das Hinzufügen von Kontakten';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Privatsphäreeinstellung';
|
||||
|
||||
@@ -770,27 +918,27 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get contacts_noMembers => 'Keine Mitglieder';
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenNow => 'gerade gesehen';
|
||||
String get contacts_lastSeenNow => 'kürzlich';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenMinsAgo(int minutes) {
|
||||
return 'Letzte Sichtung vor $minutes Minuten.';
|
||||
return '~ $minutes Min.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenHourAgo => 'Letzte Sichtung vor 1 Stunde.';
|
||||
String get contacts_lastSeenHourAgo => '~ 1 Std.';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenHoursAgo(int hours) {
|
||||
return 'Letzte Sichtung vor $hours Stunden.';
|
||||
return '~ $hours Std.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenDayAgo => 'Letzte Sichtung vor 1 Tag';
|
||||
String get contacts_lastSeenDayAgo => '~ 1 Tag';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenDaysAgo(int days) {
|
||||
return 'Letzte Sichtung $days Tage zuvor';
|
||||
return '~ $days Tage';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1365,6 +1513,9 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Teilen Sie den Marker hier.';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Als meine aktuelle Position festlegen';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Pin Name';
|
||||
|
||||
@@ -1425,6 +1576,16 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Zeige gemeinsam genutzte Marker';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Zeige die vermuteten Knotenpositionen';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Entdeckungs-Kontakte anzeigen';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Geschätzter Ort';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Letzte Sichtung';
|
||||
|
||||
@@ -3121,4 +3282,84 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Zuletzt gesehen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Kontakteinstellungen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Automatische Erkennung';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Weitere Einstellungen zu Kontakten';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Automatische Hinzufügung von Benutzern';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Ermöglichen Sie dem Begleiter, automatisch entdeckte Benutzer hinzuzufügen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Automatisch Repeater hinzufügen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Ermöglichen Sie dem Begleiter, automatisch entdeckte Repeater hinzuzufügen.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Automatisch Raumservers hinzufügen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Ermöglichen Sie dem Begleiter, entdeckte Raumserver automatisch hinzuzufügen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Automatisch Sensoren hinzufügen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Ermöglichen Sie dem Begleiter, automatisch entdeckte Sensoren hinzuzufügen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle =>
|
||||
'Überschreiben des Ältesten';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Wenn die Kontaktliste voll ist, wird der älteste nicht favorisierte Kontakt ersetzt.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Entdeckte Kontakte';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Keine passenden Kontakte';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Entdeckte Kontakte suchen';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Kontakt hinzugefügt';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Kontakt hinzufügen';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact =>
|
||||
'Kontakt in die Zwischenablage kopieren';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Kontakt löschen';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Alle entdeckten Kontakte löschen';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Sind Sie sicher, dass Sie alle gefundenen Kontakte löschen möchten?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Delete';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Delete All';
|
||||
|
||||
@override
|
||||
String get common_close => 'Close';
|
||||
|
||||
@@ -108,6 +111,132 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Connect over TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP Address';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Port';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Enter endpoint and connect';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Connecting to $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'IP address is required.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid => 'Port must be between 1 and 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'TCP transport is not supported on this platform.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'TCP connection timed out.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'TCP connection failed: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Connect over USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Choose a detected serial device and connect directly to your MeshCore node.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Select a USB device';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'USB serial is active on supported Android devices and desktop platforms.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'No USB devices found. Plug one in and refresh.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied => 'USB permission was denied.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'The selected USB device is no longer available.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Select a valid USB device.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Another USB connection request is already in progress.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'No USB device is connected.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed => 'Failed to open the selected USB device.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Failed to connect to the selected USB device.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'USB serial is not supported on this platform.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'A USB connection is already active.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected => 'No USB device was selected.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'The USB connection is not open.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Connection timed out. Make sure the device has USB Companion firmware.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName => 'Web Serial Device';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Select a USB device';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Connecting to USB device...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Searching for USB devices...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'USB connection failed: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Scanning for devices...';
|
||||
|
||||
@@ -149,6 +278,13 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Please turn on Bluetooth to scan for devices';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Chrome Browser Required';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'This web application requires Google Chrome or a Chromium-based browser for Bluetooth support.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Enable Bluetooth';
|
||||
|
||||
@@ -232,6 +368,13 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Longitude';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Contact Settings';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Settings for how contacts are added.';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Privacy Mode';
|
||||
|
||||
@@ -761,27 +904,27 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get contacts_noMembers => 'No members';
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenNow => 'Last seen now';
|
||||
String get contacts_lastSeenNow => 'recently';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenMinsAgo(int minutes) {
|
||||
return 'Last seen $minutes mins ago';
|
||||
return '~ $minutes min.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenHourAgo => 'Last seen 1 hour ago';
|
||||
String get contacts_lastSeenHourAgo => '~ 1 hour';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenHoursAgo(int hours) {
|
||||
return 'Last seen $hours hours ago';
|
||||
return '~ $hours hours';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenDayAgo => 'Last seen 1 day ago';
|
||||
String get contacts_lastSeenDayAgo => '~ 1 day';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenDaysAgo(int days) {
|
||||
return 'Last seen $days days ago';
|
||||
return '~ $days days';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1344,6 +1487,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Share marker here';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Set as my location';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Pin label';
|
||||
|
||||
@@ -1404,6 +1550,15 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Show shared markers';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations => 'Show guessed node locations';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Show Discovery Contacts';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Guessed location';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Last Seen Time';
|
||||
|
||||
@@ -3065,4 +3220,78 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Last seen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Contacts settings';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Automatic Discovery';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle => 'Other contact related settings';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle => 'Auto-add users';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Allow the companion to automatically add discovered users.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle => 'Auto-add repeaters';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Allow the companion to automatically add discovered repeaters.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Auto-add room servers';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Allow the companion to automatically add discovered room servers.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle => 'Auto-add sensors';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Allow the companion to automatically add discovered sensors.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Overwrite Oldest';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'When the contact list is full, the oldest non-favorited contact will be replaced.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Discovered Contacts';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'No matching contacts';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Search discovered contacts';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Contact added';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Add Contact';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => 'Copy Contact to clipboard';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Delete Discovered Contact';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Delete All Discovered Contacts';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Are you sure you want to delete all discovered contacts?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Eliminar';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Eliminar todo';
|
||||
|
||||
@override
|
||||
String get common_close => 'Cerrar';
|
||||
|
||||
@@ -108,6 +111,135 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Establecer conexión a través de TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'Dirección IP';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Puerto';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Ingrese la dirección final y conecte.';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Conectándose a $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Se requiere la dirección IP.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid => 'El puerto debe estar entre 1 y 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'El protocolo de transporte TCP no está soportado en esta plataforma.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'La conexión TCP ha caducado.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Error en la conexión TCP: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Conecte mediante USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Seleccione el dispositivo de serie detectado y conéctelo directamente a su nodo MeshCore.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Seleccione un dispositivo USB';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'La comunicación serial a través de USB está activa en dispositivos Android compatibles y en plataformas de escritorio.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'No se encontraron dispositivos USB. Conecte uno y vuelva a intentar.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'Se denegó el permiso de acceso a través de USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'El dispositivo USB seleccionado ya no está disponible.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Seleccione un dispositivo USB válido.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Ya se ha iniciado una solicitud de conexión USB adicional.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'No hay ningún dispositivo USB conectado.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'No se pudo abrir el dispositivo USB seleccionado.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'No se pudo conectar con el dispositivo USB seleccionado.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'La comunicación serial a través de USB no está soportada en esta plataforma.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'La conexión USB ya está activa.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected =>
|
||||
'No se ha seleccionado ningún dispositivo USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'La conexión USB no está activa.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'La conexión ha caducado. Asegúrese de que el dispositivo tenga el firmware USB Companion.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName => 'Dispositivo de serie web';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Seleccione un dispositivo USB';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Conectándose al dispositivo USB...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Buscando dispositivos USB...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Error al conectar mediante USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Escaneando dispositivos...';
|
||||
|
||||
@@ -150,6 +282,13 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Por favor, active el Bluetooth para escanear dispositivos.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Navegador Chrome requerido';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Esta aplicación web requiere Google Chrome o un navegador basado en Chromium para el soporte de Bluetooth.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Habilitar Bluetooth';
|
||||
|
||||
@@ -233,6 +372,13 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Longitud';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Configuración de contacto';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Configuración de cómo se agregan los contactos.';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Modo Privacidad';
|
||||
|
||||
@@ -775,23 +921,23 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String contacts_lastSeenMinsAgo(int minutes) {
|
||||
return 'Última vez visto hace $minutes minutos.';
|
||||
return '~ $minutes min.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenHourAgo => 'Última vez que se vio hace 1 hora';
|
||||
String get contacts_lastSeenHourAgo => '~ 1 hora';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenHoursAgo(int hours) {
|
||||
return 'Última vez visto hace $hours horas.';
|
||||
return '~ $hours horas';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenDayAgo => 'Última vez que se vio hace 1 día';
|
||||
String get contacts_lastSeenDayAgo => '~ 1 día';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenDaysAgo(int days) {
|
||||
return 'Última vez visto hace $days días.';
|
||||
return '~ $days días';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1363,6 +1509,9 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Compartir marcador aquí';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Establecer mi ubicación';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Etiqueta de marcador';
|
||||
|
||||
@@ -1423,6 +1572,16 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Mostrar marcadores compartidos';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Mostrar las ubicaciones estimadas de los nodos.';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Mostrar Contactos de Descubrimiento';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Ubicación estimada';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Última vez que se vio';
|
||||
|
||||
@@ -3113,4 +3272,85 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Visto por última vez';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Configuración de contactos';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Detección automática';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Otras configuraciones relacionadas con el contacto';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Agregar usuarios automáticamente';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Permitir que el compañero agregue automáticamente a los usuarios descubiertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Agregar repetidores automáticamente';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Permitir que el compañero agregue automáticamente los repetidores descubiertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Agregar automáticamente servidores de sala';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Permitir que el compañero agregue automáticamente los servidores de salas descubiertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Agregar sensores automáticamente';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Permitir que el compañero agregue automáticamente los sensores descubiertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle =>
|
||||
'Sobreescribir el más antiguo';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Cuando la lista de contactos esté llena, se reemplazará el contacto no favorito más antiguo.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Contactos descubiertos';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching =>
|
||||
'No se encontraron contactos coincidentes';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Buscar contactos descubiertos';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Contacto agregado';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Agregar contacto';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact =>
|
||||
'Copiar contacto al portapapeles';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Eliminar contacto';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Eliminar Todos los Contactos Descubiertos';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'¿Está seguro de que desea eliminar todos los contactos descubiertos!';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Supprimer';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Supprimer tout';
|
||||
|
||||
@override
|
||||
String get common_close => 'Fermer';
|
||||
|
||||
@@ -108,6 +111,137 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Établir une connexion via TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'Adresse IP';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Port';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected =>
|
||||
'Entrez l\'adresse de destination et connectez-vous.';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Connexion à $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Une adresse IP est obligatoire.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid =>
|
||||
'La taille du port doit être comprise entre 1 et 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Le protocole TCP n\'est pas pris en charge sur cette plateforme.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'La connexion TCP a expiré.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Échec de la connexion TCP : $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Connectez via USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Sélectionnez un périphérique série détecté et connectez-vous directement à votre nœud MeshCore.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Sélectionnez un périphérique USB';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'La communication série USB est active sur les appareils Android et les plateformes de bureau compatibles.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Aucun périphérique USB n\'a été trouvé. Veuillez en brancher un et rafraîchir la page.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied => 'L\'accès via USB a été refusé.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Le périphérique USB sélectionné n\'est plus disponible.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Sélectionnez un périphérique USB valide.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Une autre demande de connexion USB est déjà en cours.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Aucun appareil USB n\'est connecté.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Impossible d\'ouvrir l\'appareil USB sélectionné.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Impossible de se connecter à l\'appareil USB sélectionné.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'La communication série USB n\'est pas prise en charge sur cette plateforme.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'Une connexion USB est déjà établie.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected =>
|
||||
'Aucun appareil USB n\'a été sélectionné.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'La connexion USB n\'est pas établie.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'La connexion a expiré. Assurez-vous que l\'appareil dispose du firmware USB Companion.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName =>
|
||||
'Dispositif de communication série sur le Web';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Sélectionnez un périphérique USB';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Connexion au périphérique USB...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Recherche de périphériques USB...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Échec de la connexion USB : $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Recherche de périphériques...';
|
||||
|
||||
@@ -150,6 +284,13 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Veuillez activer le Bluetooth pour rechercher des appareils.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Navigateur Chrome requis';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Cette application web nécessite Google Chrome ou un navigateur basé sur Chromium pour le support Bluetooth.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Activer le Bluetooth';
|
||||
|
||||
@@ -234,6 +375,13 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Longitude';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Paramètres de contact';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Paramètres pour l\'ajout de contacts';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Mode de confidentialité';
|
||||
|
||||
@@ -777,23 +925,23 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String contacts_lastSeenMinsAgo(int minutes) {
|
||||
return 'Vu il y a $minutes minutes';
|
||||
return '~ $minutes min.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenHourAgo => 'Vu il y a 1 heure';
|
||||
String get contacts_lastSeenHourAgo => '~ 1 heure';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenHoursAgo(int hours) {
|
||||
return 'Vu il y a $hours heures';
|
||||
return '~ $hours heures';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contacts_lastSeenDayAgo => 'Vu il y a 1 jour';
|
||||
String get contacts_lastSeenDayAgo => '~ 1 jour';
|
||||
|
||||
@override
|
||||
String contacts_lastSeenDaysAgo(int days) {
|
||||
return 'Vu il y a $days jours';
|
||||
return '~ $days jours';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1370,6 +1518,9 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Partager le marqueur ici';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Définir comme ma localisation';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Étiquete de repin';
|
||||
|
||||
@@ -1430,6 +1581,16 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Afficher les marqueurs partagés';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Afficher les emplacements des nœuds estimés';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Afficher les contacts de découverte';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Lieu deviné';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Dernière fois vu';
|
||||
|
||||
@@ -3135,4 +3296,84 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Dernière fois vu';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Paramètres des contacts';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Découverte automatique';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Autres paramètres liés aux contacts';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Ajouter automatiquement les utilisateurs';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Autoriser le compagnon à ajouter automatiquement les utilisateurs découverts';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Ajouter automatiquement les répéteurs';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Autoriser le compagnon à ajouter automatiquement les répéteurs découverts';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Ajouter automatiquement les serveurs de salle';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Autoriser le compagnon à ajouter automatiquement les serveurs de salles découverts';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Ajouter automatiquement les capteurs';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Autoriser le compagnon à ajouter automatiquement les capteurs découverts.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Écraser le plus ancien';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Lorsque la liste de contacts est pleine, le contact le plus ancien non favori sera remplacé.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Contacts découverts';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Aucun contact correspondant';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint =>
|
||||
'Rechercher des contacts découverts';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Contact ajouté';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Ajouter un contact';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact =>
|
||||
'Copier le contact dans le presse-papiers';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Supprimer le contact';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Supprimer tous les contacts découverts';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Êtes-vous sûr de vouloir supprimer tous les contacts découverts ?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Elimina';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Elimina tutto';
|
||||
|
||||
@override
|
||||
String get common_close => 'Chiudi';
|
||||
|
||||
@@ -108,6 +111,137 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Stabilire una connessione tramite TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'Indirizzo IP';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Porta';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Inserisci l\'endpoint e connettiti.';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Connessione a $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'È necessario fornire un indirizzo IP.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid =>
|
||||
'La dimensione della porta deve essere compresa tra 1 e 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Il protocollo TCP non è supportato su questa piattaforma.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'La connessione TCP è scaduta.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Impossibile stabilire la connessione TCP: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Connessione tramite USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Seleziona il dispositivo seriale rilevato e connettilo direttamente al tuo nodo MeshCore.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Seleziona un dispositivo USB';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'La comunicazione seriale USB è attiva sui dispositivi Android supportati e sulle piattaforme desktop.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Nessun dispositivo USB rilevato. Collegare uno e aggiornare.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'È stato negato l\'accesso tramite USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Il dispositivo USB selezionato non è più disponibile.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Seleziona un dispositivo USB valido.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Un\'altra richiesta di connessione tramite USB è già in corso.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Non è collegato alcun dispositivo USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Impossibile aprire il dispositivo USB selezionato.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Impossibile connettersi al dispositivo USB selezionato.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'La comunicazione seriale tramite USB non è supportata su questa piattaforma.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'La connessione USB è già attiva.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected =>
|
||||
'Non è stato selezionato alcun dispositivo USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'La connessione USB non è attiva.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'La connessione è scaduta. Assicurarsi che il dispositivo abbia il firmware USB Companion.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName =>
|
||||
'Dispositivo per comunicazione seriale su rete';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Seleziona un dispositivo USB';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Connessione al dispositivo USB...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Ricerca di dispositivi USB...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Errore nella connessione USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Scansione in corso per i dispositivi...';
|
||||
|
||||
@@ -150,6 +284,13 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Si prega di attivare il Bluetooth per effettuare la scansione dei dispositivi.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Browser Chrome richiesto';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Questa applicazione web richiede Google Chrome o un browser basato su Chromium per il supporto Bluetooth.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Abilita il Bluetooth';
|
||||
|
||||
@@ -233,6 +374,13 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Longitudine';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Impostazioni di contatto';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Impostazioni per l\'aggiunta dei contatti';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Modalità Privacy';
|
||||
|
||||
@@ -1362,6 +1510,9 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Condividi marcatore qui';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Imposta come la mia posizione';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Etichetta PIN';
|
||||
|
||||
@@ -1422,6 +1573,15 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Mostra i segnaposto condivisi';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations => 'Mostra le posizioni stimate dei nodi';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Mostra Contatti di Discovery';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Località indovinata';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Ultimo Tempo di Visualizzazione';
|
||||
|
||||
@@ -3116,4 +3276,83 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Ultimo accesso';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Impostazioni dei contatti';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Scoperta automatica';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Altre impostazioni relative ai contatti';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Aggiungere utenti automaticamente';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Consenti al compagno di aggiungere automaticamente gli utenti scoperti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Aggiungere ripetitori automaticamente';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Consenti al compagno di aggiungere automaticamente i ripetitori scoperti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Aggiungere automaticamente i server delle stanze';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Consenti al compagno di aggiungere automaticamente i server delle stanze scoperte.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Aggiungere automaticamente i sensori';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Consenti al compagno di aggiungere automaticamente i sensori scoperti';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle =>
|
||||
'Sostituisci il più vecchio';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Quando l\'elenco dei contatti è pieno, il contatto più vecchio non tra i preferiti verrà sostituito.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Contatti scoperti';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Nessun contatto corrispondente';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Cerca contatti scoperti';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Contatto aggiunto';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Aggiungi contatto';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => 'Copia contatto negli appunti';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Elimina Contatto';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Eliminare tutti i contatti scoperti';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Sei sicuro di voler eliminare tutti i contatti scoperti?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Verwijderen';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Alles verwijderen';
|
||||
|
||||
@override
|
||||
String get common_close => 'Sluiten';
|
||||
|
||||
@@ -108,6 +111,134 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Verbind via TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP-adres';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Poort';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Voer het eindpunt in en verbind';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Verbinding maken met $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Een IP-adres is vereist.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid =>
|
||||
'De poortwaarde moet tussen 1 en 65535 liggen.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'TCP-transport wordt niet ondersteund op deze platform.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'De TCP-verbinding is verlopen.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Verbinding met TCP mislukt: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Verbind via USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Selecteer een gedetecteerd seriële apparaat en verbind deze direct met uw MeshCore-node.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Selecteer een USB-apparaat';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'USB-serieel is actief op ondersteunde Android-apparaten en desktop-platforms.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Geen USB-apparaten gevonden. Sluit er een aan en herlaad.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied => 'Toegang via USB is geweigerd.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Het geselecteerde USB-apparaat is niet meer beschikbaar.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Selecteer een geldig USB-apparaat.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Een andere verzoek om een USB-verbinding is al in behandeling.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Er is geen USB-apparaat aangesloten.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Kon het geselecteerde USB-apparaat niet openen.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Kon niet verbinding maken met het geselecteerde USB-apparaat.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'USB-serieel is niet ondersteund op deze platform.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'Een USB-verbinding is al actief.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected => 'Geen USB-apparaat is geselecteerd.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'De USB-verbinding is niet actief.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Verbinding is verbroken. Zorg ervoor dat het apparaat de juiste USB-firmware heeft.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName => 'Web-serieapparaat';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Selecteer een USB-apparaat';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Verbinding maken met USB-apparaat...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Zoeken naar USB-apparaten...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Fout bij de USB-verbinding: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Scannen naar apparaten...';
|
||||
|
||||
@@ -149,6 +280,13 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Zorg ervoor dat Bluetooth is ingeschakeld om naar apparaten te zoeken.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Chrome-browser vereist';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Deze webapplicatie vereist Google Chrome of een op Chromium gebaseerde browser voor Bluetooth-ondersteuning.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Activeer Bluetooth';
|
||||
|
||||
@@ -233,6 +371,13 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Lengtegraad';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Contactinstellingen';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Instellingen voor het toevoegen van contacten';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Privacy Mode';
|
||||
|
||||
@@ -1357,6 +1502,9 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Deel marker hier';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Stel dit in als mijn locatie';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Label vastzetten';
|
||||
|
||||
@@ -1417,6 +1565,16 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Toon gedeelde markeringen';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Toon de voorspelde locaties van de knopen';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Ontdek contacten weergeven';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Geroerde locatie';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Laatste Bekeken Tijd';
|
||||
|
||||
@@ -3103,4 +3261,82 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Laatst gezien';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Instellingen voor contacten';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Automatische detectie';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Andere instellingen voor contactgerelateerde zaken';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Gebruikers automatisch toevoegen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Sta toe dat de companion automatisch ontdekte gebruikers toevoegt';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Automatisch herhalingstoestellen toevoegen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Sta toe dat de companion automatisch ontdekte repeaters toevoegt';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Automatisch kamerservers toevoegen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Sta toe dat de companion automatisch ontdekte kamer servers toevoegt.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Automatisch sensoren toevoegen';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Sta toe dat de companion automatisch ontdekte sensoren toevoegt';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Overschrijf Oudste';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Wanneer de contactenlijst vol is, wordt de oudste niet-favoriete contactpersoon vervangen.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Ontdekte contacten';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Geen overeenkomende contacten';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Ontdekte contacten zoeken';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Contact toegevoegd';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Contact toevoegen';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => 'Kopieer contact naar klembord';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Contact verwijderen';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Verwijder alle ontdekte contacten';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Weet u zeker dat u alle ontdekte contacten wilt verwijderen?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Usuń';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Usuń wszystko';
|
||||
|
||||
@override
|
||||
String get common_close => 'Zamknąć';
|
||||
|
||||
@@ -108,6 +111,138 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Połącz się za pomocą protokołu TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'Adres IP';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Port';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Wprowadź adres URL i połącz';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Połączenie z $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Wymagana jest adresa IP.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid =>
|
||||
'Numer portu musi mieścić się w zakresie od 1 do 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Transport protokoł TCP nie jest obsługiwany na tym urządzeniu.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut =>
|
||||
'Połączenie TCP zakończyło się bez powodzenia.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Błąd połączenia TCP: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Połącz przez USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Wybierz wykryty urządzenie szeregowe i podłącz je bezpośrednio do swojego węzła MeshCore.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Wybierz urządzenie USB';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'Port szeregowy USB jest aktywny na urządzeniach z systemem Android i platformach stacjonarnych, które go obsługują.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Nie znaleziono żadnych urządzeń USB. Podłącz jedno i zaktualizuj.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'Zostało odrzucone żądanie dostępu przez USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Wybór urządzenia USB już nie jest dostępny.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Wybierz prawidłowe urządzenie USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Kolejne żądanie połączenia przez USB jest już w trakcie realizacji.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Brak podłączonego urządzenia USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Nie udało się otworzyć wybranego urządzenia USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Nie udało się połączyć z wybranym urządzeniem USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'Port szeregowy USB nie jest obsługiwany na tym urządzeniu.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'Połączenie USB jest już aktywne.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected =>
|
||||
'Nie został wybrany żaden urządzenie USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'Połączenie USB nie jest aktywne.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Połączenie nie zostało nawiązane. Upewnij się, że urządzenie posiada oprogramowanie \"USB Companion\".';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName =>
|
||||
'Urządzenie do komunikacji przez sieć (seria)';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Wybierz urządzenie USB';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Połączenie z urządzeniem USB...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Wyszukiwanie urządzeń USB...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Błąd połączenia USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Skanowanie urządzeń...';
|
||||
|
||||
@@ -150,6 +285,13 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Prosimy włączyć Bluetooth, aby przeskanować urządzenia.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Wymagana przeglądarka Chrome';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Ta aplikacja internetowa wymaga przeglądarki Google Chrome lub opartej na Chromium do obsługi Bluetooth.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Włącz Bluetooth';
|
||||
|
||||
@@ -235,6 +377,13 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Długość';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Ustawienia kontaktowe';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Ustawienia dotyczące sposobu dodawania kontaktów';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Tryb Prywatny';
|
||||
|
||||
@@ -1363,6 +1512,9 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Udostępnij znacznik tutaj';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Ustaw jako moje lokalizację';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Oznacz etykietę';
|
||||
|
||||
@@ -1423,6 +1575,16 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Pokaż współdzielone znaki.';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Wyświetl lokalizacje zgadanych węzłów';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Pokaż kontakty odkrywania';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Wydana lokalizacja';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Ostatni raz widiany';
|
||||
|
||||
@@ -3116,4 +3278,82 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Ostatnio widziany';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Ustawienia kontaktów';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Automatyczne odnajdywanie';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Inne ustawienia związane z kontaktami';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Automatycznie dodaj użytkowników';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Pozwól towarzyszowi automatycznie dodawać znalezione użytkowników.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Automatyczne dodawanie powtarzalników';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Zezwól na automatyczne dodawanie odkrytych repeaterów przez towarzysza.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Automatycznie dodaj serwery pokojowe';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Zezwól towarzyszowi na automatyczne dodawanie znalezionych serwerów pokojowych.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Automatycznie dodaj czujniki';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Zezwól towarzyszowi na automatyczne dodawanie wykrytych czujników.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Nadpisz najstarszy';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Gdy lista kontaktów jest pełna, najstarszy nieulubiony kontakt zostanie zastąpiony.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Odkryte Kontakty';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Brak pasujących kontaktów';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Wyszukaj odkryte kontakty';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Kontakt dodany';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Dodaj kontakt';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => 'Kopiuj kontakt do schowka';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Usuń kontakt';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Usuń wszystkie odkryte kontakty';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Czy na pewno chcesz usunąć wszystkie znalezione kontakty?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Excluir';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Excluir Tudo';
|
||||
|
||||
@override
|
||||
String get common_close => 'Fechar';
|
||||
|
||||
@@ -108,6 +111,136 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Estabelecer conexão via TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'Endereço IP';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Porta';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Insira o endereço final e conecte-se.';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Conectando a $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'É necessário fornecer um endereço IP.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid =>
|
||||
'O valor do porto deve estar entre 1 e 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'O protocolo TCP não é suportado nesta plataforma.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'A conexão TCP expirou.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Falha na conexão TCP: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Conecte via USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Selecione um dispositivo serial detectado e conecte-o diretamente ao seu nó MeshCore.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Selecione um dispositivo USB';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'A comunicação serial via USB está ativa em dispositivos Android e plataformas de desktop compatíveis.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Nenhum dispositivo USB encontrado. Conecte um e atualize.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'A permissão para acesso via USB foi negada.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'O dispositivo USB selecionado não está mais disponível.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Selecione um dispositivo USB válido.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Já existe uma solicitação de conexão USB em andamento.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Não há nenhum dispositivo USB conectado.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Não foi possível abrir o dispositivo USB selecionado.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Não foi possível conectar ao dispositivo USB selecionado.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'A comunicação serial via USB não é suportada nesta plataforma.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'A conexão USB já está ativa.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected =>
|
||||
'Nenhum dispositivo USB foi selecionado.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'A conexão USB não está ativa.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'A conexão expirou. Verifique se o dispositivo possui o firmware USB Companion.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName => 'Dispositivo de Serial para a Web';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Selecione um dispositivo USB';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Conectando ao dispositivo USB...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Procurando por dispositivos USB...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Falha na conexão USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Procurando por dispositivos...';
|
||||
|
||||
@@ -150,6 +283,13 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Por favor, ative o Bluetooth para escanear por dispositivos.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Navegador Chrome necessário';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Esta aplicação web requer o Google Chrome ou um navegador baseado no Chromium para suporte de Bluetooth.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Ative o Bluetooth';
|
||||
|
||||
@@ -234,6 +374,13 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Longitude';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Configurações de Contato';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Configurações para como os contatos são adicionados';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Modo de Privacidade';
|
||||
|
||||
@@ -1364,6 +1511,9 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Compartilhar marcador aqui';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Defina minha localização';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Rótulo de marcador';
|
||||
|
||||
@@ -1424,6 +1574,16 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Mostrar marcadores compartilhados';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Mostrar as localizações dos nós estimados';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Mostrar Contatos de Descoberta';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Localização estimada';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Último Tempo de Visualização';
|
||||
|
||||
@@ -3111,4 +3271,84 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Visto pela última vez';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Configurações de contatos';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Descoberta Automática';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Outras configurações relacionadas a contatos';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Adicionar usuários automaticamente';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Permitir que o companheiro adicione automaticamente os usuários descobertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Adicionar repetidores automaticamente';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Permitir que o companheiro adicione automaticamente os repetidores descobertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Adicionar automaticamente servidores de sala';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Permitir que o companheiro adicione automaticamente os servidores de salas descobertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Adicionar sensores automaticamente';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Permitir que o companheiro adicione automaticamente sensores descobertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle =>
|
||||
'Sobrescrever o Mais Antigo';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Quando a lista de contatos estiver cheia, o contato mais antigo não favoritado será substituído.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Contatos Descobertos';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Nenhum contato correspondente';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Pesquisar contatos descobertos';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Contato adicionado';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Adicionar Contato';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact =>
|
||||
'Copiar Contato para a área de transferência';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Excluir Contato';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Excluir Todos os Contatos Descobertos';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Tem certeza de que deseja excluir todos os contatos descobertos?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Удалить';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Удалить все';
|
||||
|
||||
@override
|
||||
String get common_close => 'Закрыть';
|
||||
|
||||
@@ -108,6 +111,137 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Установить соединение по протоколу TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP-адрес';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Порт';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Введите адрес и подключитесь.';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Подключение к $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Необходимо указать IP-адрес.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid =>
|
||||
'Порт должен находиться в диапазоне от 1 до 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Протокол TCP не поддерживается на этой платформе.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'Соединение TCP не удалось установить.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Не удалось установить соединение TCP: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Подключение через USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Выберите обнаруженное устройство с последовательным интерфейсом и подключите его напрямую к вашему узлу MeshCore.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Выберите USB-устройство';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'USB-серийный порт активен на поддерживаемых устройствах Android и на настольных платформах.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Не обнаружено устройств USB. Подключите одно из них и обновите список.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'Запрос на доступ через USB был отклонен.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Выбранное USB-устройство больше недоступно.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Выберите действительное USB-устройство.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Еще одно запрошенное соединение через USB уже находится в процессе.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Ни одно USB-устройство не подключено.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Не удалось открыть выбранное USB-устройство.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Не удалось установить соединение с выбранным USB-устройством.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'Поддержка последовательного USB отсутствует на данной платформе.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'USB-соединение уже установлено.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected =>
|
||||
'Не было выбрано ни одно устройство USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'USB-соединение не установлено.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Соединение не установлено. Убедитесь, что устройство имеет установленное программное обеспечение USB Companion.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName =>
|
||||
'Устройство для последовательного подключения к сети';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Выберите USB-устройство';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Подключение к USB-устройству...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Поиск USB-устройств...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Не удалось установить соединение через USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Поиск устройств...';
|
||||
|
||||
@@ -149,6 +283,13 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Пожалуйста, включите Bluetooth, чтобы найти устройства.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Требуется браузер Chrome';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Для поддержки Bluetooth в этом веб-приложении требуется Google Chrome или браузер на базе Chromium.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Включите Bluetooth';
|
||||
|
||||
@@ -232,6 +373,13 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Долгота';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Настройки контактов';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Настройки добавления контактов';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Режим конфиденциальности';
|
||||
|
||||
@@ -1365,6 +1513,9 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Поделиться меткой здесь';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Установить мое местоположение';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Метка';
|
||||
|
||||
@@ -1425,6 +1576,16 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Показывать общие метки';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Отобразить предполагаемые места расположения узлов';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Показать контакты Discovery';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Угаданное место';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Время последнего появления';
|
||||
|
||||
@@ -3123,4 +3284,84 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Последний раз видели';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Настройки контактов';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Автоматическое обнаружение';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Другие настройки, связанные с контактами';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Автоматически добавлять пользователей';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Разрешить компаньону автоматически добавлять обнаруженных пользователей';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Автоматически добавлять ретрансляторы';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Разрешить спутнику автоматически добавлять обнаруженные ретрансляторы';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Автоматически добавлять серверы комнат';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Разрешить компаньону автоматически добавлять обнаруженные сервера комнат.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Автоматически добавлять датчики';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Разрешить компаньону автоматически добавлять обнаруженные датчики';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle =>
|
||||
'Перезаписать самое старое';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Когда список контактов заполнен, будет заменен самый старый контакт, который не находится в избранном.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Обнаруженные контакты';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Нет совпадающих контактов';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Найденные контакты поиска';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Контакт добавлен';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Добавить контакт';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact =>
|
||||
'Копировать контакт в буфер обмена';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Удалить контакт';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Удалить Все Обнаруженные Контакты';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Вы уверены, что хотите удалить все обнаруженные контакты?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Odstrániť';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Zmazať všetko';
|
||||
|
||||
@override
|
||||
String get common_close => 'Zavrieť';
|
||||
|
||||
@@ -108,6 +111,135 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Spojte sa pomocou protokolu TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP adresa';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Port';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Zadajte cieľovú adresu a pripojte sa.';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Pripojenie k $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Je potrebné zadať IP adresu.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid => 'Číslo portu musí byť medzi 1 a 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Prevoz prostredníctvom protokolu TCP nie je na tejto platforme podporovaný.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'Pripojenie TCP vypršalo.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Neúspešné vytvorenie TCP spojenia: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Pripojte cez USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Vyberte detekovaný sériový zariadenie a pripojte ho priamo k vašej MeshCore uzlu.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Vyberte USB zariadenie';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'USB sériová komunikácia je aktívna na podporovaných zariadeniach s Androidom a na desktopových platformách.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Nenašli sa žiadne USB zariadenia. Pripojte jedno a obnovte.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'Žiadosť o prístup cez USB bola zamietnutá.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Vybrané USB zariadenie už nie je dostupné.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Vyberte platné USB zariadenie.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Ďalšia požiadavka na pripojenie cez USB je aktuálne v procese.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Nie je pripojené žiadne USB zariadenie.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Nepodarilo sa otvoriť vybrané USB zariadenie.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Nepodarilo sa sa sa pripojiť k vybranému USB zariadeniu.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'Podpora USB sériového rozhrania nie je na tejto platforme dostupná.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'Pripojenie cez USB je už aktivované.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected =>
|
||||
'Nebolo vybrané žiadne USB zariadenie.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'Pripojenie cez USB nie je aktivované.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Pripojenie nebolo úspešné. Uistite sa, že zariadenie má nainštalovaný firmware USB Companion.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName => 'Webový sériový zariadenie';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Vyberte USB zariadenie';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Pripojenie k USB zariadeniu...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Hľadanie USB zariadení...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Neúspešné pripojenie cez USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Skrívania zariadení...';
|
||||
|
||||
@@ -150,6 +282,13 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Prosím, zapnite Bluetooth, aby ste mohli skenovať pre zariadenia.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Vyžaduje sa prehliadač Chrome';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Táto webová aplikácia vyžaduje Google Chrome alebo prehliadač založený na Chromium pre podporu Bluetooth.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Povolte Bluetooth';
|
||||
|
||||
@@ -233,6 +372,13 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Dĺžka';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Nastavenia kontaktov';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Nastavenia pre pridávanie kontaktov.';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Režim ochrany súkromia';
|
||||
|
||||
@@ -1358,6 +1504,9 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Zdieľte značku tu';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Nastavte ako moju polohu';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Označka upozornenia';
|
||||
|
||||
@@ -1418,6 +1567,16 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Zobraziť zdieľané značky';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Zobraziť umiestnenia odhadnutých uzlov';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Zobraziť kontakty objavov';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Odhadnutá lokalita';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Posledný čas sledovania';
|
||||
|
||||
@@ -3098,4 +3257,82 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Naposledy videný';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Nastavenia kontaktov';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Automatické zisťovanie';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Ďalšie nastavenia súvisiace s kontaktami';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Automaticky pridávať užívateľov';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Povoliť spoločníkovi automaticky pridávať objavených užívateľov.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Automaticky pridávať opakovače';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Povoliť spoločníkovi automaticky pridávať objavené repeater.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Automaticky pridávať server miestnosti';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Povoliť spoločníkovi automaticky pridať objavené serverové miestnosti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Automaticky pridávať senzory';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Povoliť spoločníkovi automaticky pridávať objavené senzory.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Prepísať najstaršie';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Keď je zoznam kontaktov plný, bude nahradený najstarší neoznačený kontakt.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Objavené kontakty';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Žiadne zhodné kontakty';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Vyhľadať objavené kontakty';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Kontakt bol pridaný';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Pridať kontakt';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => 'Kopírovať kontakt do schránky';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Zmazať kontakt';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Zmazať všetky objavené kontakty';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Ste si istí, že chcete zmazať všetky objavené kontakty?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Izbrisati';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Izbriši vse';
|
||||
|
||||
@override
|
||||
String get common_close => 'Zapri';
|
||||
|
||||
@@ -108,6 +111,133 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Komunicirajte preko protokola TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP naslov';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Vrata';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Vnesite končni naslov in se povežite';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Povezava z $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Potrebna je IP-naslov.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid => 'Port mora biti med 1 in 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Transport preko protokola TCP ni podprt na tej platformi.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'Povezava TCP je presegla časovno obdobje.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Napaka pri povezavi TCP: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Povežite preko USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Izberite zaznano serijsko napravo in se neposredno povežite z vašo MeshCore napravo.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Izberite USB naprave';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'USB serijska povezava je aktivna na podprtih napravah Android in na desktop platformah.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Niti en USB naprave niso najdeni. Povežite eno in posodobite.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'Dovoljenje za dostop preko USB-ja je bilo zavrnjeno.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing => 'Izbrani USB napravej je več ne.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Izberite veljavno USB naprave.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy => 'Že je v teku zahteva za povezavo preko USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Ni priklopljenih USB naprave.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Uspešno ni bilo mogo, da se odpre izbran naprave USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Niso bilo mogoče uskladiti povezave z izbranim USB napom.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'USB serijska komunikacija ni podprta na tej platformi.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'USB povezava je že aktivirana.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected => 'Ni bilo izbranega USB naprave.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'USB povezava ni aktivirana.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Vzpostavitve ni bilo mogo. Prosimo, da se prepričate, da ima naprave trenutno nameštan firmware USB Companion.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName =>
|
||||
'Naprave za serijsko komunikacijo preko spleta';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Izberite USB naprave.';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Povezava z USB napravo...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Iskanje USB naprav...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Napaka pri povezavi preko USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Skeniram za naprave...';
|
||||
|
||||
@@ -150,6 +280,13 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Prosimo, vklopite Bluetooth, da lahko poiščete naprave.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Zahtevan brskalnik Chrome';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Ta spletna aplikacija za podporo Bluetooth zahteva Google Chrome ali brskalnik na osnovi Chromiuma.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Omogočite Bluetooth';
|
||||
|
||||
@@ -233,6 +370,13 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Dolžina';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Nastavitve stika';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Nastavitve za dodajanje stikov.';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Zasebnost';
|
||||
|
||||
@@ -1354,6 +1498,9 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Delite točke tukaj.';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Nastavite to kot mojo lokacijo';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Oznaka za pritrditev';
|
||||
|
||||
@@ -1414,6 +1561,15 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Pokaži skupno označenja';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations => 'Pokaži lokacije domnevnih not.';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Prikaži odkritja kontaktov';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Predpostavljena lokacija';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Datum zadnjega vpogleda';
|
||||
|
||||
@@ -3103,4 +3259,81 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Zadnjič videno';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Nastavitve stikov';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Avtomatsko odkrivanje';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle => 'Druge nastavitve v zvezi s stiki';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Avtomatsko dodaj uporabnike';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Dovoli spremljevalcu, da samodejno doda odkrite uporabnike.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Avtomatsko dodaj ponovitelje';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Dovoli spremljevalcu, da samodejno doda odkrite ponovitelje.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Avtomatsko dodaj strežnike sob';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Dovoli spremljevalcu, da samodejno doda odkrite strežnike sob.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Avtomatsko dodaj senzorje';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Dovoli spremljevalcu, da samodejno doda odkrite senzorje.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Prepiši najstarejše';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Ko je seznam stikov poln, bo najstarejši nestarševski stik zamenjan.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Odkriti stiki';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Ni ujemajočih stikov';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Najdeni stiki po iskanju';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Kontakt dodan';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Dodaj stik';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => 'Kopiraj stik v odložišče';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Izbriši stik';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Izbriši vse odkrite kontakte';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Ste prepričani, da želite izbrisati vse odkrite kontakte?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Radera';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Ta bort alla';
|
||||
|
||||
@override
|
||||
String get common_close => 'Stänga';
|
||||
|
||||
@@ -108,6 +111,133 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'Anslut via TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP-adress';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Port';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Ange slutpunkt och anslut';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Anslutning till $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'IP-adress krävs.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid => 'Porten måste vara mellan 1 och 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'TCP-transport fungerar inte på denna plattform.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'TCP-anslutningen har tidsut gått.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Fel vid TCP-anslutning: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Anslut via USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Välj en detekterad seriell enhet och anslut direkt till din MeshCore-nod.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Välj en USB-enhet';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'USB-seriell kommunikation är aktiv på stödda Android-enheter och på skrivbordsplattformar.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Inga USB-enheter hittades. Anslut en och uppdatera.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied => 'Tillgången via USB nekas.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing =>
|
||||
'Den valda USB-enheten är inte längre tillgänglig.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Välj en giltig USB-enhet.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'En annan förfrågan om USB-anslutning är redan pågående.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Ingen USB-enhet är ansluten.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed =>
|
||||
'Misslyckades med att öppna det valda USB-enheten.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Kunde inte ansluta till det valda USB-enheten.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'USB-seriell kommunikation stöds inte på denna plattform.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'En USB-anslutning är redan aktiv.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected => 'Ingen USB-enhet valdes.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'USB-anslutningen är inte aktiv.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'Anslutningen har tidsutgått. Se till att enheten har rätt USB-firmware.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName => 'Web-serieenhet';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Välj en USB-enhet';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Anslutning till USB-enhet...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Söker efter USB-enheter...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Fel vid USB-anslutning: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Söker efter enheter...';
|
||||
|
||||
@@ -149,6 +279,13 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Vänligen aktivera Bluetooth för att söka efter enheter.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Chrome-webbläsare krävs';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Denna webbapplikation kräver Google Chrome oder en Chromium-baserader webbläsare för Bluetooth-stöd.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Aktivera Bluetooth';
|
||||
|
||||
@@ -232,6 +369,13 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Längdgrad';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Kontaktinställningar';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Inställningar för hur kontakter läggs till.';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Privatläge';
|
||||
|
||||
@@ -1350,6 +1494,9 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Dela markeringen här';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Ange som min plats';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Fästetikett';
|
||||
|
||||
@@ -1410,6 +1557,16 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Visa delade markörer';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Visa upp de antagna nodernas placeringar';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Visa Discovery-kontakter';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Gissad plats';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Senaste Visats Tid';
|
||||
|
||||
@@ -3081,4 +3238,82 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Senast sedd';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Kontaktinställningar';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Automatisk upptäckt';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Andra inställningar relaterade till kontakt';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Lägg till användare automatiskt';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Tillåt kompanjonen att automatiskt lägga till upptäckta användare';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Lägg till upprepande enheter automatiskt';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Tillåt kompanjonen att automatiskt lägga till upptäckta repeater.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Lägg automatiskt till rumsservrar';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Tillåt kompanjonen att automatiskt lägga till upptäckta rumsservrar.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Lägg till sensorer automatiskt';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Tillåt kompanjonen att automatiskt lägga till upptäckta sensorer.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Skriv över äldst';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'När kontaktlistan är full ersätts den äldsta icke-favoriterade kontakten.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Upptäckta kontakter';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => 'Inga matchande kontakter';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Sök uppfunna kontakter';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Kontakt tillagd';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Lägg till kontakt';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => 'Kopiera kontakt till urklipp';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Ta bort kontakt';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Ta bort alla upptäckta kontakter';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Är du säker på att du vill ta bort alla upptäckta kontakter?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => 'Видалити';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => 'Видалити все';
|
||||
|
||||
@override
|
||||
String get common_close => 'Закрити';
|
||||
|
||||
@@ -108,6 +111,135 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => 'MeshCore Open';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => 'Bluetooth';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => 'З\'єднатися через протокол TCP';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP-адреса';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => 'Порт';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => 'Введіть кінцеву точку та підключіться';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return 'Підключення до $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => 'Необхідно вказати IP-адресу.';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid => 'Порт повинен бути в межах від 1 до 65535.';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported =>
|
||||
'Транспорт TCP не підтримується на цій платформі.';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut =>
|
||||
'З\'єднання TCP завершилося через закінчення часу очікування.';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'Не вдалося встановити з\'єднання TCP: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => 'Підключити через USB';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle =>
|
||||
'Виберіть виявлене серійне пристрій і підключіть його безпосередньо до вашого вузла MeshCore.';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => 'Виберіть пристрій USB';
|
||||
|
||||
@override
|
||||
String get usbScreenNote =>
|
||||
'USB-серіальний інтерфейс активний на підтримуваних пристроях на базі Android та на десктопних платформах.';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState =>
|
||||
'Не знайдено жодних пристроїв USB. Підключіть один і перезавантажте.';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied =>
|
||||
'Було відмовлено у наданні дозволу на використання USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing => 'Вибране USB-пристрій більше недоступне.';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => 'Виберіть дійсний USB-пристрій.';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy =>
|
||||
'Ще один запит на підключення через USB вже обробляється.';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => 'Немає підключених пристроїв USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed => 'Не вдалося відкрити вибране USB-пристрій.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed =>
|
||||
'Не вдалося підключитися до вибраного USB-пристрою.';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported =>
|
||||
'Підтримка USB-серіального інтерфейсу не реалізована на цій платформі.';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'USB-з\'єднання вже встановлено.';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected =>
|
||||
'Не було вибрано жодного пристрою USB.';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'З\'єднання USB не встановлено.';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut =>
|
||||
'З\'єднання не вдалося встановити. Переконайтеся, що пристрій має встановлене програмне забезпечення USB Companion.';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName =>
|
||||
'Пристрій для передачі даних по веб-серіалах';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => 'Виберіть пристрій USB';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => 'Підключення до USB-пристрою...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => 'Пошук пристроїв USB...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'Не вдалося встановити з\'єднання через USB: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => 'Пошук пристроїв...';
|
||||
|
||||
@@ -150,6 +282,13 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get scanner_bluetoothOffMessage =>
|
||||
'Будь ласка, увімкніть Bluetooth, щоб сканувати пристрої.';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => 'Потрібен браузер Chrome';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'Для підтримки Bluetooth у цьому веб-додатку потрібен Google Chrome або браузер на базі Chromium.';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => 'Увімкніть Bluetooth';
|
||||
|
||||
@@ -232,6 +371,13 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => 'Довгота';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => 'Налаштування контактів';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle =>
|
||||
'Налаштування для додавання контактів';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => 'Режим приватності';
|
||||
|
||||
@@ -1364,6 +1510,9 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => 'Поділитися маркером тут';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => 'Встановити моє місцезнаходження';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => 'Мітка піна';
|
||||
|
||||
@@ -1424,6 +1573,16 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => 'Показувати спільні маркери';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations =>
|
||||
'Показати місцезнаходження передбачених вузлів';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => 'Показати контакти Відкриття';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => 'Визначено місцезнаходження';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => 'Час останньої активності';
|
||||
|
||||
@@ -3130,4 +3289,84 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => 'Останній раз бачили';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => 'Налаштування контактів';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => 'Автоматичне виявлення';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle =>
|
||||
'Інші налаштування, пов\'язані з контактами';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle =>
|
||||
'Автоматично додавати користувачів';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle =>
|
||||
'Дозволити супутникові автоматично додавати виявлених користувачів';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle =>
|
||||
'Автоматично додавати повторювачі';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle =>
|
||||
'Дозволити супутнику автоматично додавати виявлені ретранслятори';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle =>
|
||||
'Автоматично додавати сервери кімнат';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle =>
|
||||
'Дозволити супровіднику автоматично додавати виявлені сервери кімнат.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle =>
|
||||
'Автоматично додавати датчики';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle =>
|
||||
'Дозволити супровіднику автоматично додавати виявлені сенсори';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => 'Перезаписати найстаріше';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Коли список контактів заповнений, найстарший контакт без позначки улюбленого буде замінений.';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => 'Виявлені контакти';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching =>
|
||||
'Відповідних контактів не знайдено';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => 'Знайти виявлені контакти';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => 'Контакт додано';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => 'Додати контакт';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact =>
|
||||
'Копіювати контакт у буфер обміну';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => 'Видалити контакт';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll =>
|
||||
'Видалити всі виявлені контакти';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent =>
|
||||
'Ви впевнені, що хочете видалити всі виявлені контакти?';
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get common_delete => '删除';
|
||||
|
||||
@override
|
||||
String get common_deleteAll => '删除全部';
|
||||
|
||||
@override
|
||||
String get common_close => '关闭';
|
||||
|
||||
@@ -108,6 +111,123 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_title => '连接设备';
|
||||
|
||||
@override
|
||||
String get connectionChoiceUsbLabel => 'USB';
|
||||
|
||||
@override
|
||||
String get connectionChoiceBluetoothLabel => '蓝牙';
|
||||
|
||||
@override
|
||||
String get connectionChoiceTcpLabel => 'TCP';
|
||||
|
||||
@override
|
||||
String get tcpScreenTitle => '通过 TCP 连接';
|
||||
|
||||
@override
|
||||
String get tcpHostLabel => 'IP地址';
|
||||
|
||||
@override
|
||||
String get tcpHostHint => '192.168.40.10';
|
||||
|
||||
@override
|
||||
String get tcpPortLabel => '端口';
|
||||
|
||||
@override
|
||||
String get tcpPortHint => '5000';
|
||||
|
||||
@override
|
||||
String get tcpStatus_notConnected => '输入目标地址,然后连接';
|
||||
|
||||
@override
|
||||
String tcpStatus_connectingTo(String endpoint) {
|
||||
return '连接到 $endpoint...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tcpErrorHostRequired => '需要提供IP地址。';
|
||||
|
||||
@override
|
||||
String get tcpErrorPortInvalid => '端口号必须在 1 到 65535 之间。';
|
||||
|
||||
@override
|
||||
String get tcpErrorUnsupported => '此平台不支持 TCP 传输。';
|
||||
|
||||
@override
|
||||
String get tcpErrorTimedOut => 'TCP 连接超时。';
|
||||
|
||||
@override
|
||||
String tcpConnectionFailed(String error) {
|
||||
return 'TCP 连接失败:$error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usbScreenTitle => '通过USB连接';
|
||||
|
||||
@override
|
||||
String get usbScreenSubtitle => '选择已检测到的串行设备,并直接连接到您的 MeshCore 节点。';
|
||||
|
||||
@override
|
||||
String get usbScreenStatus => '选择一个 USB 设备';
|
||||
|
||||
@override
|
||||
String get usbScreenNote => 'USB 串行接口在支持的 Android 设备和桌面平台上处于活动状态。';
|
||||
|
||||
@override
|
||||
String get usbScreenEmptyState => '未找到任何 USB 设备。请插入一个,然后刷新。';
|
||||
|
||||
@override
|
||||
String get usbErrorPermissionDenied => '拒绝了USB权限。';
|
||||
|
||||
@override
|
||||
String get usbErrorDeviceMissing => '所选的USB设备已不再可用。';
|
||||
|
||||
@override
|
||||
String get usbErrorInvalidPort => '选择一个有效的USB设备。';
|
||||
|
||||
@override
|
||||
String get usbErrorBusy => '还有一个 USB 连接请求正在进行中。';
|
||||
|
||||
@override
|
||||
String get usbErrorNotConnected => '没有连接任何USB设备。';
|
||||
|
||||
@override
|
||||
String get usbErrorOpenFailed => '未能打开所选的USB设备。';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectFailed => '未能连接到所选的USB设备。';
|
||||
|
||||
@override
|
||||
String get usbErrorUnsupported => '此平台不支持USB串行通信。';
|
||||
|
||||
@override
|
||||
String get usbErrorAlreadyActive => 'USB 连接已建立。';
|
||||
|
||||
@override
|
||||
String get usbErrorNoDeviceSelected => '未选择任何 USB 设备。';
|
||||
|
||||
@override
|
||||
String get usbErrorPortClosed => 'USB 连接未建立。';
|
||||
|
||||
@override
|
||||
String get usbErrorConnectTimedOut => '连接超时。请确保设备已安装 USB 伴侣固件。';
|
||||
|
||||
@override
|
||||
String get usbFallbackDeviceName => 'Web 串流设备';
|
||||
|
||||
@override
|
||||
String get usbStatus_notConnected => '选择一个 USB 设备';
|
||||
|
||||
@override
|
||||
String get usbStatus_connecting => '连接USB设备...';
|
||||
|
||||
@override
|
||||
String get usbStatus_searching => '正在搜索 USB 设备...';
|
||||
|
||||
@override
|
||||
String usbConnectionFailed(String error) {
|
||||
return 'USB 连接失败:$error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get scanner_scanning => '正在搜索设备...';
|
||||
|
||||
@@ -148,6 +268,13 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get scanner_bluetoothOffMessage => '请开启蓝牙以搜索设备';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequired => '需要 Chrome 浏览器';
|
||||
|
||||
@override
|
||||
String get scanner_chromeRequiredMessage =>
|
||||
'此 Web 应用程序需要 Google Chrome 或基于 Chromium 的浏览器以支持蓝牙。';
|
||||
|
||||
@override
|
||||
String get scanner_enableBluetooth => '启用蓝牙';
|
||||
|
||||
@@ -226,6 +353,12 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get settings_longitude => '经度';
|
||||
|
||||
@override
|
||||
String get settings_contactSettings => '联系人设置';
|
||||
|
||||
@override
|
||||
String get settings_contactSettingsSubtitle => '添加联系人的设置';
|
||||
|
||||
@override
|
||||
String get settings_privacyMode => '隐私模式';
|
||||
|
||||
@@ -1288,6 +1421,9 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get map_shareMarkerHere => '在此分享标记';
|
||||
|
||||
@override
|
||||
String get map_setAsMyLocation => '设置为我的位置';
|
||||
|
||||
@override
|
||||
String get map_pinLabel => '标签';
|
||||
|
||||
@@ -1347,6 +1483,15 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get map_showSharedMarkers => '显示共享标记';
|
||||
|
||||
@override
|
||||
String get map_showGuessedLocations => '显示猜测的节点位置';
|
||||
|
||||
@override
|
||||
String get map_showDiscoveryContacts => '显示发现联系人';
|
||||
|
||||
@override
|
||||
String get map_guessedLocation => '猜测的位置';
|
||||
|
||||
@override
|
||||
String get map_lastSeenTime => '最后在线时间';
|
||||
|
||||
@@ -2890,4 +3035,71 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get snrIndicator_lastSeen => '最近访问';
|
||||
|
||||
@override
|
||||
String get contactsSettings_title => '联系人设置';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddTitle => '自动发现';
|
||||
|
||||
@override
|
||||
String get contactsSettings_otherTitle => '其他联系人相关设置';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersTitle => '自动添加用户';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddUsersSubtitle => '允许伴侣自动添加发现的用户';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersTitle => '自动添加重复器';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRepeatersSubtitle => '允许伴侣自动添加发现的重复器';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersTitle => '自动添加房间服务器';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddRoomServersSubtitle => '允许伴侣自动添加发现的房间服务器';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsTitle => '自动添加传感器';
|
||||
|
||||
@override
|
||||
String get contactsSettings_autoAddSensorsSubtitle => '允许伴侣自动添加发现的传感器';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestTitle => '覆盖最旧的';
|
||||
|
||||
@override
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'当联系人列表已满时,将替换最老的非收藏联系人。';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_Title => '已发现的联系人';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_noMatching => '没有匹配的联系人';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_searchHint => '搜索已发现的联系人';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_contactAdded => '联系人已添加';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_addContact => '添加联系人';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_copyContact => '复制联系人到剪贴板';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContact => '删除联系人';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAll => '删除所有发现的联系人';
|
||||
|
||||
@override
|
||||
String get discoveredContacts_deleteContactAllContent => '您确定要删除所有发现的联系人吗?';
|
||||
}
|
||||
|
||||
+90
-1
@@ -1605,6 +1605,8 @@
|
||||
"map_runTrace": "Padeshulp traceren",
|
||||
"scanner_enableBluetooth": "Activeer Bluetooth",
|
||||
"scanner_bluetoothOffMessage": "Zorg ervoor dat Bluetooth is ingeschakeld om naar apparaten te zoeken.",
|
||||
"scanner_chromeRequired": "Chrome-browser vereist",
|
||||
"scanner_chromeRequiredMessage": "Deze webapplicatie vereist Google Chrome of een op Chromium gebaseerde browser voor Bluetooth-ondersteuning.",
|
||||
"scanner_bluetoothOff": "Bluetooth is uitgeschakeld",
|
||||
"snrIndicator_lastSeen": "Laatst gezien",
|
||||
"snrIndicator_nearByRepeaters": "Nabije herhalingseenheden",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchContactsNoNumber": "Zoek contacten...",
|
||||
"contacts_searchUsers": "Zoek {number}{str} gebruikers...",
|
||||
"contacts_searchFavorites": "Zoek {number}{str} favorieten...",
|
||||
"contacts_searchRoomServers": "Zoek {number}{str} Room servers..."
|
||||
"contacts_searchRoomServers": "Zoek {number}{str} Room servers...",
|
||||
"contactsSettings_autoAddUsersTitle": "Gebruikers automatisch toevoegen",
|
||||
"contactsSettings_title": "Instellingen voor contacten",
|
||||
"settings_contactSettings": "Contactinstellingen",
|
||||
"contactsSettings_otherTitle": "Andere instellingen voor contactgerelateerde zaken",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Sta toe dat de companion automatisch ontdekte repeaters toevoegt",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Automatisch kamerservers toevoegen",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Sta toe dat de companion automatisch ontdekte kamer servers toevoegt.",
|
||||
"contactsSettings_autoAddSensorsTitle": "Automatisch sensoren toevoegen",
|
||||
"settings_contactSettingsSubtitle": "Instellingen voor het toevoegen van contacten",
|
||||
"contactsSettings_autoAddTitle": "Automatische detectie",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Sta toe dat de companion automatisch ontdekte sensoren toevoegt",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Sta toe dat de companion automatisch ontdekte gebruikers toevoegt",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Automatisch herhalingstoestellen toevoegen",
|
||||
"contactsSettings_overwriteOldestTitle": "Overschrijf Oudste",
|
||||
"discoveredContacts_noMatching": "Geen overeenkomende contacten",
|
||||
"discoveredContacts_addContact": "Contact toevoegen",
|
||||
"discoveredContacts_copyContact": "Kopieer contact naar klembord",
|
||||
"discoveredContacts_deleteContact": "Contact verwijderen",
|
||||
"discoveredContacts_Title": "Ontdekte contacten",
|
||||
"discoveredContacts_contactAdded": "Contact toegevoegd",
|
||||
"discoveredContacts_searchHint": "Ontdekte contacten zoeken",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Wanneer de contactenlijst vol is, wordt de oudste niet-favoriete contactpersoon vervangen.",
|
||||
"common_deleteAll": "Alles verwijderen",
|
||||
"discoveredContacts_deleteContactAll": "Verwijder alle ontdekte contacten",
|
||||
"discoveredContacts_deleteContactAllContent": "Weet u zeker dat u alle ontdekte contacten wilt verwijderen?",
|
||||
"map_guessedLocation": "Geroerde locatie",
|
||||
"map_showGuessedLocations": "Toon de voorspelde locaties van de knopen",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenSubtitle": "Selecteer een gedetecteerd seriële apparaat en verbind deze direct met uw MeshCore-node.",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenTitle": "Verbind via USB",
|
||||
"usbScreenStatus": "Selecteer een USB-apparaat",
|
||||
"usbScreenNote": "USB-serieel is actief op ondersteunde Android-apparaten en desktop-platforms.",
|
||||
"usbScreenEmptyState": "Geen USB-apparaten gevonden. Sluit er een aan en herlaad.",
|
||||
"usbErrorPermissionDenied": "Toegang via USB is geweigerd.",
|
||||
"usbErrorDeviceMissing": "Het geselecteerde USB-apparaat is niet meer beschikbaar.",
|
||||
"usbErrorInvalidPort": "Selecteer een geldig USB-apparaat.",
|
||||
"usbErrorBusy": "Een andere verzoek om een USB-verbinding is al in behandeling.",
|
||||
"usbErrorNotConnected": "Er is geen USB-apparaat aangesloten.",
|
||||
"usbErrorOpenFailed": "Kon het geselecteerde USB-apparaat niet openen.",
|
||||
"usbErrorConnectFailed": "Kon niet verbinding maken met het geselecteerde USB-apparaat.",
|
||||
"usbErrorUnsupported": "USB-serieel is niet ondersteund op deze platform.",
|
||||
"usbErrorAlreadyActive": "Een USB-verbinding is al actief.",
|
||||
"usbErrorNoDeviceSelected": "Geen USB-apparaat is geselecteerd.",
|
||||
"usbErrorPortClosed": "De USB-verbinding is niet actief.",
|
||||
"usbFallbackDeviceName": "Web-serieapparaat",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbConnectionFailed": "Fout bij de USB-verbinding: {error}",
|
||||
"usbStatus_notConnected": "Selecteer een USB-apparaat",
|
||||
"usbStatus_connecting": "Verbinding maken met USB-apparaat...",
|
||||
"usbStatus_searching": "Zoeken naar USB-apparaten...",
|
||||
"usbErrorConnectTimedOut": "Verbinding is verbroken. Zorg ervoor dat het apparaat de juiste USB-firmware heeft.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpScreenTitle": "Verbind via TCP",
|
||||
"tcpHostLabel": "IP-adres",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpPortLabel": "Poort",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Voer het eindpunt in en verbind",
|
||||
"tcpStatus_connectingTo": "Verbinding maken met {endpoint}...",
|
||||
"tcpErrorHostRequired": "Een IP-adres is vereist.",
|
||||
"tcpErrorPortInvalid": "De poortwaarde moet tussen 1 en 65535 liggen.",
|
||||
"tcpErrorUnsupported": "TCP-transport wordt niet ondersteund op deze platform.",
|
||||
"tcpErrorTimedOut": "De TCP-verbinding is verlopen.",
|
||||
"tcpConnectionFailed": "Verbinding met TCP mislukt: {error}",
|
||||
"map_showDiscoveryContacts": "Ontdek contacten weergeven",
|
||||
"map_setAsMyLocation": "Stel dit in als mijn locatie"
|
||||
}
|
||||
|
||||
+90
-1
@@ -1604,6 +1604,8 @@
|
||||
"map_removeLast": "Usuń ostatni",
|
||||
"map_tapToAdd": "Kliknij na węzły, aby dodać je do ścieżki.",
|
||||
"scanner_bluetoothOffMessage": "Prosimy włączyć Bluetooth, aby przeskanować urządzenia.",
|
||||
"scanner_chromeRequired": "Wymagana przeglądarka Chrome",
|
||||
"scanner_chromeRequiredMessage": "Ta aplikacja internetowa wymaga przeglądarki Google Chrome lub opartej na Chromium do obsługi Bluetooth.",
|
||||
"scanner_bluetoothOff": "Bluetooth jest wyłączony",
|
||||
"scanner_enableBluetooth": "Włącz Bluetooth",
|
||||
"snrIndicator_lastSeen": "Ostatnio widziany",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchFavorites": "Wyszukaj {number}{str} ulubione...",
|
||||
"contacts_searchRoomServers": "Wyszukaj {number}{str} serwerów Room...",
|
||||
"contacts_searchUsers": "Wyszukaj {number}{str} Użytkowników...",
|
||||
"contacts_searchRepeaters": "Wyszukaj {number}{str} powtórników..."
|
||||
"contacts_searchRepeaters": "Wyszukaj {number}{str} powtórników...",
|
||||
"contactsSettings_title": "Ustawienia kontaktów",
|
||||
"settings_contactSettingsSubtitle": "Ustawienia dotyczące sposobu dodawania kontaktów",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Pozwól towarzyszowi automatycznie dodawać znalezione użytkowników.",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Automatyczne dodawanie powtarzalników",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Zezwól na automatyczne dodawanie odkrytych repeaterów przez towarzysza.",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Automatycznie dodaj serwery pokojowe",
|
||||
"contactsSettings_autoAddUsersTitle": "Automatycznie dodaj użytkowników",
|
||||
"settings_contactSettings": "Ustawienia kontaktowe",
|
||||
"contactsSettings_otherTitle": "Inne ustawienia związane z kontaktami",
|
||||
"contactsSettings_autoAddTitle": "Automatyczne odnajdywanie",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Zezwól towarzyszowi na automatyczne dodawanie znalezionych serwerów pokojowych.",
|
||||
"contactsSettings_autoAddSensorsTitle": "Automatycznie dodaj czujniki",
|
||||
"discoveredContacts_searchHint": "Wyszukaj odkryte kontakty",
|
||||
"discoveredContacts_contactAdded": "Kontakt dodany",
|
||||
"discoveredContacts_addContact": "Dodaj kontakt",
|
||||
"discoveredContacts_copyContact": "Kopiuj kontakt do schowka",
|
||||
"contactsSettings_overwriteOldestTitle": "Nadpisz najstarszy",
|
||||
"discoveredContacts_Title": "Odkryte Kontakty",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Zezwól towarzyszowi na automatyczne dodawanie wykrytych czujników.",
|
||||
"discoveredContacts_noMatching": "Brak pasujących kontaktów",
|
||||
"discoveredContacts_deleteContact": "Usuń kontakt",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Gdy lista kontaktów jest pełna, najstarszy nieulubiony kontakt zostanie zastąpiony.",
|
||||
"common_deleteAll": "Usuń wszystko",
|
||||
"discoveredContacts_deleteContactAllContent": "Czy na pewno chcesz usunąć wszystkie znalezione kontakty?",
|
||||
"discoveredContacts_deleteContactAll": "Usuń wszystkie odkryte kontakty",
|
||||
"map_guessedLocation": "Wydana lokalizacja",
|
||||
"map_showGuessedLocations": "Wyświetl lokalizacje zgadanych węzłów",
|
||||
"usbScreenSubtitle": "Wybierz wykryty urządzenie szeregowe i podłącz je bezpośrednio do swojego węzła MeshCore.",
|
||||
"usbScreenTitle": "Połącz przez USB",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenStatus": "Wybierz urządzenie USB",
|
||||
"usbScreenNote": "Port szeregowy USB jest aktywny na urządzeniach z systemem Android i platformach stacjonarnych, które go obsługują.",
|
||||
"usbScreenEmptyState": "Nie znaleziono żadnych urządzeń USB. Podłącz jedno i zaktualizuj.",
|
||||
"usbErrorPermissionDenied": "Zostało odrzucone żądanie dostępu przez USB.",
|
||||
"usbErrorDeviceMissing": "Wybór urządzenia USB już nie jest dostępny.",
|
||||
"usbErrorInvalidPort": "Wybierz prawidłowe urządzenie USB.",
|
||||
"usbErrorBusy": "Kolejne żądanie połączenia przez USB jest już w trakcie realizacji.",
|
||||
"usbErrorNotConnected": "Brak podłączonego urządzenia USB.",
|
||||
"usbErrorOpenFailed": "Nie udało się otworzyć wybranego urządzenia USB.",
|
||||
"usbErrorConnectFailed": "Nie udało się połączyć z wybranym urządzeniem USB.",
|
||||
"usbErrorUnsupported": "Port szeregowy USB nie jest obsługiwany na tym urządzeniu.",
|
||||
"usbErrorAlreadyActive": "Połączenie USB jest już aktywne.",
|
||||
"usbErrorNoDeviceSelected": "Nie został wybrany żaden urządzenie USB.",
|
||||
"usbErrorPortClosed": "Połączenie USB nie jest aktywne.",
|
||||
"usbFallbackDeviceName": "Urządzenie do komunikacji przez sieć (seria)",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_searching": "Wyszukiwanie urządzeń USB...",
|
||||
"usbStatus_connecting": "Połączenie z urządzeniem USB...",
|
||||
"usbStatus_notConnected": "Wybierz urządzenie USB",
|
||||
"usbConnectionFailed": "Błąd połączenia USB: {error}",
|
||||
"usbErrorConnectTimedOut": "Połączenie nie zostało nawiązane. Upewnij się, że urządzenie posiada oprogramowanie \"USB Companion\".",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpScreenTitle": "Połącz się za pomocą protokołu TCP",
|
||||
"tcpHostLabel": "Adres IP",
|
||||
"tcpPortLabel": "Port",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Wprowadź adres URL i połącz",
|
||||
"tcpStatus_connectingTo": "Połączenie z {endpoint}...",
|
||||
"tcpErrorHostRequired": "Wymagana jest adresa IP.",
|
||||
"tcpErrorPortInvalid": "Numer portu musi mieścić się w zakresie od 1 do 65535.",
|
||||
"tcpErrorUnsupported": "Transport protokoł TCP nie jest obsługiwany na tym urządzeniu.",
|
||||
"tcpErrorTimedOut": "Połączenie TCP zakończyło się bez powodzenia.",
|
||||
"tcpConnectionFailed": "Błąd połączenia TCP: {error}",
|
||||
"map_showDiscoveryContacts": "Pokaż kontakty odkrywania",
|
||||
"map_setAsMyLocation": "Ustaw jako moje lokalizację"
|
||||
}
|
||||
|
||||
+90
-1
@@ -1606,6 +1606,8 @@
|
||||
"scanner_enableBluetooth": "Ative o Bluetooth",
|
||||
"scanner_bluetoothOff": "Bluetooth está desativado",
|
||||
"scanner_bluetoothOffMessage": "Por favor, ative o Bluetooth para escanear por dispositivos.",
|
||||
"scanner_chromeRequired": "Navegador Chrome necessário",
|
||||
"scanner_chromeRequiredMessage": "Esta aplicação web requer o Google Chrome ou um navegador baseado no Chromium para suporte de Bluetooth.",
|
||||
"snrIndicator_nearByRepeaters": "Repetidores Próximos",
|
||||
"snrIndicator_lastSeen": "Visto pela última vez",
|
||||
"chat_ShowAllPaths": "Mostrar todos os caminhos",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchUsers": "Pesquisar {number}{str} Usuários...",
|
||||
"contacts_searchContactsNoNumber": "Pesquisar Contatos...",
|
||||
"contacts_unread": "Não lido",
|
||||
"contacts_searchRoomServers": "Pesquisar {number}{str} servidores de sala..."
|
||||
"contacts_searchRoomServers": "Pesquisar {number}{str} servidores de sala...",
|
||||
"settings_contactSettings": "Configurações de Contato",
|
||||
"contactsSettings_otherTitle": "Outras configurações relacionadas a contatos",
|
||||
"contactsSettings_title": "Configurações de contatos",
|
||||
"contactsSettings_autoAddTitle": "Descoberta Automática",
|
||||
"settings_contactSettingsSubtitle": "Configurações para como os contatos são adicionados",
|
||||
"contactsSettings_autoAddUsersTitle": "Adicionar usuários automaticamente",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Permitir que o companheiro adicione automaticamente os repetidores descobertos.",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Adicionar automaticamente servidores de sala",
|
||||
"contactsSettings_overwriteOldestTitle": "Sobrescrever o Mais Antigo",
|
||||
"contactsSettings_autoAddSensorsTitle": "Adicionar sensores automaticamente",
|
||||
"discoveredContacts_Title": "Contatos Descobertos",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Permitir que o companheiro adicione automaticamente os usuários descobertos.",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Adicionar repetidores automaticamente",
|
||||
"discoveredContacts_noMatching": "Nenhum contato correspondente",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Permitir que o companheiro adicione automaticamente os servidores de salas descobertos.",
|
||||
"discoveredContacts_searchHint": "Pesquisar contatos descobertos",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Permitir que o companheiro adicione automaticamente sensores descobertos.",
|
||||
"discoveredContacts_copyContact": "Copiar Contato para a área de transferência",
|
||||
"discoveredContacts_deleteContact": "Excluir Contato",
|
||||
"discoveredContacts_contactAdded": "Contato adicionado",
|
||||
"discoveredContacts_addContact": "Adicionar Contato",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Quando a lista de contatos estiver cheia, o contato mais antigo não favoritado será substituído.",
|
||||
"common_deleteAll": "Excluir Tudo",
|
||||
"discoveredContacts_deleteContactAll": "Excluir Todos os Contatos Descobertos",
|
||||
"discoveredContacts_deleteContactAllContent": "Tem certeza de que deseja excluir todos os contatos descobertos?",
|
||||
"map_guessedLocation": "Localização estimada",
|
||||
"map_showGuessedLocations": "Mostrar as localizações dos nós estimados",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenTitle": "Conecte via USB",
|
||||
"usbScreenSubtitle": "Selecione um dispositivo serial detectado e conecte-o diretamente ao seu nó MeshCore.",
|
||||
"usbScreenStatus": "Selecione um dispositivo USB",
|
||||
"usbScreenNote": "A comunicação serial via USB está ativa em dispositivos Android e plataformas de desktop compatíveis.",
|
||||
"usbScreenEmptyState": "Nenhum dispositivo USB encontrado. Conecte um e atualize.",
|
||||
"usbErrorPermissionDenied": "A permissão para acesso via USB foi negada.",
|
||||
"usbErrorDeviceMissing": "O dispositivo USB selecionado não está mais disponível.",
|
||||
"usbErrorInvalidPort": "Selecione um dispositivo USB válido.",
|
||||
"usbErrorBusy": "Já existe uma solicitação de conexão USB em andamento.",
|
||||
"usbErrorNotConnected": "Não há nenhum dispositivo USB conectado.",
|
||||
"usbErrorOpenFailed": "Não foi possível abrir o dispositivo USB selecionado.",
|
||||
"usbErrorConnectFailed": "Não foi possível conectar ao dispositivo USB selecionado.",
|
||||
"usbErrorUnsupported": "A comunicação serial via USB não é suportada nesta plataforma.",
|
||||
"usbErrorAlreadyActive": "A conexão USB já está ativa.",
|
||||
"usbErrorNoDeviceSelected": "Nenhum dispositivo USB foi selecionado.",
|
||||
"usbErrorPortClosed": "A conexão USB não está ativa.",
|
||||
"usbFallbackDeviceName": "Dispositivo de Serial para a Web",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_searching": "Procurando por dispositivos USB...",
|
||||
"usbStatus_notConnected": "Selecione um dispositivo USB",
|
||||
"usbConnectionFailed": "Falha na conexão USB: {error}",
|
||||
"usbStatus_connecting": "Conectando ao dispositivo USB...",
|
||||
"usbErrorConnectTimedOut": "A conexão expirou. Verifique se o dispositivo possui o firmware USB Companion.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostLabel": "Endereço IP",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpScreenTitle": "Estabelecer conexão via TCP",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpPortLabel": "Porta",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Insira o endereço final e conecte-se.",
|
||||
"tcpStatus_connectingTo": "Conectando a {endpoint}...",
|
||||
"tcpErrorHostRequired": "É necessário fornecer um endereço IP.",
|
||||
"tcpErrorPortInvalid": "O valor do porto deve estar entre 1 e 65535.",
|
||||
"tcpErrorUnsupported": "O protocolo TCP não é suportado nesta plataforma.",
|
||||
"tcpErrorTimedOut": "A conexão TCP expirou.",
|
||||
"tcpConnectionFailed": "Falha na conexão TCP: {error}",
|
||||
"map_showDiscoveryContacts": "Mostrar Contatos de Descoberta",
|
||||
"map_setAsMyLocation": "Defina minha localização"
|
||||
}
|
||||
|
||||
+90
-1
@@ -846,6 +846,8 @@
|
||||
"scanner_enableBluetooth": "Включите Bluetooth",
|
||||
"scanner_bluetoothOff": "Bluetooth выключен",
|
||||
"scanner_bluetoothOffMessage": "Пожалуйста, включите Bluetooth, чтобы найти устройства.",
|
||||
"scanner_chromeRequired": "Требуется браузер Chrome",
|
||||
"scanner_chromeRequiredMessage": "Для поддержки Bluetooth в этом веб-приложении требуется Google Chrome или браузер на базе Chromium.",
|
||||
"snrIndicator_nearByRepeaters": "Ближайшие ретрансляторы",
|
||||
"snrIndicator_lastSeen": "Последний раз видели",
|
||||
"chat_ShowAllPaths": "Показать все пути",
|
||||
@@ -1039,5 +1041,92 @@
|
||||
"contacts_unread": "Непрочитанное",
|
||||
"contacts_searchRoomServers": "Поиск {number}{str} серверов комнат...",
|
||||
"contacts_searchFavorites": "Поиск {number}{str} избранного...",
|
||||
"contacts_searchUsers": "Поиск {number}{str} пользователей..."
|
||||
"contacts_searchUsers": "Поиск {number}{str} пользователей...",
|
||||
"settings_contactSettings": "Настройки контактов",
|
||||
"settings_contactSettingsSubtitle": "Настройки добавления контактов",
|
||||
"contactsSettings_autoAddTitle": "Автоматическое обнаружение",
|
||||
"contactsSettings_title": "Настройки контактов",
|
||||
"contactsSettings_otherTitle": "Другие настройки, связанные с контактами",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Разрешить компаньону автоматически добавлять обнаруженных пользователей",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Автоматически добавлять серверы комнат",
|
||||
"contactsSettings_autoAddSensorsTitle": "Автоматически добавлять датчики",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Разрешить компаньону автоматически добавлять обнаруженные датчики",
|
||||
"contactsSettings_autoAddUsersTitle": "Автоматически добавлять пользователей",
|
||||
"contactsSettings_overwriteOldestTitle": "Перезаписать самое старое",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Автоматически добавлять ретрансляторы",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Разрешить спутнику автоматически добавлять обнаруженные ретрансляторы",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Разрешить компаньону автоматически добавлять обнаруженные сервера комнат.",
|
||||
"discoveredContacts_noMatching": "Нет совпадающих контактов",
|
||||
"discoveredContacts_searchHint": "Найденные контакты поиска",
|
||||
"discoveredContacts_contactAdded": "Контакт добавлен",
|
||||
"discoveredContacts_copyContact": "Копировать контакт в буфер обмена",
|
||||
"discoveredContacts_addContact": "Добавить контакт",
|
||||
"discoveredContacts_Title": "Обнаруженные контакты",
|
||||
"discoveredContacts_deleteContact": "Удалить контакт",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Когда список контактов заполнен, будет заменен самый старый контакт, который не находится в избранном.",
|
||||
"common_deleteAll": "Удалить все",
|
||||
"discoveredContacts_deleteContactAllContent": "Вы уверены, что хотите удалить все обнаруженные контакты?",
|
||||
"discoveredContacts_deleteContactAll": "Удалить Все Обнаруженные Контакты",
|
||||
"map_guessedLocation": "Угаданное место",
|
||||
"map_showGuessedLocations": "Отобразить предполагаемые места расположения узлов",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenSubtitle": "Выберите обнаруженное устройство с последовательным интерфейсом и подключите его напрямую к вашему узлу MeshCore.",
|
||||
"usbScreenTitle": "Подключение через USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenStatus": "Выберите USB-устройство",
|
||||
"usbScreenNote": "USB-серийный порт активен на поддерживаемых устройствах Android и на настольных платформах.",
|
||||
"usbScreenEmptyState": "Не обнаружено устройств USB. Подключите одно из них и обновите список.",
|
||||
"usbErrorPermissionDenied": "Запрос на доступ через USB был отклонен.",
|
||||
"usbErrorDeviceMissing": "Выбранное USB-устройство больше недоступно.",
|
||||
"usbErrorInvalidPort": "Выберите действительное USB-устройство.",
|
||||
"usbErrorBusy": "Еще одно запрошенное соединение через USB уже находится в процессе.",
|
||||
"usbErrorNotConnected": "Ни одно USB-устройство не подключено.",
|
||||
"usbErrorOpenFailed": "Не удалось открыть выбранное USB-устройство.",
|
||||
"usbErrorConnectFailed": "Не удалось установить соединение с выбранным USB-устройством.",
|
||||
"usbErrorUnsupported": "Поддержка последовательного USB отсутствует на данной платформе.",
|
||||
"usbErrorAlreadyActive": "USB-соединение уже установлено.",
|
||||
"usbErrorNoDeviceSelected": "Не было выбрано ни одно устройство USB.",
|
||||
"usbErrorPortClosed": "USB-соединение не установлено.",
|
||||
"usbFallbackDeviceName": "Устройство для последовательного подключения к сети",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_searching": "Поиск USB-устройств...",
|
||||
"usbStatus_connecting": "Подключение к USB-устройству...",
|
||||
"usbConnectionFailed": "Не удалось установить соединение через USB: {error}",
|
||||
"usbStatus_notConnected": "Выберите USB-устройство",
|
||||
"usbErrorConnectTimedOut": "Соединение не установлено. Убедитесь, что устройство имеет установленное программное обеспечение USB Companion.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpHostLabel": "IP-адрес",
|
||||
"tcpScreenTitle": "Установить соединение по протоколу TCP",
|
||||
"tcpPortLabel": "Порт",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Введите адрес и подключитесь.",
|
||||
"tcpStatus_connectingTo": "Подключение к {endpoint}...",
|
||||
"tcpErrorHostRequired": "Необходимо указать IP-адрес.",
|
||||
"tcpErrorPortInvalid": "Порт должен находиться в диапазоне от 1 до 65535.",
|
||||
"tcpErrorUnsupported": "Протокол TCP не поддерживается на этой платформе.",
|
||||
"tcpErrorTimedOut": "Соединение TCP не удалось установить.",
|
||||
"tcpConnectionFailed": "Не удалось установить соединение TCP: {error}",
|
||||
"map_showDiscoveryContacts": "Показать контакты Discovery",
|
||||
"map_setAsMyLocation": "Установить мое местоположение"
|
||||
}
|
||||
|
||||
+90
-1
@@ -1604,6 +1604,8 @@
|
||||
"map_runTrace": "Spustiť trasovaním cesty",
|
||||
"map_pathTraceCancelled": "Zrušenie stopáže cesty bolo zrušené.",
|
||||
"scanner_bluetoothOffMessage": "Prosím, zapnite Bluetooth, aby ste mohli skenovať pre zariadenia.",
|
||||
"scanner_chromeRequired": "Vyžaduje sa prehliadač Chrome",
|
||||
"scanner_chromeRequiredMessage": "Táto webová aplikácia vyžaduje Google Chrome alebo prehliadač založený na Chromium pre podporu Bluetooth.",
|
||||
"scanner_bluetoothOff": "Bluetooth je vypnutý",
|
||||
"scanner_enableBluetooth": "Povolte Bluetooth",
|
||||
"snrIndicator_lastSeen": "Naposledy videný",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchRepeaters": "Hľadať {number}{str} opakovače...",
|
||||
"contacts_searchUsers": "Hľadať {number}{str} používateľov...",
|
||||
"contacts_searchContactsNoNumber": "Hľadať kontakty...",
|
||||
"contacts_unread": "Neprečítané"
|
||||
"contacts_unread": "Neprečítané",
|
||||
"settings_contactSettingsSubtitle": "Nastavenia pre pridávanie kontaktov.",
|
||||
"contactsSettings_autoAddUsersTitle": "Automaticky pridávať užívateľov",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Povoliť spoločníkovi automaticky pridávať objavených užívateľov.",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Automaticky pridávať opakovače",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Automaticky pridávať server miestnosti",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Povoliť spoločníkovi automaticky pridať objavené serverové miestnosti.",
|
||||
"contactsSettings_autoAddTitle": "Automatické zisťovanie",
|
||||
"contactsSettings_title": "Nastavenia kontaktov",
|
||||
"contactsSettings_otherTitle": "Ďalšie nastavenia súvisiace s kontaktami",
|
||||
"settings_contactSettings": "Nastavenia kontaktov",
|
||||
"contactsSettings_autoAddSensorsTitle": "Automaticky pridávať senzory",
|
||||
"discoveredContacts_noMatching": "Žiadne zhodné kontakty",
|
||||
"discoveredContacts_searchHint": "Vyhľadať objavené kontakty",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Povoliť spoločníkovi automaticky pridávať objavené repeater.",
|
||||
"discoveredContacts_contactAdded": "Kontakt bol pridaný",
|
||||
"discoveredContacts_copyContact": "Kopírovať kontakt do schránky",
|
||||
"discoveredContacts_deleteContact": "Zmazať kontakt",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Povoliť spoločníkovi automaticky pridávať objavené senzory.",
|
||||
"discoveredContacts_Title": "Objavené kontakty",
|
||||
"contactsSettings_overwriteOldestTitle": "Prepísať najstaršie",
|
||||
"discoveredContacts_addContact": "Pridať kontakt",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Keď je zoznam kontaktov plný, bude nahradený najstarší neoznačený kontakt.",
|
||||
"discoveredContacts_deleteContactAll": "Zmazať všetky objavené kontakty",
|
||||
"common_deleteAll": "Zmazať všetko",
|
||||
"discoveredContacts_deleteContactAllContent": "Ste si istí, že chcete zmazať všetky objavené kontakty?",
|
||||
"map_showGuessedLocations": "Zobraziť umiestnenia odhadnutých uzlov",
|
||||
"map_guessedLocation": "Odhadnutá lokalita",
|
||||
"usbScreenTitle": "Pripojte cez USB",
|
||||
"usbScreenSubtitle": "Vyberte detekovaný sériový zariadenie a pripojte ho priamo k vašej MeshCore uzlu.",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"usbScreenStatus": "Vyberte USB zariadenie",
|
||||
"usbScreenNote": "USB sériová komunikácia je aktívna na podporovaných zariadeniach s Androidom a na desktopových platformách.",
|
||||
"usbScreenEmptyState": "Nenašli sa žiadne USB zariadenia. Pripojte jedno a obnovte.",
|
||||
"usbErrorPermissionDenied": "Žiadosť o prístup cez USB bola zamietnutá.",
|
||||
"usbErrorDeviceMissing": "Vybrané USB zariadenie už nie je dostupné.",
|
||||
"usbErrorInvalidPort": "Vyberte platné USB zariadenie.",
|
||||
"usbErrorBusy": "Ďalšia požiadavka na pripojenie cez USB je aktuálne v procese.",
|
||||
"usbErrorNotConnected": "Nie je pripojené žiadne USB zariadenie.",
|
||||
"usbErrorOpenFailed": "Nepodarilo sa otvoriť vybrané USB zariadenie.",
|
||||
"usbErrorConnectFailed": "Nepodarilo sa sa sa pripojiť k vybranému USB zariadeniu.",
|
||||
"usbErrorUnsupported": "Podpora USB sériového rozhrania nie je na tejto platforme dostupná.",
|
||||
"usbErrorAlreadyActive": "Pripojenie cez USB je už aktivované.",
|
||||
"usbErrorNoDeviceSelected": "Nebolo vybrané žiadne USB zariadenie.",
|
||||
"usbErrorPortClosed": "Pripojenie cez USB nie je aktivované.",
|
||||
"usbFallbackDeviceName": "Webový sériový zariadenie",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_searching": "Hľadanie USB zariadení...",
|
||||
"usbConnectionFailed": "Neúspešné pripojenie cez USB: {error}",
|
||||
"usbStatus_notConnected": "Vyberte USB zariadenie",
|
||||
"usbStatus_connecting": "Pripojenie k USB zariadeniu...",
|
||||
"usbErrorConnectTimedOut": "Pripojenie nebolo úspešné. Uistite sa, že zariadenie má nainštalovaný firmware USB Companion.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpHostLabel": "IP adresa",
|
||||
"tcpScreenTitle": "Spojte sa pomocou protokolu TCP",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpPortLabel": "Port",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Zadajte cieľovú adresu a pripojte sa.",
|
||||
"tcpStatus_connectingTo": "Pripojenie k {endpoint}...",
|
||||
"tcpErrorHostRequired": "Je potrebné zadať IP adresu.",
|
||||
"tcpErrorPortInvalid": "Číslo portu musí byť medzi 1 a 65535.",
|
||||
"tcpErrorUnsupported": "Prevoz prostredníctvom protokolu TCP nie je na tejto platforme podporovaný.",
|
||||
"tcpErrorTimedOut": "Pripojenie TCP vypršalo.",
|
||||
"tcpConnectionFailed": "Neúspešné vytvorenie TCP spojenia: {error}",
|
||||
"map_showDiscoveryContacts": "Zobraziť kontakty objavov",
|
||||
"map_setAsMyLocation": "Nastavte ako moju polohu"
|
||||
}
|
||||
|
||||
+90
-1
@@ -1605,6 +1605,8 @@
|
||||
"map_pathTraceCancelled": "Spremljanje poti je prekinjeno.",
|
||||
"scanner_enableBluetooth": "Omogočite Bluetooth",
|
||||
"scanner_bluetoothOffMessage": "Prosimo, vklopite Bluetooth, da lahko poiščete naprave.",
|
||||
"scanner_chromeRequired": "Zahtevan brskalnik Chrome",
|
||||
"scanner_chromeRequiredMessage": "Ta spletna aplikacija za podporo Bluetooth zahteva Google Chrome ali brskalnik na osnovi Chromiuma.",
|
||||
"scanner_bluetoothOff": "Bluetooth je izklopljen",
|
||||
"snrIndicator_lastSeen": "Zadnjič videno",
|
||||
"snrIndicator_nearByRepeaters": "Bližnji ponovitelji",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchRoomServers": "Išči {number}{str} strežnikov sob...",
|
||||
"contacts_searchContactsNoNumber": "Iskanje stikov...",
|
||||
"contacts_searchRepeaters": "Išči {number}{str} ponavljalnike...",
|
||||
"contacts_searchUsers": "Išči {number}{str} uporabnikov..."
|
||||
"contacts_searchUsers": "Išči {number}{str} uporabnikov...",
|
||||
"settings_contactSettings": "Nastavitve stika",
|
||||
"contactsSettings_autoAddTitle": "Avtomatsko odkrivanje",
|
||||
"contactsSettings_autoAddUsersTitle": "Avtomatsko dodaj uporabnike",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Avtomatsko dodaj ponovitelje",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Dovoli spremljevalcu, da samodejno doda odkrite ponovitelje.",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Avtomatsko dodaj strežnike sob",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Dovoli spremljevalcu, da samodejno doda odkrite strežnike sob.",
|
||||
"contactsSettings_otherTitle": "Druge nastavitve v zvezi s stiki",
|
||||
"settings_contactSettingsSubtitle": "Nastavitve za dodajanje stikov.",
|
||||
"contactsSettings_title": "Nastavitve stikov",
|
||||
"contactsSettings_autoAddSensorsTitle": "Avtomatsko dodaj senzorje",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Dovoli spremljevalcu, da samodejno doda odkrite uporabnike.",
|
||||
"discoveredContacts_noMatching": "Ni ujemajočih stikov",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Dovoli spremljevalcu, da samodejno doda odkrite senzorje.",
|
||||
"discoveredContacts_addContact": "Dodaj stik",
|
||||
"discoveredContacts_contactAdded": "Kontakt dodan",
|
||||
"discoveredContacts_copyContact": "Kopiraj stik v odložišče",
|
||||
"contactsSettings_overwriteOldestTitle": "Prepiši najstarejše",
|
||||
"discoveredContacts_Title": "Odkriti stiki",
|
||||
"discoveredContacts_searchHint": "Najdeni stiki po iskanju",
|
||||
"discoveredContacts_deleteContact": "Izbriši stik",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Ko je seznam stikov poln, bo najstarejši nestarševski stik zamenjan.",
|
||||
"common_deleteAll": "Izbriši vse",
|
||||
"discoveredContacts_deleteContactAllContent": "Ste prepričani, da želite izbrisati vse odkrite kontakte?",
|
||||
"discoveredContacts_deleteContactAll": "Izbriši vse odkrite kontakte",
|
||||
"map_guessedLocation": "Predpostavljena lokacija",
|
||||
"map_showGuessedLocations": "Pokaži lokacije domnevnih not.",
|
||||
"usbScreenTitle": "Povežite preko USB",
|
||||
"usbScreenSubtitle": "Izberite zaznano serijsko napravo in se neposredno povežite z vašo MeshCore napravo.",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenStatus": "Izberite USB naprave",
|
||||
"usbScreenNote": "USB serijska povezava je aktivna na podprtih napravah Android in na desktop platformah.",
|
||||
"usbScreenEmptyState": "Niti en USB naprave niso najdeni. Povežite eno in posodobite.",
|
||||
"usbErrorPermissionDenied": "Dovoljenje za dostop preko USB-ja je bilo zavrnjeno.",
|
||||
"usbErrorDeviceMissing": "Izbrani USB napravej je več ne.",
|
||||
"usbErrorInvalidPort": "Izberite veljavno USB naprave.",
|
||||
"usbErrorBusy": "Že je v teku zahteva za povezavo preko USB.",
|
||||
"usbErrorNotConnected": "Ni priklopljenih USB naprave.",
|
||||
"usbErrorOpenFailed": "Uspešno ni bilo mogo, da se odpre izbran naprave USB.",
|
||||
"usbErrorConnectFailed": "Niso bilo mogoče uskladiti povezave z izbranim USB napom.",
|
||||
"usbErrorUnsupported": "USB serijska komunikacija ni podprta na tej platformi.",
|
||||
"usbErrorAlreadyActive": "USB povezava je že aktivirana.",
|
||||
"usbErrorNoDeviceSelected": "Ni bilo izbranega USB naprave.",
|
||||
"usbErrorPortClosed": "USB povezava ni aktivirana.",
|
||||
"usbFallbackDeviceName": "Naprave za serijsko komunikacijo preko spleta",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_notConnected": "Izberite USB naprave.",
|
||||
"usbStatus_connecting": "Povezava z USB napravo...",
|
||||
"usbStatus_searching": "Iskanje USB naprav...",
|
||||
"usbConnectionFailed": "Napaka pri povezavi preko USB: {error}",
|
||||
"usbErrorConnectTimedOut": "Vzpostavitve ni bilo mogo. Prosimo, da se prepričate, da ima naprave trenutno nameštan firmware USB Companion.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpHostLabel": "IP naslov",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpScreenTitle": "Komunicirajte preko protokola TCP",
|
||||
"tcpPortLabel": "Vrata",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Vnesite končni naslov in se povežite",
|
||||
"tcpStatus_connectingTo": "Povezava z {endpoint}...",
|
||||
"tcpErrorHostRequired": "Potrebna je IP-naslov.",
|
||||
"tcpErrorPortInvalid": "Port mora biti med 1 in 65535.",
|
||||
"tcpErrorUnsupported": "Transport preko protokola TCP ni podprt na tej platformi.",
|
||||
"tcpErrorTimedOut": "Povezava TCP je presegla časovno obdobje.",
|
||||
"tcpConnectionFailed": "Napaka pri povezavi TCP: {error}",
|
||||
"map_showDiscoveryContacts": "Prikaži odkritja kontaktov",
|
||||
"map_setAsMyLocation": "Nastavite to kot mojo lokacijo"
|
||||
}
|
||||
|
||||
+90
-1
@@ -1605,6 +1605,8 @@
|
||||
"map_removeLast": "Ta bort sista",
|
||||
"scanner_enableBluetooth": "Aktivera Bluetooth",
|
||||
"scanner_bluetoothOffMessage": "Vänligen aktivera Bluetooth för att söka efter enheter.",
|
||||
"scanner_chromeRequired": "Chrome-webbläsare krävs",
|
||||
"scanner_chromeRequiredMessage": "Denna webbapplikation kräver Google Chrome oder en Chromium-baserader webbläsare för Bluetooth-stöd.",
|
||||
"scanner_bluetoothOff": "Bluetooth är avstängt",
|
||||
"snrIndicator_lastSeen": "Senast sedd",
|
||||
"snrIndicator_nearByRepeaters": "Närliggande uppreparstationer",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchRepeaters": "Sök {number}{str} upprepningsenheter...",
|
||||
"contacts_searchFavorites": "Sök {number}{str} Favoriter...",
|
||||
"contacts_searchUsers": "Sök {number}{str} användare...",
|
||||
"contacts_searchRoomServers": "Sök {number}{str} Room-servrar..."
|
||||
"contacts_searchRoomServers": "Sök {number}{str} Room-servrar...",
|
||||
"settings_contactSettingsSubtitle": "Inställningar för hur kontakter läggs till.",
|
||||
"settings_contactSettings": "Kontaktinställningar",
|
||||
"contactsSettings_autoAddTitle": "Automatisk upptäckt",
|
||||
"contactsSettings_otherTitle": "Andra inställningar relaterade till kontakt",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Tillåt kompanjonen att automatiskt lägga till upptäckta användare",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Lägg till upprepande enheter automatiskt",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Tillåt kompanjonen att automatiskt lägga till upptäckta rumsservrar.",
|
||||
"contactsSettings_autoAddSensorsTitle": "Lägg till sensorer automatiskt",
|
||||
"contactsSettings_autoAddUsersTitle": "Lägg till användare automatiskt",
|
||||
"contactsSettings_title": "Kontaktinställningar",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Tillåt kompanjonen att automatiskt lägga till upptäckta sensorer.",
|
||||
"contactsSettings_overwriteOldestTitle": "Skriv över äldst",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Tillåt kompanjonen att automatiskt lägga till upptäckta repeater.",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Lägg automatiskt till rumsservrar",
|
||||
"discoveredContacts_noMatching": "Inga matchande kontakter",
|
||||
"discoveredContacts_searchHint": "Sök uppfunna kontakter",
|
||||
"discoveredContacts_deleteContact": "Ta bort kontakt",
|
||||
"discoveredContacts_Title": "Upptäckta kontakter",
|
||||
"discoveredContacts_contactAdded": "Kontakt tillagd",
|
||||
"discoveredContacts_addContact": "Lägg till kontakt",
|
||||
"discoveredContacts_copyContact": "Kopiera kontakt till urklipp",
|
||||
"contactsSettings_overwriteOldestSubtitle": "När kontaktlistan är full ersätts den äldsta icke-favoriterade kontakten.",
|
||||
"common_deleteAll": "Ta bort alla",
|
||||
"discoveredContacts_deleteContactAllContent": "Är du säker på att du vill ta bort alla upptäckta kontakter?",
|
||||
"discoveredContacts_deleteContactAll": "Ta bort alla upptäckta kontakter",
|
||||
"map_guessedLocation": "Gissad plats",
|
||||
"map_showGuessedLocations": "Visa upp de antagna nodernas placeringar",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenSubtitle": "Välj en detekterad seriell enhet och anslut direkt till din MeshCore-nod.",
|
||||
"usbScreenTitle": "Anslut via USB",
|
||||
"usbScreenStatus": "Välj en USB-enhet",
|
||||
"usbScreenNote": "USB-seriell kommunikation är aktiv på stödda Android-enheter och på skrivbordsplattformar.",
|
||||
"usbScreenEmptyState": "Inga USB-enheter hittades. Anslut en och uppdatera.",
|
||||
"usbErrorPermissionDenied": "Tillgången via USB nekas.",
|
||||
"usbErrorDeviceMissing": "Den valda USB-enheten är inte längre tillgänglig.",
|
||||
"usbErrorInvalidPort": "Välj en giltig USB-enhet.",
|
||||
"usbErrorBusy": "En annan förfrågan om USB-anslutning är redan pågående.",
|
||||
"usbErrorNotConnected": "Ingen USB-enhet är ansluten.",
|
||||
"usbErrorOpenFailed": "Misslyckades med att öppna det valda USB-enheten.",
|
||||
"usbErrorConnectFailed": "Kunde inte ansluta till det valda USB-enheten.",
|
||||
"usbErrorUnsupported": "USB-seriell kommunikation stöds inte på denna plattform.",
|
||||
"usbErrorAlreadyActive": "En USB-anslutning är redan aktiv.",
|
||||
"usbErrorNoDeviceSelected": "Ingen USB-enhet valdes.",
|
||||
"usbErrorPortClosed": "USB-anslutningen är inte aktiv.",
|
||||
"usbFallbackDeviceName": "Web-serieenhet",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_connecting": "Anslutning till USB-enhet...",
|
||||
"usbStatus_notConnected": "Välj en USB-enhet",
|
||||
"usbConnectionFailed": "Fel vid USB-anslutning: {error}",
|
||||
"usbStatus_searching": "Söker efter USB-enheter...",
|
||||
"usbErrorConnectTimedOut": "Anslutningen har tidsutgått. Se till att enheten har rätt USB-firmware.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpHostLabel": "IP-adress",
|
||||
"tcpScreenTitle": "Anslut via TCP",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpPortLabel": "Port",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Ange slutpunkt och anslut",
|
||||
"tcpStatus_connectingTo": "Anslutning till {endpoint}...",
|
||||
"tcpErrorHostRequired": "IP-adress krävs.",
|
||||
"tcpErrorPortInvalid": "Porten måste vara mellan 1 och 65535.",
|
||||
"tcpErrorUnsupported": "TCP-transport fungerar inte på denna plattform.",
|
||||
"tcpErrorTimedOut": "TCP-anslutningen har tidsut gått.",
|
||||
"tcpConnectionFailed": "Fel vid TCP-anslutning: {error}",
|
||||
"map_showDiscoveryContacts": "Visa Discovery-kontakter",
|
||||
"map_setAsMyLocation": "Ange som min plats"
|
||||
}
|
||||
|
||||
+90
-1
@@ -1605,6 +1605,8 @@
|
||||
"map_pathTraceCancelled": "Відмінується трасування шляху",
|
||||
"scanner_enableBluetooth": "Увімкніть Bluetooth",
|
||||
"scanner_bluetoothOffMessage": "Будь ласка, увімкніть Bluetooth, щоб сканувати пристрої.",
|
||||
"scanner_chromeRequired": "Потрібен браузер Chrome",
|
||||
"scanner_chromeRequiredMessage": "Для підтримки Bluetooth у цьому веб-додатку потрібен Google Chrome або браузер на базі Chromium.",
|
||||
"scanner_bluetoothOff": "Bluetooth вимкнено",
|
||||
"snrIndicator_lastSeen": "Останній раз бачили",
|
||||
"snrIndicator_nearByRepeaters": "Ближні ретранслятори",
|
||||
@@ -1799,5 +1801,92 @@
|
||||
"contacts_searchFavorites": "Пошук {number}{str} улюблених...",
|
||||
"contacts_searchContactsNoNumber": "Пошук контактів...",
|
||||
"contacts_searchRepeaters": "Пошук {number}{str} ретрансляторів...",
|
||||
"contacts_unread": "Непрочитане"
|
||||
"contacts_unread": "Непрочитане",
|
||||
"settings_contactSettingsSubtitle": "Налаштування для додавання контактів",
|
||||
"settings_contactSettings": "Налаштування контактів",
|
||||
"contactsSettings_autoAddUsersSubtitle": "Дозволити супутникові автоматично додавати виявлених користувачів",
|
||||
"contactsSettings_autoAddRepeatersTitle": "Автоматично додавати повторювачі",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "Дозволити супутнику автоматично додавати виявлені ретранслятори",
|
||||
"contactsSettings_autoAddRoomServersTitle": "Автоматично додавати сервери кімнат",
|
||||
"contactsSettings_otherTitle": "Інші налаштування, пов'язані з контактами",
|
||||
"contactsSettings_autoAddTitle": "Автоматичне виявлення",
|
||||
"contactsSettings_autoAddUsersTitle": "Автоматично додавати користувачів",
|
||||
"contactsSettings_title": "Налаштування контактів",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "Дозволити супровіднику автоматично додавати виявлені сервери кімнат.",
|
||||
"contactsSettings_autoAddSensorsTitle": "Автоматично додавати датчики",
|
||||
"discoveredContacts_searchHint": "Знайти виявлені контакти",
|
||||
"discoveredContacts_contactAdded": "Контакт додано",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "Дозволити супровіднику автоматично додавати виявлені сенсори",
|
||||
"contactsSettings_overwriteOldestTitle": "Перезаписати найстаріше",
|
||||
"discoveredContacts_Title": "Виявлені контакти",
|
||||
"discoveredContacts_noMatching": "Відповідних контактів не знайдено",
|
||||
"discoveredContacts_deleteContact": "Видалити контакт",
|
||||
"discoveredContacts_copyContact": "Копіювати контакт у буфер обміну",
|
||||
"discoveredContacts_addContact": "Додати контакт",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Коли список контактів заповнений, найстарший контакт без позначки улюбленого буде замінений.",
|
||||
"common_deleteAll": "Видалити все",
|
||||
"discoveredContacts_deleteContactAll": "Видалити всі виявлені контакти",
|
||||
"discoveredContacts_deleteContactAllContent": "Ви впевнені, що хочете видалити всі виявлені контакти?",
|
||||
"map_showGuessedLocations": "Показати місцезнаходження передбачених вузлів",
|
||||
"map_guessedLocation": "Визначено місцезнаходження",
|
||||
"usbScreenSubtitle": "Виберіть виявлене серійне пристрій і підключіть його безпосередньо до вашого вузла MeshCore.",
|
||||
"usbScreenTitle": "Підключити через USB",
|
||||
"connectionChoiceBluetoothLabel": "Bluetooth",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenStatus": "Виберіть пристрій USB",
|
||||
"usbScreenNote": "USB-серіальний інтерфейс активний на підтримуваних пристроях на базі Android та на десктопних платформах.",
|
||||
"usbScreenEmptyState": "Не знайдено жодних пристроїв USB. Підключіть один і перезавантажте.",
|
||||
"usbErrorPermissionDenied": "Було відмовлено у наданні дозволу на використання USB.",
|
||||
"usbErrorDeviceMissing": "Вибране USB-пристрій більше недоступне.",
|
||||
"usbErrorInvalidPort": "Виберіть дійсний USB-пристрій.",
|
||||
"usbErrorBusy": "Ще один запит на підключення через USB вже обробляється.",
|
||||
"usbErrorNotConnected": "Немає підключених пристроїв USB.",
|
||||
"usbErrorOpenFailed": "Не вдалося відкрити вибране USB-пристрій.",
|
||||
"usbErrorConnectFailed": "Не вдалося підключитися до вибраного USB-пристрою.",
|
||||
"usbErrorUnsupported": "Підтримка USB-серіального інтерфейсу не реалізована на цій платформі.",
|
||||
"usbErrorAlreadyActive": "USB-з'єднання вже встановлено.",
|
||||
"usbErrorNoDeviceSelected": "Не було вибрано жодного пристрою USB.",
|
||||
"usbErrorPortClosed": "З'єднання USB не встановлено.",
|
||||
"usbFallbackDeviceName": "Пристрій для передачі даних по веб-серіалах",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_searching": "Пошук пристроїв USB...",
|
||||
"usbStatus_notConnected": "Виберіть пристрій USB",
|
||||
"usbConnectionFailed": "Не вдалося встановити з'єднання через USB: {error}",
|
||||
"usbStatus_connecting": "Підключення до USB-пристрою...",
|
||||
"usbErrorConnectTimedOut": "З'єднання не вдалося встановити. Переконайтеся, що пристрій має встановлене програмне забезпечення USB Companion.",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpHostLabel": "IP-адреса",
|
||||
"tcpScreenTitle": "З'єднатися через протокол TCP",
|
||||
"tcpPortLabel": "Порт",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "Введіть кінцеву точку та підключіться",
|
||||
"tcpStatus_connectingTo": "Підключення до {endpoint}...",
|
||||
"tcpErrorHostRequired": "Необхідно вказати IP-адресу.",
|
||||
"tcpErrorPortInvalid": "Порт повинен бути в межах від 1 до 65535.",
|
||||
"tcpErrorUnsupported": "Транспорт TCP не підтримується на цій платформі.",
|
||||
"tcpErrorTimedOut": "З'єднання TCP завершилося через закінчення часу очікування.",
|
||||
"tcpConnectionFailed": "Не вдалося встановити з'єднання TCP: {error}",
|
||||
"map_showDiscoveryContacts": "Показати контакти Відкриття",
|
||||
"map_setAsMyLocation": "Встановити моє місцезнаходження"
|
||||
}
|
||||
|
||||
+90
-1
@@ -1609,6 +1609,8 @@
|
||||
"map_removeLast": "移除最后一个",
|
||||
"map_runTrace": "运行路径追踪",
|
||||
"scanner_bluetoothOffMessage": "请开启蓝牙以搜索设备",
|
||||
"scanner_chromeRequired": "需要 Chrome 浏览器",
|
||||
"scanner_chromeRequiredMessage": "此 Web 应用程序需要 Google Chrome 或基于 Chromium 的浏览器以支持蓝牙。",
|
||||
"scanner_bluetoothOff": "蓝牙已关闭",
|
||||
"scanner_enableBluetooth": "启用蓝牙",
|
||||
"snrIndicator_lastSeen": "最近访问",
|
||||
@@ -1804,5 +1806,92 @@
|
||||
"contacts_searchRepeaters": "搜索 {number}{str} 重复器...",
|
||||
"contacts_searchContactsNoNumber": "搜索联系人...",
|
||||
"contacts_searchRoomServers": "搜索 {number}{str} 房间服务器...",
|
||||
"contacts_searchFavorites": "搜索 {number}{str} 收藏..."
|
||||
"contacts_searchFavorites": "搜索 {number}{str} 收藏...",
|
||||
"settings_contactSettings": "联系人设置",
|
||||
"contactsSettings_title": "联系人设置",
|
||||
"contactsSettings_autoAddUsersTitle": "自动添加用户",
|
||||
"contactsSettings_otherTitle": "其他联系人相关设置",
|
||||
"contactsSettings_autoAddUsersSubtitle": "允许伴侣自动添加发现的用户",
|
||||
"contactsSettings_autoAddRepeatersSubtitle": "允许伴侣自动添加发现的重复器",
|
||||
"contactsSettings_autoAddSensorsTitle": "自动添加传感器",
|
||||
"contactsSettings_autoAddRoomServersSubtitle": "允许伴侣自动添加发现的房间服务器",
|
||||
"contactsSettings_autoAddRepeatersTitle": "自动添加重复器",
|
||||
"contactsSettings_autoAddTitle": "自动发现",
|
||||
"settings_contactSettingsSubtitle": "添加联系人的设置",
|
||||
"contactsSettings_overwriteOldestTitle": "覆盖最旧的",
|
||||
"contactsSettings_autoAddSensorsSubtitle": "允许伴侣自动添加发现的传感器",
|
||||
"discoveredContacts_searchHint": "搜索已发现的联系人",
|
||||
"contactsSettings_autoAddRoomServersTitle": "自动添加房间服务器",
|
||||
"discoveredContacts_contactAdded": "联系人已添加",
|
||||
"discoveredContacts_deleteContact": "删除联系人",
|
||||
"discoveredContacts_addContact": "添加联系人",
|
||||
"discoveredContacts_noMatching": "没有匹配的联系人",
|
||||
"discoveredContacts_Title": "已发现的联系人",
|
||||
"discoveredContacts_copyContact": "复制联系人到剪贴板",
|
||||
"contactsSettings_overwriteOldestSubtitle": "当联系人列表已满时,将替换最老的非收藏联系人。",
|
||||
"common_deleteAll": "删除全部",
|
||||
"discoveredContacts_deleteContactAllContent": "您确定要删除所有发现的联系人吗?",
|
||||
"discoveredContacts_deleteContactAll": "删除所有发现的联系人",
|
||||
"map_showGuessedLocations": "显示猜测的节点位置",
|
||||
"map_guessedLocation": "猜测的位置",
|
||||
"connectionChoiceUsbLabel": "USB",
|
||||
"usbScreenTitle": "通过USB连接",
|
||||
"usbScreenSubtitle": "选择已检测到的串行设备,并直接连接到您的 MeshCore 节点。",
|
||||
"connectionChoiceBluetoothLabel": "蓝牙",
|
||||
"usbScreenStatus": "选择一个 USB 设备",
|
||||
"usbScreenNote": "USB 串行接口在支持的 Android 设备和桌面平台上处于活动状态。",
|
||||
"usbScreenEmptyState": "未找到任何 USB 设备。请插入一个,然后刷新。",
|
||||
"usbErrorPermissionDenied": "拒绝了USB权限。",
|
||||
"usbErrorDeviceMissing": "所选的USB设备已不再可用。",
|
||||
"usbErrorInvalidPort": "选择一个有效的USB设备。",
|
||||
"usbErrorBusy": "还有一个 USB 连接请求正在进行中。",
|
||||
"usbErrorNotConnected": "没有连接任何USB设备。",
|
||||
"usbErrorOpenFailed": "未能打开所选的USB设备。",
|
||||
"usbErrorConnectFailed": "未能连接到所选的USB设备。",
|
||||
"usbErrorUnsupported": "此平台不支持USB串行通信。",
|
||||
"usbErrorAlreadyActive": "USB 连接已建立。",
|
||||
"usbErrorNoDeviceSelected": "未选择任何 USB 设备。",
|
||||
"usbErrorPortClosed": "USB 连接未建立。",
|
||||
"usbFallbackDeviceName": "Web 串流设备",
|
||||
"@usbConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usbStatus_searching": "正在搜索 USB 设备...",
|
||||
"usbStatus_connecting": "连接USB设备...",
|
||||
"usbStatus_notConnected": "选择一个 USB 设备",
|
||||
"usbConnectionFailed": "USB 连接失败:{error}",
|
||||
"usbErrorConnectTimedOut": "连接超时。请确保设备已安装 USB 伴侣固件。",
|
||||
"@tcpStatus_connectingTo": {
|
||||
"placeholders": {
|
||||
"endpoint": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tcpConnectionFailed": {
|
||||
"placeholders": {
|
||||
"error": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tcpHostLabel": "IP地址",
|
||||
"tcpHostHint": "192.168.40.10",
|
||||
"tcpScreenTitle": "通过 TCP 连接",
|
||||
"connectionChoiceTcpLabel": "TCP",
|
||||
"tcpPortLabel": "端口",
|
||||
"tcpPortHint": "5000",
|
||||
"tcpStatus_notConnected": "输入目标地址,然后连接",
|
||||
"tcpStatus_connectingTo": "连接到 {endpoint}...",
|
||||
"tcpErrorHostRequired": "需要提供IP地址。",
|
||||
"tcpErrorPortInvalid": "端口号必须在 1 到 65535 之间。",
|
||||
"tcpErrorUnsupported": "此平台不支持 TCP 传输。",
|
||||
"tcpErrorTimedOut": "TCP 连接超时。",
|
||||
"tcpConnectionFailed": "TCP 连接失败:{error}",
|
||||
"map_showDiscoveryContacts": "显示发现联系人",
|
||||
"map_setAsMyLocation": "设置为我的位置"
|
||||
}
|
||||
|
||||
+6
-1
@@ -4,6 +4,9 @@ import 'package:flutter/foundation.dart';
|
||||
import 'l10n/app_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'screens/chrome_required_screen.dart';
|
||||
import 'utils/platform_info.dart';
|
||||
|
||||
import 'connector/meshcore_connector.dart';
|
||||
import 'screens/scanner_screen.dart';
|
||||
import 'services/storage_service.dart';
|
||||
@@ -187,7 +190,9 @@ class MeshCoreApp extends StatelessWidget {
|
||||
NotificationService().setLocale(locale);
|
||||
return child ?? const SizedBox.shrink();
|
||||
},
|
||||
home: const ScannerScreen(),
|
||||
home: (PlatformInfo.isWeb && !PlatformInfo.isChrome)
|
||||
? const ChromeRequiredScreen()
|
||||
: const ScannerScreen(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -22,6 +22,7 @@ class AppSettings {
|
||||
final bool mapKeyPrefixEnabled;
|
||||
final String mapKeyPrefix;
|
||||
final bool mapShowMarkers;
|
||||
final bool mapShowGuessedLocations;
|
||||
final bool enableMessageTracing;
|
||||
final Map<String, double>? mapCacheBounds;
|
||||
final int mapCacheMinZoom;
|
||||
@@ -38,6 +39,7 @@ class AppSettings {
|
||||
final Map<String, String> batteryChemistryByRepeaterId;
|
||||
final UnitSystem unitSystem;
|
||||
final Set<String> mutedChannels;
|
||||
final bool mapShowDiscoveryContacts;
|
||||
|
||||
AppSettings({
|
||||
this.clearPathOnMaxRetry = false,
|
||||
@@ -48,6 +50,7 @@ class AppSettings {
|
||||
this.mapKeyPrefixEnabled = false,
|
||||
this.mapKeyPrefix = '',
|
||||
this.mapShowMarkers = true,
|
||||
this.mapShowGuessedLocations = true,
|
||||
this.enableMessageTracing = false,
|
||||
this.mapCacheBounds,
|
||||
this.mapCacheMinZoom = 10,
|
||||
@@ -64,6 +67,7 @@ class AppSettings {
|
||||
Map<String, String>? batteryChemistryByRepeaterId,
|
||||
this.unitSystem = UnitSystem.metric,
|
||||
Set<String>? mutedChannels,
|
||||
this.mapShowDiscoveryContacts = true,
|
||||
}) : batteryChemistryByDeviceId = batteryChemistryByDeviceId ?? {},
|
||||
batteryChemistryByRepeaterId = batteryChemistryByRepeaterId ?? {},
|
||||
mutedChannels = mutedChannels ?? {};
|
||||
@@ -78,6 +82,7 @@ class AppSettings {
|
||||
'map_key_prefix_enabled': mapKeyPrefixEnabled,
|
||||
'map_key_prefix': mapKeyPrefix,
|
||||
'map_show_markers': mapShowMarkers,
|
||||
'map_show_guessed_locations': mapShowGuessedLocations,
|
||||
'enable_message_tracing': enableMessageTracing,
|
||||
'map_cache_bounds': mapCacheBounds,
|
||||
'map_cache_min_zoom': mapCacheMinZoom,
|
||||
@@ -94,6 +99,7 @@ class AppSettings {
|
||||
'battery_chemistry_by_repeater_id': batteryChemistryByRepeaterId,
|
||||
'unit_system': unitSystem.value,
|
||||
'muted_channels': mutedChannels.toList(),
|
||||
'map_show_discovery_contacts': mapShowDiscoveryContacts,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -115,6 +121,8 @@ class AppSettings {
|
||||
mapKeyPrefixEnabled: json['map_key_prefix_enabled'] as bool? ?? false,
|
||||
mapKeyPrefix: json['map_key_prefix'] as String? ?? '',
|
||||
mapShowMarkers: json['map_show_markers'] as bool? ?? true,
|
||||
mapShowGuessedLocations:
|
||||
json['map_show_guessed_locations'] as bool? ?? true,
|
||||
enableMessageTracing: json['enable_message_tracing'] as bool? ?? false,
|
||||
mapCacheBounds: (json['map_cache_bounds'] as Map?)?.map(
|
||||
(key, value) => MapEntry(key.toString(), (value as num).toDouble()),
|
||||
@@ -147,6 +155,8 @@ class AppSettings {
|
||||
?.map((e) => e.toString())
|
||||
.toSet()) ??
|
||||
{},
|
||||
mapShowDiscoveryContacts:
|
||||
json['map_show_discovery_contacts'] as bool? ?? true,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -159,6 +169,7 @@ class AppSettings {
|
||||
bool? mapKeyPrefixEnabled,
|
||||
String? mapKeyPrefix,
|
||||
bool? mapShowMarkers,
|
||||
bool? mapShowGuessedLocations,
|
||||
bool? enableMessageTracing,
|
||||
Object? mapCacheBounds = _unset,
|
||||
int? mapCacheMinZoom,
|
||||
@@ -175,6 +186,7 @@ class AppSettings {
|
||||
Map<String, String>? batteryChemistryByRepeaterId,
|
||||
UnitSystem? unitSystem,
|
||||
Set<String>? mutedChannels,
|
||||
bool? mapShowDiscoveryContacts,
|
||||
}) {
|
||||
return AppSettings(
|
||||
clearPathOnMaxRetry: clearPathOnMaxRetry ?? this.clearPathOnMaxRetry,
|
||||
@@ -185,6 +197,8 @@ class AppSettings {
|
||||
mapKeyPrefixEnabled: mapKeyPrefixEnabled ?? this.mapKeyPrefixEnabled,
|
||||
mapKeyPrefix: mapKeyPrefix ?? this.mapKeyPrefix,
|
||||
mapShowMarkers: mapShowMarkers ?? this.mapShowMarkers,
|
||||
mapShowGuessedLocations:
|
||||
mapShowGuessedLocations ?? this.mapShowGuessedLocations,
|
||||
enableMessageTracing: enableMessageTracing ?? this.enableMessageTracing,
|
||||
mapCacheBounds: mapCacheBounds == _unset
|
||||
? this.mapCacheBounds
|
||||
@@ -209,6 +223,8 @@ class AppSettings {
|
||||
batteryChemistryByRepeaterId ?? this.batteryChemistryByRepeaterId,
|
||||
unitSystem: unitSystem ?? this.unitSystem,
|
||||
mutedChannels: mutedChannels ?? this.mutedChannels,
|
||||
mapShowDiscoveryContacts:
|
||||
mapShowDiscoveryContacts ?? this.mapShowDiscoveryContacts,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+30
-19
@@ -1,4 +1,6 @@
|
||||
import 'dart:typed_data';
|
||||
import 'package:meshcore_open/utils/app_logger.dart';
|
||||
|
||||
import '../connector/meshcore_protocol.dart';
|
||||
|
||||
class Contact {
|
||||
@@ -15,6 +17,8 @@ class Contact {
|
||||
final double? longitude;
|
||||
final DateTime lastSeen;
|
||||
final DateTime lastMessageAt;
|
||||
final bool isActive;
|
||||
final Uint8List? rawPacket;
|
||||
|
||||
Contact({
|
||||
required this.publicKey,
|
||||
@@ -29,6 +33,8 @@ class Contact {
|
||||
this.longitude,
|
||||
required this.lastSeen,
|
||||
DateTime? lastMessageAt,
|
||||
this.isActive = true,
|
||||
this.rawPacket,
|
||||
}) : lastMessageAt = lastMessageAt ?? lastSeen;
|
||||
|
||||
String get publicKeyHex => pubKeyToHex(publicKey);
|
||||
@@ -76,6 +82,8 @@ class Contact {
|
||||
double? longitude,
|
||||
DateTime? lastSeen,
|
||||
DateTime? lastMessageAt,
|
||||
bool? isActive,
|
||||
Uint8List? rawPacket,
|
||||
}) {
|
||||
return Contact(
|
||||
publicKey: publicKey ?? this.publicKey,
|
||||
@@ -94,6 +102,8 @@ class Contact {
|
||||
longitude: longitude ?? this.longitude,
|
||||
lastSeen: lastSeen ?? this.lastSeen,
|
||||
lastMessageAt: lastMessageAt ?? this.lastMessageAt,
|
||||
isActive: isActive ?? this.isActive,
|
||||
rawPacket: rawPacket ?? this.rawPacket,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -166,28 +176,27 @@ class Contact {
|
||||
|
||||
static Contact? fromFrame(Uint8List data) {
|
||||
if (data.isEmpty) return null;
|
||||
if (data[0] != respCodeContact) return null;
|
||||
final reader = BufferReader(data);
|
||||
try {
|
||||
final pubKey = Uint8List.fromList(
|
||||
data.sublist(contactPubKeyOffset, contactPubKeyOffset + pubKeySize),
|
||||
);
|
||||
final type = data[contactTypeOffset];
|
||||
final flags = data[contactFlagsOffset];
|
||||
final pathLen = data[contactPathLenOffset].toSigned(8);
|
||||
final respCode = reader.readByte();
|
||||
if (respCode != respCodeContact && respCode != pushCodeNewAdvert) {
|
||||
return null;
|
||||
}
|
||||
final pubKey = reader.readBytes(pubKeySize);
|
||||
final type = reader.readByte();
|
||||
final flags = reader.readByte();
|
||||
final pathLen = reader.readByte();
|
||||
final safePathLen = pathLen > 0
|
||||
? (pathLen > maxPathSize ? maxPathSize : pathLen)
|
||||
: 0;
|
||||
final pathBytes = safePathLen > 0
|
||||
? Uint8List.fromList(
|
||||
data.sublist(contactPathOffset, contactPathOffset + safePathLen),
|
||||
)
|
||||
: Uint8List(0);
|
||||
final name = readCString(data, contactNameOffset, maxNameSize);
|
||||
final lastmod = readUint32LE(data, contactLastmodOffset);
|
||||
final pathBytes = reader.readBytes(maxPathSize).sublist(0, safePathLen);
|
||||
final name = reader.readCStringGreedy(maxNameSize);
|
||||
|
||||
final lastMod = reader.readUInt32LE();
|
||||
|
||||
double? lat, lon;
|
||||
final latRaw = readInt32LE(data, contactLatOffset);
|
||||
final lonRaw = readInt32LE(data, contactLonOffset);
|
||||
final latRaw = reader.readInt32LE();
|
||||
final lonRaw = reader.readInt32LE();
|
||||
if (latRaw != 0 || lonRaw != 0) {
|
||||
lat = latRaw / 1e6;
|
||||
lon = lonRaw / 1e6;
|
||||
@@ -198,14 +207,16 @@ class Contact {
|
||||
name: name.isEmpty ? 'Unknown' : name,
|
||||
type: type,
|
||||
flags: flags,
|
||||
pathLength: pathLen,
|
||||
pathLength: pathLen > 0 ? (pathLen > maxPathSize ? -1 : pathLen) : -1,
|
||||
path: pathBytes,
|
||||
latitude: lat,
|
||||
longitude: lon,
|
||||
lastSeen: DateTime.fromMillisecondsSinceEpoch(lastmod * 1000),
|
||||
lastSeen: DateTime.fromMillisecondsSinceEpoch(lastMod * 1000),
|
||||
isActive: true,
|
||||
rawPacket: null,
|
||||
);
|
||||
} catch (e) {
|
||||
// If parsing fails, return null
|
||||
appLogger.error('Failed to parse contact frame: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +118,19 @@ class _BleDebugLogScreenState extends State<BleDebugLogScreen> {
|
||||
: Icons.download,
|
||||
size: 18,
|
||||
),
|
||||
onLongPress: () async {
|
||||
await Clipboard.setData(
|
||||
ClipboardData(
|
||||
text: entry.payload
|
||||
.map(
|
||||
(b) => b
|
||||
.toRadixString(16)
|
||||
.padLeft(2, '0'),
|
||||
)
|
||||
.join(''),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,11 @@ class ChannelMessagePathScreen extends StatelessWidget {
|
||||
final primaryPath = !channelMessage && !message.isOutgoing
|
||||
? Uint8List.fromList(primaryPathTmp.reversed.toList())
|
||||
: primaryPathTmp;
|
||||
|
||||
final hops = _buildPathHops(primaryPath, connector.contacts, l10n);
|
||||
final contacts = <Contact>[
|
||||
...connector.contacts,
|
||||
...connector.discoveredContacts,
|
||||
];
|
||||
final hops = _buildPathHops(primaryPath, contacts, l10n);
|
||||
final hasHopDetails = primaryPath.isNotEmpty;
|
||||
final observedLabel = _formatObservedHops(
|
||||
primaryPath.length,
|
||||
@@ -364,11 +367,11 @@ class _ChannelMessagePathMapScreenState
|
||||
: selectedPathTmp;
|
||||
|
||||
final selectedIndex = _indexForPath(selectedPath, observedPaths);
|
||||
final hops = _buildPathHops(
|
||||
selectedPath,
|
||||
connector.contacts,
|
||||
context.l10n,
|
||||
);
|
||||
final contacts = <Contact>[
|
||||
...connector.contacts,
|
||||
...connector.discoveredContacts,
|
||||
];
|
||||
final hops = _buildPathHops(selectedPath, contacts, context.l10n);
|
||||
|
||||
final points = <LatLng>[];
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
// Cache of PSK hex -> Community for quick lookup
|
||||
final Map<String, Community> _pskToCommunity = {};
|
||||
|
||||
ChannelMessageStore get _channelMessageStore => ChannelMessageStore();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -61,6 +63,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
}
|
||||
|
||||
Future<void> _loadCommunities() async {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
_communityStore.setPublicKeyHex = connector.selfPublicKeyHex;
|
||||
final communities = await _communityStore.loadCommunities();
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
@@ -106,7 +110,9 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final connector = context.watch<MeshCoreConnector>();
|
||||
|
||||
final channelMessageStore = ChannelMessageStore();
|
||||
channelMessageStore.setPublicKeyHex = connector.selfPublicKeyHex;
|
||||
|
||||
// Auto-navigate back to scanner if disconnected
|
||||
if (!checkConnectionAndNavigate(connector)) {
|
||||
@@ -712,6 +718,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
bool isRegularHashtag = true;
|
||||
Community? selectedCommunity;
|
||||
|
||||
_communityStore.setPublicKeyHex = connector.selfPublicKeyHex;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (dialogContext) => StatefulBuilder(
|
||||
@@ -763,7 +771,9 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
);
|
||||
}
|
||||
|
||||
Widget? buildExpandedContent() {
|
||||
Widget? buildExpandedContent(
|
||||
ChannelMessageStore channelMessageStore,
|
||||
) {
|
||||
switch (selectedOption) {
|
||||
case 0: // Create Private Channel
|
||||
return Column(
|
||||
@@ -788,7 +798,7 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
children: [
|
||||
Expanded(
|
||||
child: FilledButton(
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
final name = nameController.text.trim();
|
||||
if (name.isEmpty) {
|
||||
ScaffoldMessenger.of(
|
||||
@@ -810,7 +820,14 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
psk[i] = random.nextInt(256);
|
||||
}
|
||||
Navigator.pop(dialogContext);
|
||||
connector.setChannel(nextIndex, name, psk);
|
||||
await connector.setChannel(
|
||||
nextIndex,
|
||||
name,
|
||||
psk,
|
||||
);
|
||||
await channelMessageStore.clearChannelMessages(
|
||||
nextIndex,
|
||||
);
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
@@ -1329,7 +1346,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
subtitle:
|
||||
dialogContext.l10n.channels_createPrivateChannelDesc,
|
||||
),
|
||||
if (selectedOption == 0) buildExpandedContent()!,
|
||||
if (selectedOption == 0)
|
||||
buildExpandedContent(_channelMessageStore)!,
|
||||
const Divider(height: 1),
|
||||
buildOptionTile(
|
||||
optionIndex: 1,
|
||||
@@ -1338,7 +1356,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
subtitle:
|
||||
dialogContext.l10n.channels_joinPrivateChannelDesc,
|
||||
),
|
||||
if (selectedOption == 1) buildExpandedContent()!,
|
||||
if (selectedOption == 1)
|
||||
buildExpandedContent(_channelMessageStore)!,
|
||||
if (!hasPublicChannel) ...[
|
||||
const Divider(height: 1),
|
||||
buildOptionTile(
|
||||
@@ -1348,7 +1367,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
subtitle:
|
||||
dialogContext.l10n.channels_joinPublicChannelDesc,
|
||||
),
|
||||
if (selectedOption == 2) buildExpandedContent()!,
|
||||
if (selectedOption == 2)
|
||||
buildExpandedContent(_channelMessageStore)!,
|
||||
],
|
||||
const Divider(height: 1),
|
||||
buildOptionTile(
|
||||
@@ -1358,7 +1378,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
subtitle:
|
||||
dialogContext.l10n.channels_joinHashtagChannelDesc,
|
||||
),
|
||||
if (selectedOption == 3) buildExpandedContent()!,
|
||||
if (selectedOption == 3)
|
||||
buildExpandedContent(_channelMessageStore)!,
|
||||
const Divider(height: 1),
|
||||
buildOptionTile(
|
||||
optionIndex: 4,
|
||||
@@ -1366,7 +1387,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
title: dialogContext.l10n.community_scanQr,
|
||||
subtitle: dialogContext.l10n.community_join,
|
||||
),
|
||||
if (selectedOption == 4) buildExpandedContent()!,
|
||||
if (selectedOption == 4)
|
||||
buildExpandedContent(_channelMessageStore)!,
|
||||
const Divider(height: 1),
|
||||
buildOptionTile(
|
||||
optionIndex: 5,
|
||||
@@ -1374,7 +1396,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
title: dialogContext.l10n.community_create,
|
||||
subtitle: dialogContext.l10n.community_createDesc,
|
||||
),
|
||||
if (selectedOption == 5) buildExpandedContent()!,
|
||||
if (selectedOption == 5)
|
||||
buildExpandedContent(_channelMessageStore)!,
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -1524,7 +1547,7 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
try {
|
||||
await connector.deleteChannel(channel.index);
|
||||
|
||||
channelMessageStore.clearChannelMessages(channel.index);
|
||||
await channelMessageStore.clearChannelMessages(channel.index);
|
||||
|
||||
if (!context.mounted) return;
|
||||
|
||||
@@ -1749,6 +1772,7 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
}
|
||||
|
||||
final channelCount = communityChannels.length;
|
||||
_communityStore.setPublicKeyHex = connector.selfPublicKeyHex;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
|
||||
@@ -106,10 +106,9 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
final unreadLabel = context.l10n.chat_unread(unreadCount);
|
||||
final pathLabel = _currentPathLabel(contact);
|
||||
|
||||
// Show path details if we have path data (from device or override)
|
||||
final hasPathData =
|
||||
contact.path.isNotEmpty || contact.pathOverrideBytes != null;
|
||||
// Show path details if we have non-empty path data (from device or override)
|
||||
final effectivePath = contact.pathOverrideBytes ?? contact.path;
|
||||
final hasPathData = effectivePath.isNotEmpty;
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -143,12 +142,25 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
final contact = _resolveContact(connector);
|
||||
final isFloodMode = contact.pathOverride == -1;
|
||||
|
||||
final isDirectMode = contact.pathOverride == 0;
|
||||
final activeMode = isFloodMode
|
||||
? 'flood'
|
||||
: isDirectMode
|
||||
? 'direct'
|
||||
: 'auto';
|
||||
|
||||
return PopupMenuButton<String>(
|
||||
icon: Icon(isFloodMode ? Icons.waves : Icons.route),
|
||||
tooltip: context.l10n.chat_routingMode,
|
||||
onSelected: (mode) async {
|
||||
if (mode == 'flood') {
|
||||
await connector.setPathOverride(contact, pathLen: -1);
|
||||
} else if (mode == 'direct') {
|
||||
await connector.setPathOverride(
|
||||
contact,
|
||||
pathLen: 0,
|
||||
pathBytes: Uint8List(0),
|
||||
);
|
||||
} else {
|
||||
await connector.setPathOverride(contact, pathLen: null);
|
||||
}
|
||||
@@ -161,7 +173,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
Icon(
|
||||
Icons.auto_mode,
|
||||
size: 20,
|
||||
color: !isFloodMode
|
||||
color: activeMode == 'auto'
|
||||
? Theme.of(context).primaryColor
|
||||
: null,
|
||||
),
|
||||
@@ -169,7 +181,30 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
Text(
|
||||
context.l10n.chat_autoUseSavedPath,
|
||||
style: TextStyle(
|
||||
fontWeight: !isFloodMode
|
||||
fontWeight: activeMode == 'auto'
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'direct',
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.near_me,
|
||||
size: 20,
|
||||
color: activeMode == 'direct'
|
||||
? Theme.of(context).primaryColor
|
||||
: null,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
context.l10n.chat_direct,
|
||||
style: TextStyle(
|
||||
fontWeight: activeMode == 'direct'
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal,
|
||||
),
|
||||
@@ -184,7 +219,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
Icon(
|
||||
Icons.waves,
|
||||
size: 20,
|
||||
color: isFloodMode
|
||||
color: activeMode == 'flood'
|
||||
? Theme.of(context).primaryColor
|
||||
: null,
|
||||
),
|
||||
@@ -192,7 +227,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
Text(
|
||||
context.l10n.chat_forceFloodMode,
|
||||
style: TextStyle(
|
||||
fontWeight: isFloodMode
|
||||
fontWeight: activeMode == 'flood'
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal,
|
||||
),
|
||||
@@ -251,7 +286,9 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
context.l10n.chat_sendMessageTo(widget.contact.name),
|
||||
context.l10n.chat_sendMessageTo(
|
||||
_resolveContact(context.read<MeshCoreConnector>()).name,
|
||||
),
|
||||
style: TextStyle(fontSize: 14, color: Colors.grey[500]),
|
||||
),
|
||||
],
|
||||
@@ -269,6 +306,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
|
||||
// Auto-scroll to bottom if user is already at bottom
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!mounted) return;
|
||||
_scrollController.scrollToBottomIfAtBottom();
|
||||
});
|
||||
|
||||
@@ -293,10 +331,10 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
);
|
||||
}
|
||||
final messageIndex = index;
|
||||
Contact contact = widget.contact;
|
||||
Contact contact = _resolveContact(connector);
|
||||
final message = reversedMessages[messageIndex];
|
||||
String fourByteHex = '';
|
||||
if (widget.contact.type == advTypeRoom) {
|
||||
if (contact.type == advTypeRoom) {
|
||||
contact = _resolveContactFrom4Bytes(
|
||||
connector,
|
||||
message.fourByteRoomContactKey.isEmpty
|
||||
@@ -314,12 +352,13 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
final textScale = context.select<ChatTextScaleService, double>(
|
||||
(service) => service.scale,
|
||||
);
|
||||
final resolvedContact = _resolveContact(connector);
|
||||
return _MessageBubble(
|
||||
message: message,
|
||||
senderName: widget.contact.type == advTypeRoom
|
||||
senderName: resolvedContact.type == advTypeRoom
|
||||
? "${contact.name} [$fourByteHex]"
|
||||
: contact.name,
|
||||
isRoomServer: widget.contact.type == advTypeRoom,
|
||||
isRoomServer: resolvedContact.type == advTypeRoom,
|
||||
textScale: textScale,
|
||||
onTap: () => _openMessagePath(message, contact),
|
||||
onLongPress: () => _showMessageActions(message, contact),
|
||||
@@ -457,7 +496,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
return;
|
||||
}
|
||||
|
||||
connector.sendMessage(widget.contact, text);
|
||||
connector.sendMessage(_resolveContact(connector), text);
|
||||
_textController.clear();
|
||||
_textFieldFocusNode.requestFocus();
|
||||
}
|
||||
@@ -654,7 +693,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
|
||||
// Set the path override to persist user's choice
|
||||
await connector.setPathOverride(
|
||||
widget.contact,
|
||||
_resolveContact(connector),
|
||||
pathLen: pathLength,
|
||||
pathBytes: pathBytes,
|
||||
);
|
||||
@@ -663,7 +702,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
Navigator.pop(context);
|
||||
await _notifyPathSet(
|
||||
connector,
|
||||
widget.contact,
|
||||
_resolveContact(connector),
|
||||
pathBytes,
|
||||
path.hopCount,
|
||||
);
|
||||
@@ -722,7 +761,9 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
style: const TextStyle(fontSize: 11),
|
||||
),
|
||||
onTap: () async {
|
||||
await connector.clearContactPath(widget.contact);
|
||||
await connector.clearContactPath(
|
||||
_resolveContact(connector),
|
||||
);
|
||||
if (!context.mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
@@ -750,7 +791,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
),
|
||||
onTap: () async {
|
||||
await connector.setPathOverride(
|
||||
widget.contact,
|
||||
_resolveContact(connector),
|
||||
pathLen: -1,
|
||||
);
|
||||
if (!context.mounted) return;
|
||||
@@ -818,6 +859,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
title: context.l10n.contacts_repeaterPathTrace,
|
||||
path: Uint8List.fromList(pathBytes),
|
||||
flipPathRound: true,
|
||||
targetContact: widget.contact,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1004,11 +1046,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
);
|
||||
|
||||
if (result == null) {
|
||||
appLogger.info(
|
||||
'PathSelectionDialog was cancelled or returned null',
|
||||
tag: 'ChatScreen',
|
||||
);
|
||||
return;
|
||||
return; // Cancelled — keep existing path
|
||||
}
|
||||
|
||||
if (!mounted) {
|
||||
@@ -1024,14 +1062,19 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
tag: 'ChatScreen',
|
||||
);
|
||||
await connector.setPathOverride(
|
||||
widget.contact,
|
||||
_resolveContact(connector),
|
||||
pathLen: result.length,
|
||||
pathBytes: result,
|
||||
);
|
||||
appLogger.info('setPathOverride completed', tag: 'ChatScreen');
|
||||
|
||||
if (!mounted) return;
|
||||
await _notifyPathSet(connector, widget.contact, result, result.length);
|
||||
await _notifyPathSet(
|
||||
connector,
|
||||
_resolveContact(connector),
|
||||
result,
|
||||
result.length,
|
||||
);
|
||||
}
|
||||
|
||||
void _openMessagePath(Message message, Contact contact) {
|
||||
@@ -1043,10 +1086,10 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
final String senderName;
|
||||
if (message.isOutgoing) {
|
||||
senderName = connector.selfName ?? context.l10n.chat_me;
|
||||
} else if (widget.contact.type == advTypeRoom) {
|
||||
} else if (_resolveContact(connector).type == advTypeRoom) {
|
||||
senderName = "${contact.name} [$fourByteHex]";
|
||||
} else {
|
||||
senderName = widget.contact.name;
|
||||
senderName = _resolveContact(connector).name;
|
||||
}
|
||||
final pathMessage = ChannelMessage(
|
||||
senderKey: null,
|
||||
@@ -1109,7 +1152,8 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
_retryMessage(message);
|
||||
},
|
||||
),
|
||||
if (widget.contact.type == advTypeRoom)
|
||||
if (_resolveContact(context.read<MeshCoreConnector>()).type ==
|
||||
advTypeRoom)
|
||||
ListTile(
|
||||
leading: const Icon(Icons.chat),
|
||||
title: Text(context.l10n.contacts_openChat),
|
||||
@@ -1147,7 +1191,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
void _retryMessage(Message message) {
|
||||
final connector = Provider.of<MeshCoreConnector>(context, listen: false);
|
||||
// Retry using the contact's current path override setting
|
||||
connector.sendMessage(widget.contact, message.text);
|
||||
connector.sendMessage(_resolveContact(connector), message.text);
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(context.l10n.chat_retryingMessage)));
|
||||
@@ -1173,7 +1217,8 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
|
||||
// For room servers, include sender name (like channels) since multiple users
|
||||
// For 1:1 chats, sender is implicit (null)
|
||||
final senderName = widget.contact.type == advTypeRoom
|
||||
final liveContact = _resolveContact(connector);
|
||||
final senderName = liveContact.type == advTypeRoom
|
||||
? senderContact.name
|
||||
: null;
|
||||
final hash = ReactionHelper.computeReactionHash(
|
||||
@@ -1182,7 +1227,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
message.text,
|
||||
);
|
||||
final reactionText = 'r:$hash:$emojiIndex';
|
||||
connector.sendMessage(widget.contact, reactionText);
|
||||
connector.sendMessage(_resolveContact(connector), reactionText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
|
||||
class ChromeRequiredScreen extends StatelessWidget {
|
||||
const ChromeRequiredScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
final theme = Theme.of(context);
|
||||
final isDark = theme.brightness == Brightness.dark;
|
||||
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: isDark
|
||||
? [const Color(0xFF1A1A1A), const Color(0xFF0D0D0D)]
|
||||
: [const Color(0xFFF5F7FA), const Color(0xFFE4E7EB)],
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.orange.withValues(alpha: 0.1),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.browser_not_supported_rounded,
|
||||
size: 80,
|
||||
color: Colors.orange,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
Text(
|
||||
l10n.scanner_chromeRequired,
|
||||
textAlign: TextAlign.center,
|
||||
style: theme.textTheme.headlineMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: isDark ? Colors.white : Colors.black87,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
l10n.scanner_chromeRequiredMessage,
|
||||
textAlign: TextAlign.center,
|
||||
style: theme.textTheme.bodyLarge?.copyWith(
|
||||
color: isDark ? Colors.white70 : Colors.black54,
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 48),
|
||||
// We can't really "fix" it for them other than telling them to use Chrome
|
||||
// but we can provide a nice visual.
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blue.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(color: Colors.blue.withValues(alpha: 0.3)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.info_outline, size: 20, color: Colors.blue),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
"Web Bluetooth requires a Chromium browser",
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
color: Colors.blue,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,9 @@ class _CommunityQrScannerScreenState extends State<CommunityQrScannerScreen> {
|
||||
_isProcessing = true;
|
||||
});
|
||||
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
_communityStore.setPublicKeyHex = connector.selfPublicKeyHex;
|
||||
|
||||
try {
|
||||
// Parse the community data
|
||||
final community = Community.fromQrData(const Uuid().v4(), data);
|
||||
@@ -209,6 +212,8 @@ class _CommunityQrScannerScreenState extends State<CommunityQrScannerScreen> {
|
||||
bool addPublicChannel,
|
||||
) async {
|
||||
// Save community to local storage
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
_communityStore.setPublicKeyHex = connector.selfPublicKeyHex;
|
||||
await _communityStore.addCommunity(community);
|
||||
|
||||
// Optionally add the community public channel to the device
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:meshcore_open/screens/path_trace_map.dart';
|
||||
import 'package:meshcore_open/services/notification_service.dart';
|
||||
import 'package:meshcore_open/utils/app_logger.dart';
|
||||
import 'package:meshcore_open/widgets/app_bar.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@@ -26,6 +27,7 @@ import '../widgets/room_login_dialog.dart';
|
||||
import '../widgets/unread_badge.dart';
|
||||
import 'channels_screen.dart';
|
||||
import 'chat_screen.dart';
|
||||
import 'discovery_screen.dart';
|
||||
import 'map_screen.dart';
|
||||
import 'repeater_hub_screen.dart';
|
||||
import 'settings_screen.dart';
|
||||
@@ -63,6 +65,13 @@ class _ContactsScreenState extends State<ContactsScreen>
|
||||
super.initState();
|
||||
_loadGroups();
|
||||
_setupFrameListener();
|
||||
_clearAdvertNotifications();
|
||||
}
|
||||
|
||||
void _clearAdvertNotifications() {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final contactIds = connector.contacts.map((c) => c.publicKeyHex).toList();
|
||||
NotificationService().clearAdvertNotifications(contactIds);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -218,9 +227,10 @@ class _ContactsScreenState extends State<ContactsScreen>
|
||||
}
|
||||
final hexString = text.substring('meshcore://'.length);
|
||||
try {
|
||||
final importContactFrame = buildImportContactFrame(hexString);
|
||||
final bytes = hex2Uint8List(hexString);
|
||||
final importContactFrame = buildImportContactFrame(bytes);
|
||||
_pendingOperations.add(ContactOperationType.import);
|
||||
await connector.sendFrame(importContactFrame, expectsGenericAck: true);
|
||||
connector.importContact(importContactFrame);
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
@@ -318,6 +328,21 @@ class _ContactsScreenState extends State<ContactsScreen>
|
||||
),
|
||||
onTap: () => _disconnect(context, connector),
|
||||
),
|
||||
PopupMenuItem(
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.person_add_rounded),
|
||||
const SizedBox(width: 8),
|
||||
Text("Discovered Contacts"),
|
||||
],
|
||||
),
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const DiscoveryScreen(),
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -384,8 +409,15 @@ class _ContactsScreenState extends State<ContactsScreen>
|
||||
|
||||
Widget _buildContactsBody(BuildContext context, MeshCoreConnector connector) {
|
||||
final contacts = connector.contacts;
|
||||
final shouldShowStartupSpinner =
|
||||
contacts.isEmpty &&
|
||||
_groups.isEmpty &&
|
||||
connector.isConnected &&
|
||||
(connector.isLoadingContacts ||
|
||||
connector.isLoadingChannels ||
|
||||
connector.selfPublicKey == null);
|
||||
|
||||
if (contacts.isEmpty && connector.isLoadingContacts && _groups.isEmpty) {
|
||||
if (shouldShowStartupSpinner) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
|
||||
@@ -1114,6 +1146,7 @@ class _ContactsScreenState extends State<ContactsScreen>
|
||||
contact.name,
|
||||
),
|
||||
path: contact.traceRouteBytes ?? Uint8List(0),
|
||||
targetContact: contact,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,420 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../connector/meshcore_connector.dart';
|
||||
import '../connector/meshcore_protocol.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
import '../models/contact.dart';
|
||||
import '../utils/contact_search.dart';
|
||||
import '../widgets/app_bar.dart';
|
||||
import '../widgets/list_filter_widget.dart';
|
||||
|
||||
enum DiscoverySortOption { lastSeen, name, type }
|
||||
|
||||
class DiscoveryScreen extends StatefulWidget {
|
||||
const DiscoveryScreen({super.key});
|
||||
|
||||
@override
|
||||
State<DiscoveryScreen> createState() => _DiscoveryScreenState();
|
||||
}
|
||||
|
||||
class _DiscoveryScreenState extends State<DiscoveryScreen> {
|
||||
final TextEditingController _searchController = TextEditingController();
|
||||
String searchQuery = '';
|
||||
ContactSortOption sortOption = ContactSortOption.lastSeen;
|
||||
bool showUnreadOnly = false;
|
||||
ContactTypeFilter typeFilter = ContactTypeFilter.all;
|
||||
DiscoverySortOption discoverySortOption = DiscoverySortOption.lastSeen;
|
||||
Timer? _searchDebounce;
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_searchController.dispose();
|
||||
_searchDebounce?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
final connector = context.watch<MeshCoreConnector>();
|
||||
|
||||
final discoveredContacts = connector.discoveredContacts;
|
||||
final filteredAndSorted = _filterAndSortContacts(
|
||||
discoveredContacts,
|
||||
connector,
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: AppBarTitle(
|
||||
l10n.discoveredContacts_Title,
|
||||
indicators: false,
|
||||
subtitle: false,
|
||||
),
|
||||
centerTitle: true,
|
||||
actions: [
|
||||
PopupMenuButton(
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.delete, color: Colors.red),
|
||||
const SizedBox(width: 8),
|
||||
Text(context.l10n.discoveredContacts_deleteContactAll),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
_deleteContacts(context, connector);
|
||||
},
|
||||
),
|
||||
],
|
||||
icon: const Icon(Icons.more_vert),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
_buildFilters(filteredAndSorted, connector),
|
||||
Expanded(
|
||||
child: discoveredContacts.isEmpty
|
||||
? Center(child: Text(l10n.contacts_noContacts))
|
||||
: filteredAndSorted.isEmpty
|
||||
? Center(child: Text(l10n.discoveredContacts_noMatching))
|
||||
: ListView.builder(
|
||||
itemCount: filteredAndSorted.length,
|
||||
itemBuilder: (context, index) {
|
||||
final contact = filteredAndSorted[index];
|
||||
return ListTile(
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: _getTypeColor(contact.type),
|
||||
child: Icon(
|
||||
_getTypeIcon(contact.type),
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
title: Text(
|
||||
contact.name,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
subtitle: Text(
|
||||
contact.shortPubKeyHex,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
trailing: Text(
|
||||
_formatLastSeen(context, contact.lastSeen),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
connector.importDiscoveredContact(contact);
|
||||
},
|
||||
onLongPress: () =>
|
||||
_showContactContextMenu(contact, connector),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _showContactContextMenu(
|
||||
Contact contact,
|
||||
MeshCoreConnector connector,
|
||||
) async {
|
||||
final action = await showModalBottomSheet<String>(
|
||||
context: context,
|
||||
showDragHandle: true,
|
||||
builder: (sheetContext) {
|
||||
final l10n = context.l10n;
|
||||
return SafeArea(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.add_reaction_sharp),
|
||||
title: Text(l10n.discoveredContacts_addContact),
|
||||
onTap: () => Navigator.of(sheetContext).pop('import_contact'),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.copy),
|
||||
title: Text(l10n.discoveredContacts_copyContact),
|
||||
onTap: () => Navigator.of(sheetContext).pop('copy_contact'),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.delete),
|
||||
title: Text(l10n.discoveredContacts_deleteContact),
|
||||
onTap: () => Navigator.of(sheetContext).pop('delete_contact'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
if (!mounted || action == null) return;
|
||||
|
||||
switch (action) {
|
||||
case 'import_contact':
|
||||
connector.importDiscoveredContact(contact);
|
||||
break;
|
||||
case 'copy_contact':
|
||||
if (contact.rawPacket == null) return;
|
||||
final hexString = pubKeyToHex(contact.rawPacket!);
|
||||
Clipboard.setData(ClipboardData(text: "meshcore://$hexString"));
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(context.l10n.contacts_contactAdvertCopied)),
|
||||
);
|
||||
break;
|
||||
case 'delete_contact':
|
||||
connector.removeDiscoveredContact(contact);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void _deleteContacts(BuildContext context, MeshCoreConnector connector) {
|
||||
final l10n = context.l10n;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(l10n.common_deleteAll),
|
||||
content: Text(l10n.discoveredContacts_deleteContactAllContent),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(l10n.common_cancel),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
connector.removeAllDiscoveredContacts();
|
||||
},
|
||||
child: Text(l10n.common_deleteAll),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFilters(
|
||||
List<Contact> filteredAndSorted,
|
||||
MeshCoreConnector connector,
|
||||
) {
|
||||
String hintText = "";
|
||||
switch (typeFilter) {
|
||||
case ContactTypeFilter.all:
|
||||
hintText = context.l10n.contacts_searchContacts(
|
||||
filteredAndSorted.length,
|
||||
showUnreadOnly ? " ${context.l10n.contacts_unread}" : "",
|
||||
);
|
||||
break;
|
||||
case ContactTypeFilter.users:
|
||||
hintText = context.l10n.contacts_searchUsers(
|
||||
filteredAndSorted.length,
|
||||
showUnreadOnly ? " ${context.l10n.contacts_unread}" : "",
|
||||
);
|
||||
break;
|
||||
case ContactTypeFilter.repeaters:
|
||||
hintText = context.l10n.contacts_searchRepeaters(
|
||||
filteredAndSorted.length,
|
||||
showUnreadOnly ? " ${context.l10n.contacts_unread}" : "",
|
||||
);
|
||||
break;
|
||||
case ContactTypeFilter.rooms:
|
||||
hintText = context.l10n.contacts_searchRoomServers(
|
||||
filteredAndSorted.length,
|
||||
showUnreadOnly ? " ${context.l10n.contacts_unread}" : "",
|
||||
);
|
||||
break;
|
||||
case ContactTypeFilter.favorites:
|
||||
hintText = context.l10n.contacts_searchFavorites(
|
||||
filteredAndSorted.length,
|
||||
showUnreadOnly ? " ${context.l10n.contacts_unread}" : "",
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText,
|
||||
prefixIcon: const Icon(Icons.search),
|
||||
suffixIcon: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (searchQuery.isNotEmpty)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.clear),
|
||||
onPressed: () {
|
||||
_searchController.clear();
|
||||
setState(() {
|
||||
searchQuery = '';
|
||||
});
|
||||
},
|
||||
),
|
||||
_buildFilterButton(context, connector),
|
||||
],
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 12,
|
||||
),
|
||||
),
|
||||
onChanged: (value) {
|
||||
_searchDebounce?.cancel();
|
||||
_searchDebounce = Timer(const Duration(milliseconds: 300), () {
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
searchQuery = value.toLowerCase();
|
||||
});
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFilterButton(BuildContext context, MeshCoreConnector connector) {
|
||||
return DiscoveryContactsFilterMenu(
|
||||
sortOption: sortOption,
|
||||
typeFilter: typeFilter,
|
||||
onSortChanged: (value) {
|
||||
setState(() {
|
||||
sortOption = value;
|
||||
});
|
||||
},
|
||||
onTypeFilterChanged: (value) {
|
||||
setState(() {
|
||||
typeFilter = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
List<Contact> _filterAndSortContacts(
|
||||
List<Contact> contacts,
|
||||
MeshCoreConnector connector,
|
||||
) {
|
||||
var filtered = contacts.where((contact) {
|
||||
if (searchQuery.isEmpty) return true;
|
||||
return matchesDiscoveryContactQuery(contact, searchQuery);
|
||||
}).toList();
|
||||
|
||||
filtered = filtered.where((contact) {
|
||||
return !connector.knownContactKeys.contains(contact.publicKeyHex);
|
||||
}).toList();
|
||||
|
||||
// Filter out own node from the list
|
||||
if (connector.selfPublicKey != null) {
|
||||
final selfPubKeyHex = pubKeyToHex(connector.selfPublicKey!);
|
||||
filtered = filtered.where((contact) {
|
||||
return contact.publicKeyHex != selfPubKeyHex;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
if (typeFilter != ContactTypeFilter.all) {
|
||||
filtered = filtered.where(_matchesTypeFilter).toList();
|
||||
}
|
||||
|
||||
switch (sortOption) {
|
||||
case ContactSortOption.lastSeen:
|
||||
filtered.sort((a, b) => b.lastSeen.compareTo(a.lastSeen));
|
||||
break;
|
||||
case ContactSortOption.name:
|
||||
filtered.sort(
|
||||
(a, b) => a.name.toLowerCase().compareTo(b.name.toLowerCase()),
|
||||
);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return filtered;
|
||||
}
|
||||
|
||||
bool _matchesTypeFilter(Contact contact) {
|
||||
switch (typeFilter) {
|
||||
case ContactTypeFilter.all:
|
||||
return true;
|
||||
case ContactTypeFilter.users:
|
||||
return contact.type == advTypeChat;
|
||||
case ContactTypeFilter.repeaters:
|
||||
return contact.type == advTypeRepeater;
|
||||
case ContactTypeFilter.rooms:
|
||||
return contact.type == advTypeRoom;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
IconData _getTypeIcon(int type) {
|
||||
switch (type) {
|
||||
case advTypeChat:
|
||||
return Icons.chat;
|
||||
case advTypeRepeater:
|
||||
return Icons.cell_tower;
|
||||
case advTypeRoom:
|
||||
return Icons.group;
|
||||
case advTypeSensor:
|
||||
return Icons.sensors;
|
||||
default:
|
||||
return Icons.device_unknown;
|
||||
}
|
||||
}
|
||||
|
||||
Color _getTypeColor(int type) {
|
||||
switch (type) {
|
||||
case advTypeChat:
|
||||
return Colors.blue;
|
||||
case advTypeRepeater:
|
||||
return Colors.orange;
|
||||
case advTypeRoom:
|
||||
return Colors.purple;
|
||||
case advTypeSensor:
|
||||
return Colors.green;
|
||||
default:
|
||||
return Colors.grey;
|
||||
}
|
||||
}
|
||||
|
||||
String _formatLastSeen(BuildContext context, DateTime lastSeen) {
|
||||
final now = DateTime.now();
|
||||
final diff = now.difference(lastSeen);
|
||||
|
||||
if (diff.isNegative || diff.inMinutes < 5) {
|
||||
return context.l10n.contacts_lastSeenNow;
|
||||
}
|
||||
if (diff.inMinutes < 60) {
|
||||
return context.l10n.contacts_lastSeenMinsAgo(diff.inMinutes);
|
||||
}
|
||||
if (diff.inHours < 24) {
|
||||
final hours = diff.inHours;
|
||||
return hours == 1
|
||||
? context.l10n.contacts_lastSeenHourAgo
|
||||
: context.l10n.contacts_lastSeenHoursAgo(hours);
|
||||
}
|
||||
final days = diff.inDays;
|
||||
return days == 1
|
||||
? context.l10n.contacts_lastSeenDayAgo
|
||||
: context.l10n.contacts_lastSeenDaysAgo(days);
|
||||
}
|
||||
}
|
||||
+386
-12
@@ -1,6 +1,7 @@
|
||||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
@@ -15,6 +16,7 @@ import '../models/app_settings.dart';
|
||||
import '../models/channel.dart';
|
||||
import '../models/contact.dart';
|
||||
import '../services/app_settings_service.dart';
|
||||
import '../services/path_history_service.dart';
|
||||
import '../services/map_marker_service.dart';
|
||||
import '../services/map_tile_cache_service.dart';
|
||||
import '../utils/contact_search.dart';
|
||||
@@ -49,7 +51,8 @@ class MapScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MapScreenState extends State<MapScreen> {
|
||||
static const double _labelZoomThreshold = 8.5;
|
||||
// Zoom level at which node labels start to appear
|
||||
static const double _labelZoomThreshold = 12.0;
|
||||
|
||||
final MapController _mapController = MapController();
|
||||
final MapMarkerService _markerService = MapMarkerService();
|
||||
@@ -64,6 +67,8 @@ class _MapScreenState extends State<MapScreen> {
|
||||
final List<Polyline> _polylines = [];
|
||||
bool _legendExpanded = false;
|
||||
bool _showNodeLabels = true;
|
||||
List<_GuessedLocation> _cachedGuessedLocations = [];
|
||||
String _guessedLocationsCacheKey = '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -88,6 +93,15 @@ class _MapScreenState extends State<MapScreen> {
|
||||
});
|
||||
}
|
||||
|
||||
bool _checkLocationPlausibility(double lat, double lon) {
|
||||
const double epsilon = 1e-6;
|
||||
return (lat.abs() > epsilon || lon.abs() > epsilon) &&
|
||||
lat >= -90.0 &&
|
||||
lat <= 90.0 &&
|
||||
lon >= -180.0 &&
|
||||
lon <= 180.0;
|
||||
}
|
||||
|
||||
double _standardDeviation(List<double> values) {
|
||||
if (values.length <= 1) {
|
||||
return 0.0;
|
||||
@@ -119,11 +133,19 @@ class _MapScreenState extends State<MapScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer2<MeshCoreConnector, AppSettingsService>(
|
||||
builder: (context, connector, settingsService, child) {
|
||||
return Consumer3<MeshCoreConnector, AppSettingsService, PathHistoryService>(
|
||||
builder: (context, connector, settingsService, pathHistory, child) {
|
||||
final tileCache = context.read<MapTileCacheService>();
|
||||
final settings = settingsService.settings;
|
||||
final contacts = connector.contacts;
|
||||
final allContacts = <Contact>[
|
||||
...connector.contacts,
|
||||
...connector.discoveredContacts.where((c) => !c.isActive),
|
||||
];
|
||||
|
||||
final contacts = settings.mapShowDiscoveryContacts
|
||||
? allContacts
|
||||
: allContacts.where((c) => c.isActive).toList();
|
||||
|
||||
final highlightPosition = widget.highlightPosition;
|
||||
final sharedMarkers = settings.mapShowMarkers
|
||||
? _collectSharedMarkers(connector)
|
||||
@@ -156,10 +178,51 @@ class _MapScreenState extends State<MapScreen> {
|
||||
: filteredByTime;
|
||||
|
||||
// Filter by location
|
||||
final contactsWithLocation = filteredByKeyPrefix
|
||||
.where((c) => c.hasLocation)
|
||||
final contactsWithLocation = filteredByKeyPrefix.where((c) {
|
||||
if (!c.hasLocation) {
|
||||
return false;
|
||||
}
|
||||
return _checkLocationPlausibility(c.latitude!, c.longitude!);
|
||||
}).toList();
|
||||
|
||||
// All contacts with a known location — used as anchors regardless of
|
||||
// time/key-prefix filters so that repeaters are always available.
|
||||
final allContactsWithLocation = allContacts
|
||||
.where(
|
||||
(c) =>
|
||||
c.hasLocation &&
|
||||
_checkLocationPlausibility(c.latitude!, c.longitude!),
|
||||
)
|
||||
.toList();
|
||||
|
||||
// Compute guessed locations with caching
|
||||
final maxRangeKm = _estimateLoRaRangeKm(connector);
|
||||
final filteredKeys = filteredByKeyPrefix
|
||||
.map((c) => '${c.publicKeyHex}:${c.path.join("-")}')
|
||||
.join(',');
|
||||
final anchorKeys = allContactsWithLocation
|
||||
.map(
|
||||
(c) =>
|
||||
'${c.publicKeyHex}:${c.latitude}:${c.longitude}:${c.path.isNotEmpty ? c.path.last : ""}',
|
||||
)
|
||||
.join(',');
|
||||
final cacheKey =
|
||||
'$filteredKeys|$anchorKeys|${pathHistory.version}:${connector.currentSf}:${connector.currentBwHz}:${connector.currentTxPower}:${settings.mapShowGuessedLocations}';
|
||||
if (cacheKey != _guessedLocationsCacheKey) {
|
||||
_guessedLocationsCacheKey = cacheKey;
|
||||
_cachedGuessedLocations = settings.mapShowGuessedLocations
|
||||
? _computeGuessedLocations(
|
||||
filteredByKeyPrefix,
|
||||
allContactsWithLocation,
|
||||
pathHistory,
|
||||
maxRangeKm,
|
||||
)
|
||||
: [];
|
||||
}
|
||||
final guessedLocations = settings.mapShowGuessedLocations
|
||||
? _cachedGuessedLocations
|
||||
: <_GuessedLocation>[];
|
||||
|
||||
_polylines.clear();
|
||||
_polylines.addAll(
|
||||
_points.length > 1
|
||||
@@ -430,6 +493,11 @@ class _MapScreenState extends State<MapScreen> {
|
||||
size: 34,
|
||||
),
|
||||
),
|
||||
if (!_isBuildingPathTrace)
|
||||
..._buildGuessedMarker(
|
||||
guessedLocations,
|
||||
showLabels: _showNodeLabels,
|
||||
),
|
||||
..._buildMarkers(
|
||||
contactsWithLocation,
|
||||
settings,
|
||||
@@ -489,6 +557,7 @@ class _MapScreenState extends State<MapScreen> {
|
||||
contactsWithLocation,
|
||||
settings,
|
||||
sharedMarkers.length,
|
||||
guessedLocations.length,
|
||||
),
|
||||
if (_isBuildingPathTrace) _buildPathTraceOverlay(),
|
||||
],
|
||||
@@ -512,6 +581,234 @@ class _MapScreenState extends State<MapScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
List<_GuessedLocation> _computeGuessedLocations(
|
||||
List<Contact> allContacts,
|
||||
List<Contact> withLocation,
|
||||
PathHistoryService pathHistory,
|
||||
double? maxRangeKm,
|
||||
) {
|
||||
// Index known-location repeaters by their 1-byte hash.
|
||||
// null value = two repeaters share the same hash byte (ambiguous collision).
|
||||
final repeaterByHash = <int, Contact?>{};
|
||||
for (final c in withLocation) {
|
||||
if (c.type == advTypeRepeater) {
|
||||
if (repeaterByHash.containsKey(c.publicKey[0])) {
|
||||
repeaterByHash[c.publicKey[0]] =
|
||||
null; // collision: can't disambiguate
|
||||
} else {
|
||||
repeaterByHash[c.publicKey[0]] = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final result = <_GuessedLocation>[];
|
||||
|
||||
for (final contact in allContacts) {
|
||||
if (contact.hasLocation) continue;
|
||||
|
||||
final anchorSet = <LatLng>{};
|
||||
|
||||
// Collect the contact-side (last-hop) repeater from every known path.
|
||||
// path = [device-side hop, ..., contact-side hop]
|
||||
// Only path.last is actually within radio range of the contact — using
|
||||
// earlier bytes would anchor against our own side of the network.
|
||||
final pathSets = <List<int>>[
|
||||
contact.path.toList(),
|
||||
...pathHistory
|
||||
.getRecentPaths(contact.publicKeyHex)
|
||||
.map((r) => r.pathBytes),
|
||||
];
|
||||
final lastHopBytes = <int>{};
|
||||
for (final pathBytes in pathSets) {
|
||||
if (pathBytes.isEmpty) continue;
|
||||
final lastHop = pathBytes.last;
|
||||
lastHopBytes.add(lastHop);
|
||||
final r = repeaterByHash[lastHop];
|
||||
if (r != null) anchorSet.add(LatLng(r.latitude!, r.longitude!));
|
||||
}
|
||||
|
||||
// Fallback: for any last-hop byte with no GPS repeater, average the
|
||||
// positions of contacts with known GPS that share the same last hop.
|
||||
// Those contacts are all adjacent to the same unknown repeater, so their
|
||||
// centroid is a reasonable proxy for its location.
|
||||
for (final byte in lastHopBytes) {
|
||||
if (repeaterByHash.containsKey(byte)) continue;
|
||||
for (final c in withLocation) {
|
||||
if (c.path.isNotEmpty && c.path.last == byte) {
|
||||
anchorSet.add(LatLng(c.latitude!, c.longitude!));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Filter anchors that are geometrically inconsistent with radio range.
|
||||
// Two anchors more than 2 * maxRange apart cannot both be in direct radio
|
||||
// range of the same node, so isolated outliers are removed.
|
||||
final anchors = maxRangeKm != null && anchorSet.length > 1
|
||||
? _filterConsistentAnchors(anchorSet.toList(), maxRangeKm)
|
||||
: anchorSet.toList();
|
||||
|
||||
if (anchors.isEmpty) continue;
|
||||
|
||||
final LatLng position;
|
||||
if (anchors.length == 1) {
|
||||
// Offset single-anchor guesses so they don't overlap the repeater marker.
|
||||
// Use the contact's public key byte as a deterministic angle seed.
|
||||
const offsetDeg = 0.003; // ~330 m at the equator
|
||||
final angle = (contact.publicKey[1] / 255.0) * 2 * pi;
|
||||
position = LatLng(
|
||||
anchors[0].latitude + offsetDeg * cos(angle),
|
||||
anchors[0].longitude + offsetDeg * sin(angle),
|
||||
);
|
||||
|
||||
if (!_checkLocationPlausibility(
|
||||
position.latitude,
|
||||
position.longitude,
|
||||
)) {
|
||||
continue; // discard implausible guesses near (0, 0)
|
||||
}
|
||||
} else {
|
||||
double lat = 0, lon = 0;
|
||||
for (final a in anchors) {
|
||||
lat += a.latitude;
|
||||
lon += a.longitude;
|
||||
}
|
||||
position = LatLng(lat / anchors.length, lon / anchors.length);
|
||||
if (!_checkLocationPlausibility(
|
||||
position.latitude,
|
||||
position.longitude,
|
||||
)) {
|
||||
continue; // discard implausible guesses near (0, 0
|
||||
}
|
||||
}
|
||||
result.add(
|
||||
_GuessedLocation(
|
||||
contact: contact,
|
||||
position: position,
|
||||
highConfidence: anchors.length >= 2,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Estimates the free-space maximum LoRa range in km from the connected
|
||||
/// device's current radio parameters. Returns null if parameters are unknown.
|
||||
double? _estimateLoRaRangeKm(MeshCoreConnector connector) {
|
||||
final freqHz = connector.currentFreqHz;
|
||||
final bwHz = connector.currentBwHz;
|
||||
final sf = connector.currentSf;
|
||||
final txPower = connector.currentTxPower;
|
||||
if (freqHz == null || bwHz == null || sf == null || txPower == null) {
|
||||
return null;
|
||||
}
|
||||
// LoRa receiver sensitivity = thermal noise + NF + required demod SNR
|
||||
const noiseFigureDb = 6.0;
|
||||
final thermalNoiseDbm = -174.0 + 10 * log(bwHz.toDouble()) / ln10;
|
||||
final sensitivityDbm =
|
||||
thermalNoiseDbm + noiseFigureDb + _sfToRequiredSnrDb(sf);
|
||||
// FSPL at max range equals link budget:
|
||||
// FSPL = 20*log10(d_m) + 20*log10(f_hz) - 147.55
|
||||
final linkBudgetDb = txPower.toDouble() - sensitivityDbm;
|
||||
final exponent =
|
||||
(linkBudgetDb + 147.55 - 20 * log(freqHz.toDouble()) / ln10) / 20;
|
||||
return pow(10, exponent) / 1000;
|
||||
}
|
||||
|
||||
double _sfToRequiredSnrDb(int sf) {
|
||||
switch (sf) {
|
||||
case 5:
|
||||
return -2.5;
|
||||
case 6:
|
||||
return -5.0;
|
||||
case 7:
|
||||
return -7.5;
|
||||
case 8:
|
||||
return -10.0;
|
||||
case 9:
|
||||
return -12.5;
|
||||
case 10:
|
||||
return -15.0;
|
||||
case 11:
|
||||
return -17.5;
|
||||
case 12:
|
||||
return -20.0;
|
||||
default:
|
||||
return -10.0;
|
||||
}
|
||||
}
|
||||
|
||||
/// Removes anchors that have no neighbour within 2 * maxRangeKm.
|
||||
/// A node cannot be simultaneously in radio range of two points farther apart
|
||||
/// than twice the expected maximum range.
|
||||
List<LatLng> _filterConsistentAnchors(
|
||||
List<LatLng> anchors,
|
||||
double maxRangeKm,
|
||||
) {
|
||||
const distance = Distance();
|
||||
final maxDistM = maxRangeKm * 2000;
|
||||
return anchors
|
||||
.where((a) => anchors.any((b) => b != a && distance(a, b) <= maxDistM))
|
||||
.toList();
|
||||
}
|
||||
|
||||
List<Marker> _buildGuessedMarker(
|
||||
List<_GuessedLocation> guessed, {
|
||||
required bool showLabels,
|
||||
}) {
|
||||
final markers = <Marker>[];
|
||||
|
||||
for (final guess in guessed) {
|
||||
final color = _getNodeColor(guess.contact.type);
|
||||
final marker = Marker(
|
||||
point: guess.position,
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: GestureDetector(
|
||||
onTap: () => _showNodeInfo(
|
||||
context,
|
||||
guess.contact,
|
||||
guessedPosition: guess.position,
|
||||
),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: color.withValues(
|
||||
alpha: guess.highConfidence ? 0.55 : 0.30,
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Colors.white, width: 2),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.3),
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.not_listed_location,
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
markers.add(marker);
|
||||
|
||||
if (showLabels) {
|
||||
markers.add(
|
||||
_buildNodeLabelMarker(
|
||||
point: guess.position,
|
||||
label: guess.contact.name,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
return markers;
|
||||
}
|
||||
|
||||
List<Marker> _buildMarkers(
|
||||
List<Contact> contacts,
|
||||
settings, {
|
||||
@@ -657,6 +954,7 @@ class _MapScreenState extends State<MapScreen> {
|
||||
List<Contact> contactsWithLocation,
|
||||
settings,
|
||||
int markerCount,
|
||||
int guessedCount,
|
||||
) {
|
||||
int nodeCount = 0;
|
||||
for (final contact in contactsWithLocation) {
|
||||
@@ -696,7 +994,12 @@ class _MapScreenState extends State<MapScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context.l10n.map_nodesCount(nodeCount),
|
||||
context.l10n.map_nodesCount(
|
||||
nodeCount +
|
||||
(settings.mapShowGuessedLocations
|
||||
? guessedCount
|
||||
: 0),
|
||||
),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
@@ -764,6 +1067,12 @@ class _MapScreenState extends State<MapScreen> {
|
||||
context.l10n.map_pinPublic,
|
||||
Colors.orange,
|
||||
),
|
||||
if (settings.mapShowGuessedLocations && guessedCount > 0)
|
||||
_buildLegendItem(
|
||||
Icons.not_listed_location,
|
||||
context.l10n.map_guessedLocation,
|
||||
Colors.grey,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -952,7 +1261,12 @@ class _MapScreenState extends State<MapScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
void _showNodeInfo(BuildContext context, Contact contact) {
|
||||
void _showNodeInfo(
|
||||
BuildContext context,
|
||||
Contact contact, {
|
||||
LatLng? guessedPosition,
|
||||
}) {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (dialogContext) => AlertDialog(
|
||||
@@ -972,10 +1286,16 @@ class _MapScreenState extends State<MapScreen> {
|
||||
children: [
|
||||
_buildInfoRow('Type', contact.typeLabel),
|
||||
_buildInfoRow('Path', contact.pathLabel),
|
||||
_buildInfoRow(
|
||||
'Location',
|
||||
'${contact.latitude!.toStringAsFixed(6)}, ${contact.longitude!.toStringAsFixed(6)}',
|
||||
),
|
||||
if (contact.hasLocation)
|
||||
_buildInfoRow(
|
||||
'Location',
|
||||
'${contact.latitude!.toStringAsFixed(6)}, ${contact.longitude!.toStringAsFixed(6)}',
|
||||
)
|
||||
else if (guessedPosition != null)
|
||||
_buildInfoRow(
|
||||
'Est. Location',
|
||||
'~${guessedPosition.latitude.toStringAsFixed(6)}, ${guessedPosition.longitude.toStringAsFixed(6)}',
|
||||
),
|
||||
_buildInfoRow(
|
||||
context.l10n.map_lastSeen,
|
||||
_formatLastSeen(contact.lastSeen),
|
||||
@@ -992,6 +1312,9 @@ class _MapScreenState extends State<MapScreen> {
|
||||
advTypeChat) // Only show chat button for chat nodes
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
if (!contact.isActive) {
|
||||
connector.importDiscoveredContact(contact);
|
||||
}
|
||||
Navigator.pop(dialogContext);
|
||||
Navigator.push(
|
||||
context,
|
||||
@@ -1005,6 +1328,9 @@ class _MapScreenState extends State<MapScreen> {
|
||||
if (contact.type == advTypeRepeater)
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
if (!contact.isActive) {
|
||||
connector.importDiscoveredContact(contact);
|
||||
}
|
||||
Navigator.pop(dialogContext);
|
||||
_showRepeaterLogin(context, contact);
|
||||
},
|
||||
@@ -1013,6 +1339,9 @@ class _MapScreenState extends State<MapScreen> {
|
||||
if (contact.type == advTypeRoom)
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
if (!contact.isActive) {
|
||||
connector.importDiscoveredContact(contact);
|
||||
}
|
||||
Navigator.pop(dialogContext);
|
||||
_showRoomLogin(context, contact);
|
||||
},
|
||||
@@ -1180,6 +1509,23 @@ class _MapScreenState extends State<MapScreen> {
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.my_location),
|
||||
title: Text(context.l10n.map_setAsMyLocation),
|
||||
onTap: () async {
|
||||
final messenger = ScaffoldMessenger.of(context);
|
||||
final successMsg = context.l10n.settings_locationUpdated;
|
||||
Navigator.pop(sheetContext);
|
||||
if (!connector.isConnected) return;
|
||||
await connector.setNodeLocation(
|
||||
lat: position.latitude,
|
||||
lon: position.longitude,
|
||||
);
|
||||
await connector.refreshDeviceInfo();
|
||||
if (!mounted) return;
|
||||
messenger.showSnackBar(SnackBar(content: Text(successMsg)));
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.close),
|
||||
title: Text(context.l10n.common_cancel),
|
||||
@@ -1481,6 +1827,22 @@ class _MapScreenState extends State<MapScreen> {
|
||||
},
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
CheckboxListTile(
|
||||
title: Text(context.l10n.map_showGuessedLocations),
|
||||
value: settings.mapShowGuessedLocations,
|
||||
onChanged: (value) {
|
||||
service.setMapShowGuessedLocations(value ?? true);
|
||||
},
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
CheckboxListTile(
|
||||
title: Text(context.l10n.map_showDiscoveryContacts),
|
||||
value: settings.mapShowDiscoveryContacts,
|
||||
onChanged: (value) {
|
||||
service.setMapShowDiscoveryContacts(value ?? true);
|
||||
},
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
context.l10n.map_keyPrefix,
|
||||
@@ -1744,6 +2106,18 @@ class _MapScreenState extends State<MapScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
class _GuessedLocation {
|
||||
final Contact contact;
|
||||
final LatLng position;
|
||||
final bool highConfidence;
|
||||
|
||||
_GuessedLocation({
|
||||
required this.contact,
|
||||
required this.position,
|
||||
required this.highConfidence,
|
||||
});
|
||||
}
|
||||
|
||||
class _MarkerPayload {
|
||||
final LatLng position;
|
||||
final String label;
|
||||
|
||||
@@ -124,12 +124,14 @@ class _NeighborsScreenState extends State<NeighborsScreen> {
|
||||
|
||||
void _handleNeighborsResponse(MeshCoreConnector connector, Uint8List frame) {
|
||||
final buffer = BufferReader(frame);
|
||||
final contacts = <Contact>[
|
||||
...connector.contacts,
|
||||
...connector.discoveredContacts,
|
||||
];
|
||||
try {
|
||||
final neighborCount = buffer.readUInt16LE();
|
||||
final parsedNeighbors = parseNeighborsData(buffer, buffer.readUInt16LE());
|
||||
connector.contacts.where((c) => c.type == advTypeRepeater).forEach((
|
||||
repeater,
|
||||
) {
|
||||
contacts.where((c) => c.type == advTypeRepeater).forEach((repeater) {
|
||||
for (var neighborData in parsedNeighbors) {
|
||||
final publicKey = neighborData['publicKey'];
|
||||
if (listEquals(
|
||||
|
||||
+177
-25
@@ -54,6 +54,7 @@ class PathTraceMapScreen extends StatefulWidget {
|
||||
final int? repeaterId;
|
||||
final bool flipPathRound;
|
||||
final bool reversePathRound;
|
||||
final Contact? targetContact;
|
||||
|
||||
const PathTraceMapScreen({
|
||||
super.key,
|
||||
@@ -62,6 +63,7 @@ class PathTraceMapScreen extends StatefulWidget {
|
||||
this.repeaterId,
|
||||
this.flipPathRound = false,
|
||||
this.reversePathRound = false,
|
||||
this.targetContact,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -78,6 +80,11 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
bool _failed2Loaded = false;
|
||||
bool _hasData = false;
|
||||
PathTraceData? _traceData;
|
||||
// Inferred positions for hops that have no GPS location, keyed by hop byte.
|
||||
Map<int, LatLng> _inferredHopPositions = {};
|
||||
// Endpoint position for the target contact (GPS or guessed).
|
||||
LatLng? _targetContactPosition;
|
||||
bool _targetContactIsGuessed = false;
|
||||
List<LatLng> _points = <LatLng>[];
|
||||
List<Polyline> _polylines = [];
|
||||
LatLng? _initialCenter = LatLng(0, 0);
|
||||
@@ -107,14 +114,37 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
Uint8List addReturnPath(Uint8List pathBytes) {
|
||||
Uint8List? traceBytes;
|
||||
final len = (pathBytes.length + pathBytes.length - 1);
|
||||
traceBytes = Uint8List(len);
|
||||
for (int i = 0; i < pathBytes.length; i++) {
|
||||
traceBytes[i] = pathBytes[i];
|
||||
if (i < pathBytes.length - 1) {
|
||||
traceBytes[len - 1 - i] = pathBytes[i];
|
||||
Uint8List buildPath(Uint8List pathBytes) {
|
||||
Uint8List traceBytes;
|
||||
|
||||
if (pathBytes.isEmpty) {
|
||||
traceBytes = Uint8List(1);
|
||||
traceBytes[0] = widget.targetContact?.publicKey[0] ?? 0;
|
||||
return traceBytes;
|
||||
}
|
||||
|
||||
if (widget.targetContact?.type == advTypeRepeater ||
|
||||
widget.targetContact?.type == advTypeRoom) {
|
||||
final len = (pathBytes.length + pathBytes.length + 1);
|
||||
traceBytes = Uint8List(len);
|
||||
traceBytes[pathBytes.length] = widget.targetContact?.publicKey[0] ?? 0;
|
||||
for (int i = 0; i < pathBytes.length; i++) {
|
||||
traceBytes[i] = pathBytes[i];
|
||||
if (i < pathBytes.length) {
|
||||
traceBytes[len - 1 - i] = pathBytes[i];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (pathBytes.length < 2) {
|
||||
return pathBytes[0] == 0 ? Uint8List(0) : pathBytes;
|
||||
}
|
||||
final len = (pathBytes.length + pathBytes.length - 1);
|
||||
traceBytes = Uint8List(len);
|
||||
for (int i = 0; i < pathBytes.length; i++) {
|
||||
traceBytes[i] = pathBytes[i];
|
||||
if (i < pathBytes.length - 1) {
|
||||
traceBytes[len - 1 - i] = pathBytes[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return traceBytes;
|
||||
@@ -135,11 +165,16 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
: widget.path;
|
||||
|
||||
if (widget.flipPathRound) {
|
||||
path = addReturnPath(pathTmp);
|
||||
path = buildPath(pathTmp);
|
||||
} else {
|
||||
path = pathTmp;
|
||||
}
|
||||
|
||||
appLogger.info(
|
||||
'Initiating path trace with path: ${_formatPathPrefixes(path)}',
|
||||
tag: 'PathTraceMapScreen',
|
||||
);
|
||||
|
||||
final connector = Provider.of<MeshCoreConnector>(context, listen: false);
|
||||
final frame = buildTraceReq(
|
||||
DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
||||
@@ -228,10 +263,11 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
.toList();
|
||||
|
||||
Map<int, Contact> pathContacts = {};
|
||||
|
||||
connector.contacts.where((c) => c.type != advTypeChat).forEach((
|
||||
repeater,
|
||||
) {
|
||||
final contacts = <Contact>[
|
||||
...connector.contacts,
|
||||
...connector.discoveredContacts,
|
||||
];
|
||||
contacts.where((c) => c.type != advTypeChat).forEach((repeater) {
|
||||
for (var repeaterData in pathData) {
|
||||
if (listEquals(
|
||||
repeater.publicKey.sublist(0, 1),
|
||||
@@ -242,25 +278,91 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
}
|
||||
});
|
||||
|
||||
// For hops with no GPS contact, infer position from other contacts
|
||||
// with known GPS that share the same last-hop byte.
|
||||
final Map<int, LatLng> inferredPositions = {};
|
||||
for (final hop in pathData) {
|
||||
final contact = pathContacts[hop];
|
||||
if (contact != null && contact.hasLocation) continue;
|
||||
final peers = connector.contacts
|
||||
.where(
|
||||
(c) => c.hasLocation && c.path.isNotEmpty && c.path.last == hop,
|
||||
)
|
||||
.toList();
|
||||
if (peers.isNotEmpty) {
|
||||
final lat =
|
||||
peers.map((c) => c.latitude!).reduce((a, b) => a + b) /
|
||||
peers.length;
|
||||
final lon =
|
||||
peers.map((c) => c.longitude!).reduce((a, b) => a + b) /
|
||||
peers.length;
|
||||
inferredPositions[hop] = LatLng(lat, lon);
|
||||
}
|
||||
}
|
||||
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
_hasData = true;
|
||||
_inferredHopPositions = inferredPositions;
|
||||
_traceData = PathTraceData(
|
||||
pathData: pathData,
|
||||
snrData: snrData,
|
||||
pathContacts: pathContacts,
|
||||
);
|
||||
// Compute endpoint position for the target contact.
|
||||
LatLng? targetPos;
|
||||
bool targetGuessed = false;
|
||||
final target = widget.targetContact;
|
||||
if (target != null) {
|
||||
if (target.hasLocation) {
|
||||
targetPos = LatLng(target.latitude!, target.longitude!);
|
||||
} else if (pathData.isNotEmpty) {
|
||||
// Infer from the last hop: average GPS contacts sharing that hop.
|
||||
// For a round-trip path (flipPathRound), the target-side hop sits
|
||||
// in the middle of the symmetric sequence; .last is the local side.
|
||||
final lastHop = (widget.flipPathRound && pathData.length > 1)
|
||||
? pathData[(pathData.length - 1) ~/ 2]
|
||||
: pathData.last;
|
||||
final peers = connector.contacts
|
||||
.where(
|
||||
(c) =>
|
||||
c.hasLocation &&
|
||||
c.path.isNotEmpty &&
|
||||
c.path.last == lastHop,
|
||||
)
|
||||
.toList();
|
||||
if (peers.isNotEmpty) {
|
||||
final lat =
|
||||
peers.map((c) => c.latitude!).reduce((a, b) => a + b) /
|
||||
peers.length;
|
||||
final lon =
|
||||
peers.map((c) => c.longitude!).reduce((a, b) => a + b) /
|
||||
peers.length;
|
||||
const offsetDeg = 0.003;
|
||||
final angle = (target.publicKey[1] / 255.0) * 2 * pi;
|
||||
targetPos = LatLng(
|
||||
lat + offsetDeg * cos(angle),
|
||||
lon + offsetDeg * sin(angle),
|
||||
);
|
||||
targetGuessed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
_targetContactPosition = targetPos;
|
||||
_targetContactIsGuessed = targetGuessed;
|
||||
|
||||
_points = <LatLng>[];
|
||||
_points.add(LatLng(connector.selfLatitude!, connector.selfLongitude!));
|
||||
for (final hop in _traceData!.pathData) {
|
||||
final contact = _traceData!.pathContacts[hop];
|
||||
if (contact != null &&
|
||||
contact.hasLocation &&
|
||||
contact.latitude != null &&
|
||||
contact.longitude != null) {
|
||||
if (contact != null && contact.hasLocation) {
|
||||
_points.add(LatLng(contact.latitude!, contact.longitude!));
|
||||
} else {
|
||||
final inferred = inferredPositions[hop];
|
||||
if (inferred != null) _points.add(inferred);
|
||||
}
|
||||
}
|
||||
if (targetPos != null) _points.add(targetPos);
|
||||
_polylines = _points.length > 1
|
||||
? [
|
||||
Polyline(
|
||||
@@ -382,8 +484,13 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
final markers = <Marker>[];
|
||||
for (final hop in pathData) {
|
||||
final contact = _traceData!.pathContacts[hop];
|
||||
if (contact == null || !contact.hasLocation) continue;
|
||||
final point = LatLng(contact.latitude!, contact.longitude!);
|
||||
final inferred = _inferredHopPositions[hop];
|
||||
final hasGps = contact != null && contact.hasLocation;
|
||||
if (!hasGps && inferred == null) continue;
|
||||
final point = hasGps
|
||||
? LatLng(contact.latitude!, contact.longitude!)
|
||||
: inferred!;
|
||||
final label = hop.toRadixString(16).padLeft(2, '0').toUpperCase();
|
||||
markers.add(
|
||||
Marker(
|
||||
point: point,
|
||||
@@ -392,7 +499,9 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.green,
|
||||
color: hasGps
|
||||
? Colors.green
|
||||
: Colors.orange.withValues(alpha: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Colors.white, width: 2),
|
||||
boxShadow: [
|
||||
@@ -405,10 +514,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
contact.publicKey
|
||||
.sublist(0, 1)
|
||||
.map((b) => b.toRadixString(16).padLeft(2, '0').toUpperCase())
|
||||
.join(),
|
||||
hasGps ? label : '~$label',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -419,7 +525,12 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
),
|
||||
);
|
||||
if (showLabels) {
|
||||
markers.add(_buildNodeLabelMarker(point: point, label: contact.name));
|
||||
markers.add(
|
||||
_buildNodeLabelMarker(
|
||||
point: point,
|
||||
label: contact?.name ?? '~$label',
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,6 +579,47 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
// Add target contact endpoint marker.
|
||||
final targetPos = _targetContactPosition;
|
||||
if (targetPos != null) {
|
||||
final isGuessed = _targetContactIsGuessed;
|
||||
final targetName = widget.targetContact?.name ?? '?';
|
||||
markers.add(
|
||||
Marker(
|
||||
point: targetPos,
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: isGuessed
|
||||
? Colors.purple.withValues(alpha: 0.55)
|
||||
: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Colors.white, width: 2),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.3),
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: const Icon(Icons.person, color: Colors.white, size: 18),
|
||||
),
|
||||
),
|
||||
);
|
||||
if (showLabels) {
|
||||
markers.add(
|
||||
_buildNodeLabelMarker(
|
||||
point: targetPos,
|
||||
label: isGuessed ? '~$targetName' : targetName,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return markers;
|
||||
}
|
||||
|
||||
|
||||
+116
-43
@@ -1,15 +1,17 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../utils/platform_info.dart';
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../connector/meshcore_connector.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import '../widgets/adaptive_app_bar_title.dart';
|
||||
import '../widgets/device_tile.dart';
|
||||
import 'contacts_screen.dart';
|
||||
import 'tcp_screen.dart';
|
||||
import 'usb_screen.dart';
|
||||
|
||||
/// Screen for scanning and connecting to MeshCore devices
|
||||
class ScannerScreen extends StatefulWidget {
|
||||
@@ -21,6 +23,7 @@ class ScannerScreen extends StatefulWidget {
|
||||
|
||||
class _ScannerScreenState extends State<ScannerScreen> {
|
||||
bool _changedNavigation = false;
|
||||
late final MeshCoreConnector _connector;
|
||||
late final VoidCallback _connectionListener;
|
||||
BluetoothAdapterState _bluetoothState = BluetoothAdapterState.unknown;
|
||||
late StreamSubscription<BluetoothAdapterState> _bluetoothStateSubscription;
|
||||
@@ -28,12 +31,15 @@ class _ScannerScreenState extends State<ScannerScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
final connector = Provider.of<MeshCoreConnector>(context, listen: false);
|
||||
_connector = Provider.of<MeshCoreConnector>(context, listen: false);
|
||||
|
||||
_connectionListener = () {
|
||||
if (connector.state == MeshCoreConnectionState.disconnected) {
|
||||
final isCurrentRoute = ModalRoute.of(context)?.isCurrent ?? true;
|
||||
if (_connector.state == MeshCoreConnectionState.disconnected) {
|
||||
_changedNavigation = false;
|
||||
} else if (connector.state == MeshCoreConnectionState.connected &&
|
||||
} else if (_connector.state == MeshCoreConnectionState.connected &&
|
||||
_connector.activeTransport == MeshCoreTransportType.bluetooth &&
|
||||
isCurrentRoute &&
|
||||
!_changedNavigation) {
|
||||
_changedNavigation = true;
|
||||
if (mounted) {
|
||||
@@ -44,33 +50,52 @@ class _ScannerScreenState extends State<ScannerScreen> {
|
||||
}
|
||||
};
|
||||
|
||||
connector.addListener(_connectionListener);
|
||||
_connector.addListener(_connectionListener);
|
||||
|
||||
_bluetoothStateSubscription = FlutterBluePlus.adapterState.listen((state) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_bluetoothState = state;
|
||||
});
|
||||
// Cancel scan if Bluetooth turns off while scanning
|
||||
if (state != BluetoothAdapterState.on) {
|
||||
unawaited(connector.stopScan());
|
||||
_bluetoothStateSubscription = FlutterBluePlus.adapterState.listen(
|
||||
(state) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_bluetoothState = state;
|
||||
});
|
||||
// Cancel scan if Bluetooth turns off while scanning
|
||||
if (state != BluetoothAdapterState.on) {
|
||||
unawaited(_connector.stopScan());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onError: (Object e) {
|
||||
appLogger.warn('Adapter state stream error: $e', tag: 'ScannerScreen');
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
final connector = Provider.of<MeshCoreConnector>(context, listen: false);
|
||||
connector.removeListener(_connectionListener);
|
||||
_connector.removeListener(_connectionListener);
|
||||
unawaited(_bluetoothStateSubscription.cancel());
|
||||
if (!_changedNavigation) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
unawaited(_connector.disconnect(manual: true));
|
||||
});
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final canPop = Navigator.of(context).canPop();
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: canPop
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
appLogger.info('Back button pressed', tag: 'ScannerScreen');
|
||||
Navigator.of(context).maybePop();
|
||||
},
|
||||
)
|
||||
: null,
|
||||
title: AdaptiveAppBarTitle(context.l10n.scanner_title),
|
||||
centerTitle: true,
|
||||
automaticallyImplyLeading: false,
|
||||
@@ -95,36 +120,84 @@ class _ScannerScreenState extends State<ScannerScreen> {
|
||||
},
|
||||
),
|
||||
),
|
||||
floatingActionButton: Consumer<MeshCoreConnector>(
|
||||
bottomNavigationBar: Consumer<MeshCoreConnector>(
|
||||
builder: (context, connector, child) {
|
||||
final isScanning =
|
||||
connector.state == MeshCoreConnectionState.scanning;
|
||||
final isBluetoothOff = _bluetoothState == BluetoothAdapterState.off;
|
||||
final usbSupported = PlatformInfo.supportsUsbSerial;
|
||||
final tcpSupported = !PlatformInfo.isWeb;
|
||||
|
||||
return FloatingActionButton.extended(
|
||||
onPressed: isBluetoothOff
|
||||
? null
|
||||
: () {
|
||||
if (isScanning) {
|
||||
connector.stopScan();
|
||||
} else {
|
||||
connector.startScan();
|
||||
}
|
||||
},
|
||||
icon: isScanning
|
||||
? const SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: Colors.white,
|
||||
return SafeArea(
|
||||
top: false,
|
||||
minimum: const EdgeInsets.fromLTRB(16, 8, 16, 16),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
if (usbSupported)
|
||||
FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
appLogger.info(
|
||||
'USB selected, opening UsbScreen',
|
||||
tag: 'ScannerScreen',
|
||||
);
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => const UsbScreen()),
|
||||
);
|
||||
},
|
||||
heroTag: 'scanner_usb_action',
|
||||
icon: const Icon(Icons.usb),
|
||||
label: Text(context.l10n.connectionChoiceUsbLabel),
|
||||
),
|
||||
)
|
||||
: const Icon(Icons.bluetooth_searching),
|
||||
label: Text(
|
||||
isScanning
|
||||
? context.l10n.scanner_stop
|
||||
: context.l10n.scanner_scan,
|
||||
if (usbSupported) const SizedBox(width: 12),
|
||||
if (tcpSupported)
|
||||
FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => const TcpScreen()),
|
||||
);
|
||||
},
|
||||
heroTag: 'scanner_tcp_action',
|
||||
icon: const Icon(Icons.lan),
|
||||
label: Text(context.l10n.connectionChoiceTcpLabel),
|
||||
),
|
||||
if (tcpSupported) const SizedBox(width: 12),
|
||||
FloatingActionButton.extended(
|
||||
heroTag: 'scanner_ble_action',
|
||||
onPressed: isBluetoothOff
|
||||
? null
|
||||
: () {
|
||||
if (isScanning) {
|
||||
connector.stopScan();
|
||||
} else {
|
||||
unawaited(
|
||||
connector.startScan().catchError((e) {
|
||||
appLogger.warn(
|
||||
'startScan error: $e',
|
||||
tag: 'ScannerScreen',
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
},
|
||||
icon: isScanning
|
||||
? const SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
)
|
||||
: const Icon(Icons.bluetooth_searching),
|
||||
label: Text(
|
||||
isScanning
|
||||
? context.l10n.scanner_stop
|
||||
: context.l10n.scanner_scan,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -265,7 +338,7 @@ class _ScannerScreenState extends State<ScannerScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if (Platform.isAndroid)
|
||||
if (PlatformInfo.isAndroid)
|
||||
TextButton(
|
||||
onPressed: () => FlutterBluePlus.turnOn(),
|
||||
child: Text(context.l10n.scanner_enableBluetooth),
|
||||
|
||||
@@ -8,7 +8,7 @@ import '../connector/meshcore_connector.dart';
|
||||
import '../connector/meshcore_protocol.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
import '../models/radio_settings.dart';
|
||||
import '../widgets/adaptive_app_bar_title.dart';
|
||||
import '../widgets/app_bar.dart';
|
||||
import 'app_settings_screen.dart';
|
||||
import 'app_debug_log_screen.dart';
|
||||
import 'ble_debug_log_screen.dart';
|
||||
@@ -43,8 +43,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
final l10n = context.l10n;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: AdaptiveAppBarTitle(l10n.settings_title),
|
||||
centerTitle: true,
|
||||
title: AppBarTitle(
|
||||
l10n.settings_title,
|
||||
indicators: false,
|
||||
subtitle: false,
|
||||
),
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
@@ -274,6 +277,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
onTap: () => _editLocation(context, connector),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.group_add_outlined),
|
||||
title: Text(l10n.settings_contactSettings),
|
||||
subtitle: Text(l10n.settings_contactSettingsSubtitle),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () => _editAutoAddConfig(context, connector),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.visibility_off_outlined),
|
||||
title: Text(l10n.settings_privacyMode),
|
||||
@@ -849,6 +860,121 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _editAutoAddConfig(BuildContext context, MeshCoreConnector connector) {
|
||||
final l10n = context.l10n;
|
||||
bool autoAddChat = false;
|
||||
bool autoAddRepeater = false;
|
||||
bool autoAddRoomServer = false;
|
||||
bool autoAddSensor = false;
|
||||
bool overwriteOldest = false;
|
||||
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
autoAddChat = connector.autoAddUsers ?? false;
|
||||
autoAddRepeater = connector.autoAddRepeaters ?? false;
|
||||
autoAddRoomServer = connector.autoAddRoomServers ?? false;
|
||||
autoAddSensor = connector.autoAddSensors ?? false;
|
||||
overwriteOldest = connector.autoAddOverwriteOldest ?? false;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (dialogContext) => StatefulBuilder(
|
||||
builder: (context, setDialogState) => AlertDialog(
|
||||
title: Text(l10n.contactsSettings_autoAddTitle),
|
||||
content: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
FeatureToggleRow(
|
||||
title: l10n.contactsSettings_autoAddUsersTitle,
|
||||
subtitle: l10n.contactsSettings_autoAddUsersSubtitle,
|
||||
value: autoAddChat,
|
||||
onChanged: (value) {
|
||||
setDialogState(() => autoAddChat = value);
|
||||
},
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
FeatureToggleRow(
|
||||
title: l10n.contactsSettings_autoAddRepeatersTitle,
|
||||
subtitle: l10n.contactsSettings_autoAddRepeatersSubtitle,
|
||||
value: autoAddRepeater,
|
||||
onChanged: (value) {
|
||||
setDialogState(() => autoAddRepeater = value);
|
||||
},
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
FeatureToggleRow(
|
||||
title: l10n.contactsSettings_autoAddRoomServersTitle,
|
||||
subtitle: l10n.contactsSettings_autoAddRoomServersSubtitle,
|
||||
value: autoAddRoomServer,
|
||||
onChanged: (value) {
|
||||
setDialogState(() => autoAddRoomServer = value);
|
||||
},
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
FeatureToggleRow(
|
||||
title: l10n.contactsSettings_autoAddSensorsTitle,
|
||||
subtitle: l10n.contactsSettings_autoAddSensorsSubtitle,
|
||||
value: autoAddSensor,
|
||||
onChanged: (value) {
|
||||
setDialogState(() => autoAddSensor = value);
|
||||
},
|
||||
),
|
||||
Divider(height: 4),
|
||||
FeatureToggleRow(
|
||||
title: l10n.contactsSettings_overwriteOldestTitle,
|
||||
subtitle: l10n.contactsSettings_overwriteOldestSubtitle,
|
||||
value: overwriteOldest,
|
||||
onChanged: (value) {
|
||||
setDialogState(() => overwriteOldest = value);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(l10n.common_cancel),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
_sendSettings(
|
||||
connector,
|
||||
autoAddChat,
|
||||
autoAddRepeater,
|
||||
autoAddRoomServer,
|
||||
autoAddSensor,
|
||||
overwriteOldest,
|
||||
);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(l10n.common_save),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _sendSettings(
|
||||
MeshCoreConnector connector,
|
||||
bool autoAddChat,
|
||||
bool autoAddRepeater,
|
||||
bool autoAddRoomServer,
|
||||
bool autoAddSensor,
|
||||
bool overwriteOldest,
|
||||
) async {
|
||||
final frame = buildSetAutoAddConfigFrame(
|
||||
autoAddChat: autoAddChat,
|
||||
autoAddRepeater: autoAddRepeater,
|
||||
autoAddRoomServer: autoAddRoomServer,
|
||||
autoAddSensor: autoAddSensor,
|
||||
overwriteOldest: overwriteOldest,
|
||||
);
|
||||
await connector.sendFrame(frame);
|
||||
await connector.sendFrame(buildGetAutoAddFlagsFrame());
|
||||
}
|
||||
}
|
||||
|
||||
class _RadioSettingsDialog extends StatefulWidget {
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../connector/meshcore_connector.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
import '../utils/platform_info.dart';
|
||||
import '../widgets/adaptive_app_bar_title.dart';
|
||||
import 'contacts_screen.dart';
|
||||
import 'usb_screen.dart';
|
||||
|
||||
class TcpScreen extends StatefulWidget {
|
||||
const TcpScreen({super.key});
|
||||
|
||||
@override
|
||||
State<TcpScreen> createState() => _TcpScreenState();
|
||||
}
|
||||
|
||||
class _TcpScreenState extends State<TcpScreen> {
|
||||
late final TextEditingController _hostController;
|
||||
late final TextEditingController _portController;
|
||||
late final MeshCoreConnector _connector;
|
||||
late final VoidCallback _connectionListener;
|
||||
bool _navigatedToContacts = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_hostController = TextEditingController();
|
||||
_portController = TextEditingController(text: '5000');
|
||||
_connector = context.read<MeshCoreConnector>();
|
||||
|
||||
_connectionListener = () {
|
||||
if (!mounted) return;
|
||||
if (_connector.state == MeshCoreConnectionState.disconnected) {
|
||||
_navigatedToContacts = false;
|
||||
}
|
||||
if (_connector.state == MeshCoreConnectionState.connected &&
|
||||
_connector.isTcpTransportConnected &&
|
||||
!_navigatedToContacts) {
|
||||
_navigatedToContacts = true;
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(builder: (_) => const ContactsScreen()),
|
||||
);
|
||||
}
|
||||
};
|
||||
_connector.addListener(_connectionListener);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_hostController.dispose();
|
||||
_portController.dispose();
|
||||
_connector.removeListener(_connectionListener);
|
||||
if (!_navigatedToContacts &&
|
||||
_connector.activeTransport == MeshCoreTransportType.tcp &&
|
||||
_connector.state != MeshCoreConnectionState.disconnected) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
unawaited(_connector.disconnect(manual: true));
|
||||
});
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => Navigator.of(context).maybePop(),
|
||||
),
|
||||
title: AdaptiveAppBarTitle(context.l10n.tcpScreenTitle),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
child: Consumer<MeshCoreConnector>(
|
||||
builder: (context, connector, child) {
|
||||
final isConnecting =
|
||||
connector.state == MeshCoreConnectionState.connecting &&
|
||||
connector.activeTransport == MeshCoreTransportType.tcp;
|
||||
final isButtonDisabled =
|
||||
isConnecting ||
|
||||
connector.state == MeshCoreConnectionState.scanning;
|
||||
return Column(
|
||||
children: [
|
||||
_buildStatusBar(context, connector),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
TextField(
|
||||
controller: _hostController,
|
||||
decoration: InputDecoration(
|
||||
labelText: context.l10n.tcpHostLabel,
|
||||
hintText: context.l10n.tcpHostHint,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
enabled: !isConnecting,
|
||||
keyboardType: TextInputType.url,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
TextField(
|
||||
controller: _portController,
|
||||
decoration: InputDecoration(
|
||||
labelText: context.l10n.tcpPortLabel,
|
||||
hintText: context.l10n.tcpPortHint,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
enabled: !isConnecting,
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
FilledButton.icon(
|
||||
key: const Key('tcp_connect_button'),
|
||||
onPressed: isButtonDisabled ? null : _connectTcp,
|
||||
icon: isConnecting
|
||||
? const SizedBox(
|
||||
width: 18,
|
||||
height: 18,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
),
|
||||
)
|
||||
: const Icon(Icons.lan),
|
||||
label: Text(
|
||||
isConnecting
|
||||
? context.l10n.scanner_connecting
|
||||
: context.l10n.common_connect,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: SafeArea(
|
||||
top: false,
|
||||
minimum: const EdgeInsets.fromLTRB(16, 8, 16, 16),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
if (PlatformInfo.supportsUsbSerial)
|
||||
FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(builder: (_) => const UsbScreen()),
|
||||
);
|
||||
},
|
||||
heroTag: 'tcp_usb_action',
|
||||
extendedPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
icon: const Icon(Icons.usb),
|
||||
label: Text(context.l10n.connectionChoiceUsbLabel),
|
||||
),
|
||||
if (PlatformInfo.supportsUsbSerial) const SizedBox(width: 12),
|
||||
FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
Navigator.of(context).maybePop();
|
||||
},
|
||||
heroTag: 'tcp_ble_action',
|
||||
extendedPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
icon: const Icon(Icons.bluetooth),
|
||||
label: Text(context.l10n.connectionChoiceBluetoothLabel),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatusBar(BuildContext context, MeshCoreConnector connector) {
|
||||
final l10n = context.l10n;
|
||||
String statusText;
|
||||
Color statusColor;
|
||||
|
||||
if (connector.isTcpTransportConnected) {
|
||||
statusText = l10n.scanner_connectedTo(
|
||||
connector.activeTcpEndpoint ?? 'TCP',
|
||||
);
|
||||
statusColor = Colors.green;
|
||||
} else if (connector.state == MeshCoreConnectionState.connecting &&
|
||||
connector.activeTransport == MeshCoreTransportType.tcp) {
|
||||
statusText = l10n.tcpStatus_connectingTo(
|
||||
'${_hostController.text}:${_portController.text}',
|
||||
);
|
||||
statusColor = Colors.orange;
|
||||
} else if (connector.state == MeshCoreConnectionState.disconnecting &&
|
||||
connector.activeTransport == MeshCoreTransportType.tcp) {
|
||||
statusText = l10n.scanner_disconnecting;
|
||||
statusColor = Colors.orange;
|
||||
} else {
|
||||
statusText = l10n.tcpStatus_notConnected;
|
||||
statusColor = Colors.grey;
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||
color: statusColor.withValues(alpha: 0.1),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.circle, size: 12, color: statusColor),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
statusText,
|
||||
style: TextStyle(
|
||||
color: statusColor,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _connectTcp() async {
|
||||
if (_connector.state == MeshCoreConnectionState.connecting ||
|
||||
_connector.state == MeshCoreConnectionState.connected ||
|
||||
_connector.state == MeshCoreConnectionState.disconnecting) {
|
||||
return;
|
||||
}
|
||||
|
||||
final host = _hostController.text.trim();
|
||||
final parsedPort = int.tryParse(_portController.text.trim());
|
||||
if (host.isEmpty) {
|
||||
_showError(context.l10n.tcpErrorHostRequired);
|
||||
return;
|
||||
}
|
||||
if (parsedPort == null || parsedPort < 1 || parsedPort > 65535) {
|
||||
_showError(context.l10n.tcpErrorPortInvalid);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await _connector.connectTcp(host: host, port: parsedPort);
|
||||
} catch (error) {
|
||||
if (!mounted) return;
|
||||
_showError(_friendlyErrorMessage(error));
|
||||
}
|
||||
}
|
||||
|
||||
void _showError(String message) {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(message), backgroundColor: Colors.red),
|
||||
);
|
||||
}
|
||||
|
||||
String _friendlyErrorMessage(Object error) {
|
||||
if (error is UnsupportedError) {
|
||||
return context.l10n.tcpErrorUnsupported;
|
||||
}
|
||||
if (error is TimeoutException) {
|
||||
return context.l10n.tcpErrorTimedOut;
|
||||
}
|
||||
if (error is StateError) {
|
||||
return context.l10n.tcpConnectionFailed(error.message);
|
||||
}
|
||||
if (error is ArgumentError) {
|
||||
return context.l10n.tcpConnectionFailed(
|
||||
error.message?.toString() ?? error.toString(),
|
||||
);
|
||||
}
|
||||
return context.l10n.tcpConnectionFailed(error.toString());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,441 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../connector/meshcore_connector.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import '../utils/platform_info.dart';
|
||||
import '../utils/usb_port_labels.dart';
|
||||
import '../widgets/adaptive_app_bar_title.dart';
|
||||
import 'contacts_screen.dart';
|
||||
import 'scanner_screen.dart';
|
||||
import 'tcp_screen.dart';
|
||||
|
||||
class UsbScreen extends StatefulWidget {
|
||||
const UsbScreen({super.key});
|
||||
|
||||
@override
|
||||
State<UsbScreen> createState() => _UsbScreenState();
|
||||
}
|
||||
|
||||
class _UsbScreenState extends State<UsbScreen> {
|
||||
final List<String> _ports = <String>[];
|
||||
bool _isLoadingPorts = true;
|
||||
bool _navigatedToContacts = false;
|
||||
bool _didScheduleInitialLoad = false;
|
||||
Timer? _hotPlugTimer;
|
||||
late final MeshCoreConnector _connector;
|
||||
late final VoidCallback _connectionListener;
|
||||
|
||||
bool get _supportsHotPlug =>
|
||||
PlatformInfo.isWindows || PlatformInfo.isLinux || PlatformInfo.isMacOS;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_connector = context.read<MeshCoreConnector>();
|
||||
_connectionListener = () {
|
||||
if (!mounted) return;
|
||||
if (_connector.state == MeshCoreConnectionState.disconnected) {
|
||||
_navigatedToContacts = false;
|
||||
}
|
||||
if (_connector.state == MeshCoreConnectionState.connected &&
|
||||
_connector.isUsbTransportConnected &&
|
||||
!_navigatedToContacts) {
|
||||
_navigatedToContacts = true;
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(builder: (_) => const ContactsScreen()),
|
||||
);
|
||||
}
|
||||
};
|
||||
_connector.addListener(_connectionListener);
|
||||
_startHotPlugTimer();
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
_connector.setUsbRequestPortLabel(context.l10n.usbScreenStatus);
|
||||
_connector.setUsbFallbackDeviceName(context.l10n.usbFallbackDeviceName);
|
||||
if (!_didScheduleInitialLoad) {
|
||||
_didScheduleInitialLoad = true;
|
||||
unawaited(_loadPorts());
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_hotPlugTimer?.cancel();
|
||||
_hotPlugTimer = null;
|
||||
_connector.removeListener(_connectionListener);
|
||||
if (!_navigatedToContacts &&
|
||||
_connector.activeTransport == MeshCoreTransportType.usb &&
|
||||
_connector.state != MeshCoreConnectionState.disconnected) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
unawaited(_connector.disconnect(manual: true));
|
||||
});
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => Navigator.of(context).maybePop(),
|
||||
),
|
||||
title: AdaptiveAppBarTitle(context.l10n.usbScreenTitle),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
child: Consumer<MeshCoreConnector>(
|
||||
builder: (context, connector, child) {
|
||||
return Column(
|
||||
children: [
|
||||
_buildStatusBar(context, connector),
|
||||
Expanded(child: _buildPortList(context, connector)),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: Consumer<MeshCoreConnector>(
|
||||
builder: (context, connector, child) {
|
||||
final isLoading = _isLoadingPorts;
|
||||
final showBle = true;
|
||||
final showTcp = !PlatformInfo.isWeb;
|
||||
|
||||
return SafeArea(
|
||||
top: false,
|
||||
minimum: const EdgeInsets.fromLTRB(16, 8, 16, 16),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
if (showTcp)
|
||||
FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(builder: (_) => const TcpScreen()),
|
||||
);
|
||||
},
|
||||
heroTag: 'usb_tcp_action',
|
||||
extendedPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
),
|
||||
icon: const Icon(Icons.lan),
|
||||
label: Text(context.l10n.connectionChoiceTcpLabel),
|
||||
),
|
||||
if (showTcp && showBle) const SizedBox(width: 12),
|
||||
if (showBle)
|
||||
FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const ScannerScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
heroTag: 'usb_ble_action',
|
||||
extendedPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
),
|
||||
icon: const Icon(Icons.bluetooth),
|
||||
label: Text(context.l10n.connectionChoiceBluetoothLabel),
|
||||
),
|
||||
if ((showTcp || showBle) && !_supportsHotPlug)
|
||||
const SizedBox(width: 12),
|
||||
if (!_supportsHotPlug)
|
||||
FloatingActionButton.extended(
|
||||
onPressed: isLoading ? null : _loadPorts,
|
||||
heroTag: 'usb_refresh_action',
|
||||
extendedPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
),
|
||||
icon: isLoading
|
||||
? const SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
)
|
||||
: const Icon(Icons.usb),
|
||||
label: Text(context.l10n.scanner_scan),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatusBar(BuildContext context, MeshCoreConnector connector) {
|
||||
final l10n = context.l10n;
|
||||
String statusText;
|
||||
Color statusColor;
|
||||
|
||||
if (_isLoadingPorts) {
|
||||
statusText = l10n.usbStatus_searching;
|
||||
statusColor = Colors.blue;
|
||||
} else if (connector.isUsbTransportConnected) {
|
||||
switch (connector.state) {
|
||||
case MeshCoreConnectionState.connected:
|
||||
statusText = l10n.scanner_connectedTo(
|
||||
connector.activeUsbPortDisplayLabel ?? 'USB',
|
||||
);
|
||||
statusColor = Colors.green;
|
||||
case MeshCoreConnectionState.disconnecting:
|
||||
statusText = l10n.scanner_disconnecting;
|
||||
statusColor = Colors.orange;
|
||||
default:
|
||||
statusText = l10n.usbStatus_notConnected;
|
||||
statusColor = Colors.grey;
|
||||
}
|
||||
} else if (connector.state == MeshCoreConnectionState.connecting &&
|
||||
connector.activeTransport == MeshCoreTransportType.usb) {
|
||||
statusText = l10n.usbStatus_connecting;
|
||||
statusColor = Colors.orange;
|
||||
} else {
|
||||
statusText = l10n.usbStatus_notConnected;
|
||||
statusColor = Colors.grey;
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||
color: statusColor.withValues(alpha: 0.1),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.circle, size: 12, color: statusColor),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
statusText,
|
||||
style: TextStyle(
|
||||
color: statusColor,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildPortList(BuildContext context, MeshCoreConnector connector) {
|
||||
final l10n = context.l10n;
|
||||
|
||||
if (_isLoadingPorts) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.usb, size: 64, color: Colors.grey[400]),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
l10n.usbStatus_searching,
|
||||
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (_ports.isEmpty) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.usb, size: 64, color: Colors.grey[400]),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
l10n.usbScreenEmptyState,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final isConnecting =
|
||||
connector.state == MeshCoreConnectionState.connecting &&
|
||||
connector.activeTransport == MeshCoreTransportType.usb;
|
||||
|
||||
return ListView.separated(
|
||||
padding: const EdgeInsets.all(8),
|
||||
itemCount: _ports.length,
|
||||
separatorBuilder: (context, index) => const Divider(),
|
||||
itemBuilder: (context, index) {
|
||||
final port = _ports[index];
|
||||
final displayName = friendlyUsbPortName(port);
|
||||
final rawName = normalizeUsbPortName(port);
|
||||
final showRawName =
|
||||
rawName != displayName && !rawName.startsWith('web:');
|
||||
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.usb),
|
||||
title: Text(
|
||||
displayName,
|
||||
style: const TextStyle(fontWeight: FontWeight.w500),
|
||||
),
|
||||
subtitle: showRawName ? Text(rawName) : null,
|
||||
trailing: ElevatedButton(
|
||||
onPressed: isConnecting ? null : () => _connectPort(port),
|
||||
child: Text(l10n.common_connect),
|
||||
),
|
||||
onTap: isConnecting ? null : () => _connectPort(port),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _startHotPlugTimer() {
|
||||
if (!_supportsHotPlug) return;
|
||||
_hotPlugTimer?.cancel();
|
||||
_hotPlugTimer = Timer.periodic(const Duration(seconds: 2), (_) {
|
||||
_pollHotPlug();
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _pollHotPlug() async {
|
||||
if (_isLoadingPorts) return;
|
||||
if (!mounted) return;
|
||||
// Don't poll while connecting or connected.
|
||||
if (_connector.state != MeshCoreConnectionState.disconnected) return;
|
||||
try {
|
||||
final ports = await _connector.listUsbPorts();
|
||||
if (!mounted) return;
|
||||
final added = ports.where((p) => !_ports.contains(p)).toList();
|
||||
final removed = _ports.where((p) => !ports.contains(p)).toList();
|
||||
if (added.isEmpty && removed.isEmpty) return;
|
||||
setState(() {
|
||||
_ports
|
||||
..clear()
|
||||
..addAll(ports);
|
||||
});
|
||||
} catch (_) {
|
||||
// Silent — hot-plug failures are non-critical.
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _loadPorts() async {
|
||||
if (!mounted) return;
|
||||
_connector.setUsbRequestPortLabel(context.l10n.usbScreenStatus);
|
||||
|
||||
setState(() {
|
||||
_isLoadingPorts = true;
|
||||
});
|
||||
|
||||
try {
|
||||
final ports = await _connector.listUsbPorts();
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_ports
|
||||
..clear()
|
||||
..addAll(ports);
|
||||
_isLoadingPorts = false;
|
||||
});
|
||||
} catch (error) {
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_ports.clear();
|
||||
_isLoadingPorts = false;
|
||||
});
|
||||
_showError(error);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _connectPort(String port) async {
|
||||
if (_connector.state != MeshCoreConnectionState.disconnected) return;
|
||||
|
||||
final rawPortName = normalizeUsbPortName(port);
|
||||
appLogger.info(
|
||||
'Connect tapped for $port (raw: $rawPortName)',
|
||||
tag: 'UsbScreen',
|
||||
);
|
||||
|
||||
try {
|
||||
await _connector.connectUsb(portName: rawPortName);
|
||||
} catch (error, stackTrace) {
|
||||
appLogger.error(
|
||||
'Connect failed for $rawPortName: $error\n$stackTrace',
|
||||
tag: 'UsbScreen',
|
||||
);
|
||||
if (!mounted) return;
|
||||
_showError(error);
|
||||
unawaited(_loadPorts());
|
||||
}
|
||||
}
|
||||
|
||||
void _showError(Object error) {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(_friendlyErrorMessage(error)),
|
||||
backgroundColor: Colors.red,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _friendlyErrorMessage(Object error) {
|
||||
final l10n = context.l10n;
|
||||
|
||||
if (error is PlatformException) {
|
||||
switch (error.code) {
|
||||
case 'usb_permission_denied':
|
||||
return l10n.usbErrorPermissionDenied;
|
||||
case 'usb_device_missing':
|
||||
case 'usb_device_detached':
|
||||
return l10n.usbErrorDeviceMissing;
|
||||
case 'usb_invalid_port':
|
||||
return l10n.usbErrorInvalidPort;
|
||||
case 'usb_busy':
|
||||
return l10n.usbErrorBusy;
|
||||
case 'usb_not_connected':
|
||||
return l10n.usbErrorNotConnected;
|
||||
case 'usb_open_failed':
|
||||
case 'usb_driver_missing':
|
||||
return l10n.usbErrorOpenFailed;
|
||||
case 'usb_connect_failed':
|
||||
return l10n.usbErrorConnectFailed;
|
||||
}
|
||||
}
|
||||
|
||||
if (error is UnsupportedError) {
|
||||
return l10n.usbErrorUnsupported;
|
||||
}
|
||||
|
||||
if (error is StateError) {
|
||||
final msg = error.message;
|
||||
if (msg.contains('already active')) return l10n.usbErrorAlreadyActive;
|
||||
if (msg.contains('No USB serial device selected')) {
|
||||
return l10n.usbErrorNoDeviceSelected;
|
||||
}
|
||||
if (msg.contains('not open') || msg.contains('closed')) {
|
||||
return l10n.usbErrorPortClosed;
|
||||
}
|
||||
if (msg.contains('Timed out')) return l10n.usbErrorConnectTimedOut;
|
||||
if (msg.contains('Failed to open')) return l10n.usbErrorOpenFailed;
|
||||
}
|
||||
|
||||
if (error is TimeoutException) {
|
||||
return l10n.usbErrorConnectTimedOut;
|
||||
}
|
||||
|
||||
return error.toString();
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,12 @@ class AppDebugLogService extends ChangeNotifier {
|
||||
String tag = 'App',
|
||||
AppDebugLogLevel level = AppDebugLogLevel.info,
|
||||
}) {
|
||||
if (!_enabled) return;
|
||||
if (!_enabled && !kDebugMode) return;
|
||||
if (!_enabled) {
|
||||
// In debug mode, still print to console but don't store entries.
|
||||
debugPrint('[$tag] $message');
|
||||
return;
|
||||
}
|
||||
|
||||
_entries.add(
|
||||
AppDebugLogEntry(
|
||||
|
||||
@@ -80,6 +80,10 @@ class AppSettingsService extends ChangeNotifier {
|
||||
await updateSettings(_settings.copyWith(mapShowMarkers: value));
|
||||
}
|
||||
|
||||
Future<void> setMapShowGuessedLocations(bool value) async {
|
||||
await updateSettings(_settings.copyWith(mapShowGuessedLocations: value));
|
||||
}
|
||||
|
||||
Future<void> setEnableMessageTracing(bool value) async {
|
||||
await updateSettings(_settings.copyWith(enableMessageTracing: value));
|
||||
}
|
||||
@@ -130,6 +134,10 @@ class AppSettingsService extends ChangeNotifier {
|
||||
appLogger.setEnabled(value);
|
||||
}
|
||||
|
||||
Future<void> setMapShowDiscoveryContacts(bool value) async {
|
||||
await updateSettings(_settings.copyWith(mapShowDiscoveryContacts: value));
|
||||
}
|
||||
|
||||
Future<void> setBatteryChemistryForDevice(
|
||||
String deviceId,
|
||||
String chemistry,
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import 'dart:io';
|
||||
|
||||
import '../utils/platform_info.dart';
|
||||
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
|
||||
|
||||
class BackgroundService {
|
||||
bool _initialized = false;
|
||||
|
||||
Future<void> initialize() async {
|
||||
if (!Platform.isAndroid || _initialized) return;
|
||||
if (!PlatformInfo.isAndroid || _initialized) return;
|
||||
FlutterForegroundTask.init(
|
||||
androidNotificationOptions: AndroidNotificationOptions(
|
||||
channelId: 'meshcore_background',
|
||||
@@ -29,7 +28,7 @@ class BackgroundService {
|
||||
}
|
||||
|
||||
Future<void> start() async {
|
||||
if (!Platform.isAndroid) return;
|
||||
if (!PlatformInfo.isAndroid) return;
|
||||
if (!_initialized) {
|
||||
await initialize();
|
||||
}
|
||||
@@ -43,7 +42,7 @@ class BackgroundService {
|
||||
}
|
||||
|
||||
Future<void> stop() async {
|
||||
if (!Platform.isAndroid) return;
|
||||
if (!PlatformInfo.isAndroid) return;
|
||||
final running = await FlutterForegroundTask.isRunningService;
|
||||
if (!running) return;
|
||||
await FlutterForegroundTask.stopService();
|
||||
|
||||
@@ -172,8 +172,6 @@ class BleDebugLogService extends ChangeNotifier {
|
||||
return 'CMD_GET_CHANNEL';
|
||||
case cmdSetChannel:
|
||||
return 'CMD_SET_CHANNEL';
|
||||
case cmdGetRadioSettings:
|
||||
return 'CMD_GET_RADIO_SETTINGS';
|
||||
case cmdSetCustomVar:
|
||||
return 'CMD_SET_CUSTOM_VAR';
|
||||
case cmdSendTracePath:
|
||||
@@ -215,8 +213,8 @@ class BleDebugLogService extends ChangeNotifier {
|
||||
return 'RESP_CODE_CHANNEL_MSG_RECV_V3';
|
||||
case respCodeChannelInfo:
|
||||
return 'RESP_CODE_CHANNEL_INFO';
|
||||
case respCodeRadioSettings:
|
||||
return 'RESP_CODE_RADIO_SETTINGS';
|
||||
case respCodeAutoAddConfig:
|
||||
return 'RESP_CODE_AUTO_ADD_CONFIG';
|
||||
case pushCodeTraceData:
|
||||
return 'PUSH_CODE_TRACE_DATA';
|
||||
default:
|
||||
|
||||
@@ -44,6 +44,12 @@ class MessageRetryService extends ChangeNotifier {
|
||||
[]; // Rolling buffer of recent ACK hashes
|
||||
final Map<String, List<String>> _pendingMessageQueuePerContact =
|
||||
{}; // contactPubKeyHex → FIFO queue of messageIds (DEPRECATED - will be removed)
|
||||
final Map<String, List<String>> _sendQueue =
|
||||
{}; // contactPubKeyHex → ordered list of messageIds awaiting send
|
||||
final Set<String> _activeMessages =
|
||||
{}; // messageIds currently in-flight (sent/retrying)
|
||||
final Set<String> _resolvedMessages =
|
||||
{}; // messageIds already resolved (prevents double _onMessageResolved)
|
||||
final Map<String, String> _expectedHashToMessageId =
|
||||
{}; // expectedAckHashHex → messageId (for matching RESP_CODE_SENT by hash)
|
||||
|
||||
@@ -156,7 +162,49 @@ class MessageRetryService extends ChangeNotifier {
|
||||
_addMessageCallback!(contact.publicKeyHex, message);
|
||||
}
|
||||
|
||||
await _attemptSend(messageId);
|
||||
// Queue per contact — only one message in-flight at a time to avoid
|
||||
// overflowing the firmware's 8-entry expected_ack_table.
|
||||
final contactKey = contact.publicKeyHex;
|
||||
_sendQueue[contactKey] ??= [];
|
||||
_sendQueue[contactKey]!.add(messageId);
|
||||
|
||||
if (!_activeMessages.any(
|
||||
(id) => _pendingContacts[id]?.publicKeyHex == contactKey,
|
||||
)) {
|
||||
_sendNextForContact(contactKey);
|
||||
}
|
||||
}
|
||||
|
||||
void _sendNextForContact(String contactKey) {
|
||||
final queue = _sendQueue[contactKey];
|
||||
if (queue == null) return;
|
||||
|
||||
// Drain stale entries iteratively instead of recursing.
|
||||
while (queue.isNotEmpty) {
|
||||
final messageId = queue.removeAt(0);
|
||||
if (_pendingMessages.containsKey(messageId)) {
|
||||
_activeMessages.add(messageId);
|
||||
_attemptSend(messageId).catchError((e) {
|
||||
debugPrint('_attemptSend threw for $messageId: $e');
|
||||
final msg = _pendingMessages[messageId];
|
||||
if (msg != null) {
|
||||
final failed = msg.copyWith(status: MessageStatus.failed);
|
||||
_pendingMessages[messageId] = failed;
|
||||
_updateMessageCallback?.call(failed);
|
||||
}
|
||||
_onMessageResolved(messageId, contactKey);
|
||||
});
|
||||
return;
|
||||
}
|
||||
// Message was cancelled/cleaned up while queued — try next
|
||||
}
|
||||
}
|
||||
|
||||
void _onMessageResolved(String messageId, String contactKey) {
|
||||
if (_resolvedMessages.contains(messageId)) return;
|
||||
_resolvedMessages.add(messageId);
|
||||
_activeMessages.remove(messageId);
|
||||
_sendNextForContact(contactKey);
|
||||
}
|
||||
|
||||
Future<void> _attemptSend(String messageId) async {
|
||||
@@ -169,13 +217,11 @@ class MessageRetryService extends ChangeNotifier {
|
||||
// Use the path that was captured when the message was first sent
|
||||
if (_setContactPathCallback != null && _clearContactPathCallback != null) {
|
||||
if (message.pathLength != null && message.pathLength! < 0) {
|
||||
// Flood mode - clear the path
|
||||
debugPrint(
|
||||
'Setting flood mode for retry attempt ${message.retryCount}',
|
||||
);
|
||||
_clearContactPathCallback!(contact);
|
||||
await _clearContactPathCallback!(contact);
|
||||
} else if (message.pathLength != null && message.pathLength! >= 0) {
|
||||
// Specific path (including direct neighbor with pathLength=0)
|
||||
final pathStr = message.pathBytes.isEmpty
|
||||
? 'direct'
|
||||
: message.pathBytes
|
||||
@@ -192,6 +238,24 @@ class MessageRetryService extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
// Re-validate after async gap — a timer or ACK could have resolved/retried
|
||||
// this message while we were awaiting the path callback.
|
||||
final currentMessage = _pendingMessages[messageId];
|
||||
if (currentMessage == null || _resolvedMessages.contains(messageId)) {
|
||||
debugPrint(
|
||||
'_attemptSend: message $messageId resolved during path sync, aborting',
|
||||
);
|
||||
return;
|
||||
}
|
||||
// If the message was retried by a timer during our await, the retryCount
|
||||
// will have advanced. Only proceed if it still matches the attempt we started.
|
||||
if (currentMessage.retryCount != message.retryCount) {
|
||||
debugPrint(
|
||||
'_attemptSend: message $messageId retryCount changed during path sync, aborting',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
final attempt = message.retryCount.clamp(0, 3);
|
||||
final timestampSeconds = message.timestamp.millisecondsSinceEpoch ~/ 1000;
|
||||
|
||||
@@ -231,6 +295,15 @@ class MessageRetryService extends ChangeNotifier {
|
||||
|
||||
if (_sendMessageCallback != null) {
|
||||
_sendMessageCallback!(contact, message.text, attempt, timestampSeconds);
|
||||
} else {
|
||||
// No send callback — message would be stuck forever. Fail it immediately.
|
||||
debugPrint(
|
||||
'_attemptSend: no sendMessageCallback, failing message $messageId',
|
||||
);
|
||||
final failedMessage = message.copyWith(status: MessageStatus.failed);
|
||||
_pendingMessages[messageId] = failedMessage;
|
||||
_updateMessageCallback?.call(failedMessage);
|
||||
_onMessageResolved(messageId, contact.publicKeyHex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,6 +354,7 @@ class MessageRetryService extends ChangeNotifier {
|
||||
}
|
||||
|
||||
// FALLBACK: Old queue-based matching (for messages sent before hash computation was added)
|
||||
// Only match within a single contact's queue to avoid cross-contact mismatches.
|
||||
if (messageId == null && allowQueueFallback) {
|
||||
_debugLogService?.warn(
|
||||
'RESP_CODE_SENT: ACK hash $ackHashHex not found in hash table, falling back to queue',
|
||||
@@ -290,13 +364,16 @@ class MessageRetryService extends ChangeNotifier {
|
||||
'Hash-based match failed for $ackHashHex, falling back to queue-based matching',
|
||||
);
|
||||
|
||||
for (var entry in _pendingMessageQueuePerContact.entries) {
|
||||
// Search all contact queues so concurrent chats don't miss matches.
|
||||
final queuesToSearch = _pendingMessageQueuePerContact;
|
||||
|
||||
for (var entry in queuesToSearch.entries) {
|
||||
final contactKey = entry.key;
|
||||
final queue = entry.value;
|
||||
|
||||
if (queue.isNotEmpty) {
|
||||
// Drain stale entries until we find a valid one or exhaust the queue.
|
||||
while (queue.isNotEmpty) {
|
||||
final candidateMessageId = queue.removeAt(0);
|
||||
|
||||
if (_pendingMessages.containsKey(candidateMessageId)) {
|
||||
messageId = candidateMessageId;
|
||||
contact = _pendingContacts[candidateMessageId];
|
||||
@@ -304,21 +381,10 @@ class MessageRetryService extends ChangeNotifier {
|
||||
'Queue-based match (fallback): $ackHashHex → message $messageId for $contactKey',
|
||||
);
|
||||
break;
|
||||
} else {
|
||||
debugPrint('Dequeued stale message $candidateMessageId - skipping');
|
||||
if (queue.isNotEmpty) {
|
||||
final nextMessageId = queue.removeAt(0);
|
||||
if (_pendingMessages.containsKey(nextMessageId)) {
|
||||
messageId = nextMessageId;
|
||||
contact = _pendingContacts[nextMessageId];
|
||||
debugPrint(
|
||||
'Queue-based match (fallback): $ackHashHex → message $messageId',
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
debugPrint('Dequeued stale message $candidateMessageId - skipping');
|
||||
}
|
||||
if (messageId != null) break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,22 +529,7 @@ class MessageRetryService extends ChangeNotifier {
|
||||
} else {
|
||||
// Max retries reached - mark as failed
|
||||
final failedMessage = message.copyWith(status: MessageStatus.failed);
|
||||
|
||||
// Move ACK hashes to history before removing
|
||||
_moveAckHashesToHistory(messageId);
|
||||
|
||||
_pendingMessages.remove(messageId);
|
||||
_pendingContacts.remove(messageId);
|
||||
_pendingPathSelections.remove(messageId);
|
||||
_timeoutTimers[messageId]?.cancel();
|
||||
_timeoutTimers.remove(messageId);
|
||||
|
||||
// Clean up the queue entry for this contact
|
||||
_pendingMessageQueuePerContact[contact.publicKeyHex]?.remove(messageId);
|
||||
if (_pendingMessageQueuePerContact[contact.publicKeyHex]?.isEmpty ??
|
||||
false) {
|
||||
_pendingMessageQueuePerContact.remove(contact.publicKeyHex);
|
||||
}
|
||||
_pendingMessages[messageId] = failedMessage;
|
||||
|
||||
// Check if we should clear the path on max retry
|
||||
if (_appSettingsService?.settings.clearPathOnMaxRetry == true &&
|
||||
@@ -499,6 +550,30 @@ class MessageRetryService extends ChangeNotifier {
|
||||
}
|
||||
|
||||
notifyListeners();
|
||||
|
||||
// Message is done retrying — send next queued message for this contact
|
||||
_onMessageResolved(messageId, contact.publicKeyHex);
|
||||
|
||||
// Keep message in pending maps for 30s grace period so late ACKs
|
||||
// can still match and update the message to delivered.
|
||||
_timeoutTimers[messageId] = Timer(const Duration(seconds: 30), () {
|
||||
_moveAckHashesToHistory(messageId);
|
||||
// Clean up ALL hash mappings for this message
|
||||
_ackHashToMessageId.removeWhere(
|
||||
(_, mapping) => mapping.messageId == messageId,
|
||||
);
|
||||
_expectedHashToMessageId.removeWhere((_, msgId) => msgId == messageId);
|
||||
_pendingMessages.remove(messageId);
|
||||
_pendingContacts.remove(messageId);
|
||||
_pendingPathSelections.remove(messageId);
|
||||
_timeoutTimers.remove(messageId);
|
||||
_resolvedMessages.remove(messageId);
|
||||
final contactKey = contact.publicKeyHex;
|
||||
_pendingMessageQueuePerContact[contactKey]?.remove(messageId);
|
||||
if (_pendingMessageQueuePerContact[contactKey]?.isEmpty ?? false) {
|
||||
_pendingMessageQueuePerContact.remove(contactKey);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -594,7 +669,15 @@ class MessageRetryService extends ChangeNotifier {
|
||||
}
|
||||
|
||||
if (matchedMessageId != null) {
|
||||
final message = _pendingMessages[matchedMessageId]!;
|
||||
final message = _pendingMessages[matchedMessageId];
|
||||
if (message == null) {
|
||||
// Message was already cleaned up (e.g. grace period expired)
|
||||
_ackHashToMessageId.remove(ackHashHex);
|
||||
debugPrint(
|
||||
'ACK matched $matchedMessageId but message already cleaned up',
|
||||
);
|
||||
return;
|
||||
}
|
||||
final contact = _pendingContacts[matchedMessageId];
|
||||
final selection = _pendingPathSelections[matchedMessageId];
|
||||
|
||||
@@ -616,12 +699,21 @@ class MessageRetryService extends ChangeNotifier {
|
||||
tripTimeMs: tripTimeMs,
|
||||
);
|
||||
|
||||
// Clean up ALL hash mappings for this message (from all retry attempts)
|
||||
_ackHashToMessageId.removeWhere(
|
||||
(_, mapping) => mapping.messageId == matchedMessageId,
|
||||
);
|
||||
_expectedHashToMessageId.removeWhere(
|
||||
(_, msgId) => msgId == matchedMessageId,
|
||||
);
|
||||
|
||||
// Move ACK hashes to history before removing
|
||||
_moveAckHashesToHistory(matchedMessageId);
|
||||
|
||||
_pendingMessages.remove(matchedMessageId);
|
||||
_pendingContacts.remove(matchedMessageId);
|
||||
_pendingPathSelections.remove(matchedMessageId);
|
||||
_resolvedMessages.remove(matchedMessageId);
|
||||
|
||||
// Clean up the queue entry for this contact (remove any remaining references to this message)
|
||||
if (contact != null) {
|
||||
@@ -646,6 +738,7 @@ class MessageRetryService extends ChangeNotifier {
|
||||
true,
|
||||
tripTimeMs,
|
||||
);
|
||||
_onMessageResolved(matchedMessageId, contact.publicKeyHex);
|
||||
}
|
||||
|
||||
notifyListeners();
|
||||
@@ -783,6 +876,9 @@ class MessageRetryService extends ChangeNotifier {
|
||||
_ackHistory.clear();
|
||||
_ackHashToMessageId.clear();
|
||||
_pendingMessageQueuePerContact.clear();
|
||||
_sendQueue.clear();
|
||||
_activeMessages.clear();
|
||||
_resolvedMessages.clear();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import 'dart:io' show Platform, File;
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import '../l10n/app_localizations.dart';
|
||||
import '../utils/platform_info.dart';
|
||||
|
||||
class NotificationService {
|
||||
static final NotificationService _instance = NotificationService._internal();
|
||||
@@ -63,14 +65,27 @@ class NotificationService {
|
||||
appUserModelId: 'org.meshcore.open.app',
|
||||
guid: 'e7ea8f85-72f5-4f36-91f6-038f740ccf86',
|
||||
);
|
||||
const linuxSettings = LinuxInitializationSettings(
|
||||
defaultActionName: 'Open notification',
|
||||
);
|
||||
|
||||
const initSettings = InitializationSettings(
|
||||
android: androidSettings,
|
||||
iOS: iosSettings,
|
||||
macOS: macSettings,
|
||||
windows: windowsSettings,
|
||||
linux: linuxSettings,
|
||||
);
|
||||
|
||||
// On Linux, the notifications plugin opens a D-Bus session bus
|
||||
// connection whose async subscription can throw an unhandled
|
||||
// SocketException when the bus socket is missing (e.g. running as
|
||||
// root or inside a container without a session bus).
|
||||
if (PlatformInfo.isLinux && !_isDbusSessionAvailable()) {
|
||||
debugPrint('Skipping notification init: D-Bus session bus unavailable');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await _notifications.initialize(
|
||||
settings: initSettings,
|
||||
@@ -82,6 +97,15 @@ class NotificationService {
|
||||
}
|
||||
}
|
||||
|
||||
static bool _isDbusSessionAvailable() {
|
||||
final addr = Platform.environment['DBUS_SESSION_BUS_ADDRESS'];
|
||||
if (addr != null && addr.isNotEmpty) return true;
|
||||
// Fallback: check the default socket for the current user.
|
||||
final uid = Platform.environment['UID'] ?? Platform.environment['EUID'];
|
||||
final path = '/run/user/${uid ?? '1000'}/bus';
|
||||
return File(path).existsSync();
|
||||
}
|
||||
|
||||
Future<bool> _ensureInitialized() async {
|
||||
if (!_isInitialized) {
|
||||
await initialize();
|
||||
@@ -208,7 +232,9 @@ class NotificationService {
|
||||
|
||||
try {
|
||||
await _notifications.show(
|
||||
id: contactId?.hashCode ?? DateTime.now().millisecondsSinceEpoch,
|
||||
id: contactId != null
|
||||
? 'advert:$contactId'.hashCode
|
||||
: DateTime.now().millisecondsSinceEpoch,
|
||||
title: _l10n.notification_newTypeDiscovered(contactType),
|
||||
body: contactName,
|
||||
notificationDetails: notificationDetails,
|
||||
@@ -307,6 +333,61 @@ class NotificationService {
|
||||
await _notifications.cancel(id: id);
|
||||
}
|
||||
|
||||
/// Cancel the notification for a specific contact and update the app badge.
|
||||
Future<void> clearContactNotification(
|
||||
String contactId,
|
||||
int totalUnreadCount,
|
||||
) async {
|
||||
if (!await _ensureInitialized()) return;
|
||||
await _notifications.cancel(id: contactId.hashCode);
|
||||
await _updateBadge(totalUnreadCount);
|
||||
}
|
||||
|
||||
/// Cancel the notification for a specific channel and update the app badge.
|
||||
Future<void> clearChannelNotification(
|
||||
int channelIndex,
|
||||
int totalUnreadCount,
|
||||
) async {
|
||||
if (!await _ensureInitialized()) return;
|
||||
await _notifications.cancel(id: channelIndex.hashCode);
|
||||
await _updateBadge(totalUnreadCount);
|
||||
}
|
||||
|
||||
/// Cancel advert notifications for the given contact public key hexes.
|
||||
Future<void> clearAdvertNotifications(List<String> contactIds) async {
|
||||
if (!await _ensureInitialized()) return;
|
||||
for (final id in contactIds) {
|
||||
await _notifications.cancel(id: 'advert:$id'.hashCode);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _updateBadge(int count) async {
|
||||
if (PlatformInfo.isIOS || PlatformInfo.isMacOS) {
|
||||
// On Apple platforms, set the badge number directly via a silent update.
|
||||
final darwinDetails = DarwinNotificationDetails(
|
||||
presentAlert: false,
|
||||
presentSound: false,
|
||||
presentBadge: true,
|
||||
badgeNumber: count,
|
||||
);
|
||||
final details = NotificationDetails(
|
||||
iOS: darwinDetails,
|
||||
macOS: darwinDetails,
|
||||
);
|
||||
// Use a fixed ID so each update replaces the previous one.
|
||||
await _notifications.show(
|
||||
id: 'badge_update'.hashCode,
|
||||
title: null,
|
||||
body: null,
|
||||
notificationDetails: details,
|
||||
);
|
||||
// Immediately cancel the silent notification so it doesn't appear in tray.
|
||||
await _notifications.cancel(id: 'badge_update'.hashCode);
|
||||
}
|
||||
// On Android, badge count is derived from active notifications,
|
||||
// so cancelling the specific notification above is sufficient.
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────
|
||||
// Public notification methods (rate limiting is enforced automatically)
|
||||
// ─────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -15,6 +15,9 @@ class PathHistoryService extends ChangeNotifier {
|
||||
final List<String> _cacheAccessOrder = [];
|
||||
|
||||
static const int _maxHistoryEntries = 100;
|
||||
|
||||
int _version = 0;
|
||||
int get version => _version;
|
||||
static const int _autoRotationTopCount = 3;
|
||||
|
||||
PathHistoryService(this._storage);
|
||||
@@ -185,6 +188,7 @@ class PathHistoryService extends ChangeNotifier {
|
||||
) {
|
||||
var history = _cache[contactPubKeyHex];
|
||||
if (history == null) return;
|
||||
_version++;
|
||||
|
||||
final existing = _findPathRecord(contactPubKeyHex, pathBytes);
|
||||
if (existing != null) {
|
||||
@@ -241,6 +245,7 @@ class PathHistoryService extends ChangeNotifier {
|
||||
_cache[contactPubKeyHex] = loaded;
|
||||
_trackAccess(contactPubKeyHex);
|
||||
_evictIfNeeded();
|
||||
_version++;
|
||||
notifyListeners();
|
||||
}
|
||||
});
|
||||
@@ -276,6 +281,7 @@ class PathHistoryService extends ChangeNotifier {
|
||||
_autoRotationIndex.remove(contactPubKeyHex);
|
||||
_floodStats.remove(contactPubKeyHex);
|
||||
await _storage.clearPathHistory(contactPubKeyHex);
|
||||
_version++;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
@@ -295,6 +301,7 @@ class PathHistoryService extends ChangeNotifier {
|
||||
);
|
||||
|
||||
await _storage.savePathHistory(contactPubKeyHex, _cache[contactPubKeyHex]!);
|
||||
_version++;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export 'tcp_transport_service_native.dart'
|
||||
if (dart.library.js_interop) 'tcp_transport_service_web.dart';
|
||||
@@ -0,0 +1,210 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'app_debug_log_service.dart';
|
||||
import 'usb_serial_frame_codec.dart';
|
||||
|
||||
class TcpTransportService {
|
||||
final StreamController<Uint8List> _frameController =
|
||||
StreamController<Uint8List>.broadcast();
|
||||
final UsbSerialFrameDecoder _frameDecoder = UsbSerialFrameDecoder();
|
||||
|
||||
StreamSubscription<Uint8List>? _socketSubscription;
|
||||
Socket? _socket;
|
||||
AppDebugLogService? _debugLogService;
|
||||
TcpTransportStatus _status = TcpTransportStatus.disconnected;
|
||||
String? _activeHost;
|
||||
int? _activePort;
|
||||
Future<void> _pendingWrite = Future<void>.value();
|
||||
int _connectGeneration = 0;
|
||||
|
||||
TcpTransportStatus get status => _status;
|
||||
Stream<Uint8List> get frameStream => _frameController.stream;
|
||||
bool get isConnected => _status == TcpTransportStatus.connected;
|
||||
String? get activeEndpoint => _activeHost == null || _activePort == null
|
||||
? null
|
||||
: '$_activeHost:$_activePort';
|
||||
|
||||
void setDebugLogService(AppDebugLogService? service) {
|
||||
_debugLogService = service;
|
||||
}
|
||||
|
||||
Future<void> connect({
|
||||
required String host,
|
||||
required int port,
|
||||
Duration timeout = const Duration(seconds: 10),
|
||||
}) async {
|
||||
if (_status == TcpTransportStatus.connected ||
|
||||
_status == TcpTransportStatus.connecting) {
|
||||
throw StateError('TCP transport is already active');
|
||||
}
|
||||
final trimmedHost = host.trim();
|
||||
if (trimmedHost.isEmpty) {
|
||||
throw ArgumentError.value(host, 'host', 'Host cannot be empty');
|
||||
}
|
||||
if (port < 1 || port > 65535) {
|
||||
throw ArgumentError.value(port, 'port', 'Port must be in 1..65535');
|
||||
}
|
||||
|
||||
_status = TcpTransportStatus.connecting;
|
||||
final generation = ++_connectGeneration;
|
||||
_frameDecoder.reset();
|
||||
|
||||
try {
|
||||
final socket = await Socket.connect(trimmedHost, port, timeout: timeout);
|
||||
if (generation != _connectGeneration ||
|
||||
_status != TcpTransportStatus.connecting) {
|
||||
try {
|
||||
await socket.close();
|
||||
} catch (_) {}
|
||||
try {
|
||||
socket.destroy();
|
||||
} catch (_) {}
|
||||
return;
|
||||
}
|
||||
socket.setOption(SocketOption.tcpNoDelay, true);
|
||||
_socket = socket;
|
||||
_activeHost = trimmedHost;
|
||||
_activePort = port;
|
||||
_socketSubscription = socket.listen(
|
||||
_handleSocketData,
|
||||
onError: _handleSocketError,
|
||||
onDone: _handleSocketDone,
|
||||
);
|
||||
_status = TcpTransportStatus.connected;
|
||||
_debugLogService?.info(
|
||||
'TCP transport opened endpoint=$activeEndpoint',
|
||||
tag: 'TCP',
|
||||
);
|
||||
} catch (error) {
|
||||
await _cleanupFailedConnect();
|
||||
_status = TcpTransportStatus.disconnected;
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> write(Uint8List data) async {
|
||||
if (!isConnected || _socket == null) {
|
||||
throw StateError('TCP transport is not connected');
|
||||
}
|
||||
|
||||
final packet = wrapUsbSerialTxFrame(data);
|
||||
_logFrameSummary('TCP TX frame', data);
|
||||
|
||||
final writeTask = _pendingWrite.then((_) async {
|
||||
final socket = _socket;
|
||||
if (!isConnected || socket == null) {
|
||||
throw StateError('TCP transport is not connected');
|
||||
}
|
||||
socket.add(packet);
|
||||
await socket.flush();
|
||||
});
|
||||
|
||||
_pendingWrite = writeTask.catchError((_) {});
|
||||
await writeTask;
|
||||
}
|
||||
|
||||
Future<void> disconnect() async {
|
||||
_connectGeneration += 1;
|
||||
if (_status == TcpTransportStatus.disconnected) return;
|
||||
|
||||
final endpoint = activeEndpoint;
|
||||
_status = TcpTransportStatus.disconnecting;
|
||||
_frameDecoder.reset();
|
||||
_activeHost = null;
|
||||
_activePort = null;
|
||||
|
||||
final subscription = _socketSubscription;
|
||||
_socketSubscription = null;
|
||||
await subscription?.cancel();
|
||||
|
||||
final socket = _socket;
|
||||
_socket = null;
|
||||
try {
|
||||
await socket?.close();
|
||||
} catch (_) {}
|
||||
try {
|
||||
socket?.destroy();
|
||||
} catch (_) {}
|
||||
|
||||
_status = TcpTransportStatus.disconnected;
|
||||
_debugLogService?.info(
|
||||
'TCP transport closed endpoint=${endpoint ?? 'unknown'}',
|
||||
tag: 'TCP',
|
||||
);
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unawaited(disconnect().whenComplete(_closeFrameController));
|
||||
}
|
||||
|
||||
Future<void> _cleanupFailedConnect() async {
|
||||
final subscription = _socketSubscription;
|
||||
_socketSubscription = null;
|
||||
await subscription?.cancel();
|
||||
final socket = _socket;
|
||||
_socket = null;
|
||||
try {
|
||||
await socket?.close();
|
||||
} catch (_) {}
|
||||
try {
|
||||
socket?.destroy();
|
||||
} catch (_) {}
|
||||
_activeHost = null;
|
||||
_activePort = null;
|
||||
_frameDecoder.reset();
|
||||
}
|
||||
|
||||
void _handleSocketData(Uint8List bytes) {
|
||||
for (final packet in _frameDecoder.ingest(bytes)) {
|
||||
if (!packet.isRxFrame) {
|
||||
_debugLogService?.info(
|
||||
'TCP ignored packet start=0x${packet.frameStart.toRadixString(16).padLeft(2, '0')} len=${packet.payload.length}',
|
||||
tag: 'TCP',
|
||||
);
|
||||
continue;
|
||||
}
|
||||
_addFrame(packet.payload);
|
||||
}
|
||||
}
|
||||
|
||||
void _handleSocketError(Object error, [StackTrace? stackTrace]) {
|
||||
_addFrameError(error, stackTrace);
|
||||
unawaited(disconnect());
|
||||
}
|
||||
|
||||
void _handleSocketDone() {
|
||||
if (_status == TcpTransportStatus.disconnecting ||
|
||||
_status == TcpTransportStatus.disconnected) {
|
||||
return;
|
||||
}
|
||||
_addFrameError(StateError('TCP socket closed by remote endpoint'));
|
||||
unawaited(disconnect());
|
||||
}
|
||||
|
||||
void _addFrame(Uint8List payload) {
|
||||
if (_frameController.isClosed) return;
|
||||
_frameController.add(payload);
|
||||
}
|
||||
|
||||
void _addFrameError(Object error, [StackTrace? stackTrace]) {
|
||||
if (_frameController.isClosed) return;
|
||||
_frameController.addError(error, stackTrace);
|
||||
}
|
||||
|
||||
void _logFrameSummary(String prefix, Uint8List payload) {
|
||||
final code = payload.isNotEmpty ? payload.first : -1;
|
||||
_debugLogService?.info(
|
||||
'$prefix code=$code len=${payload.length}',
|
||||
tag: 'TCP',
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _closeFrameController() async {
|
||||
if (_frameController.isClosed) return;
|
||||
await _frameController.close();
|
||||
}
|
||||
}
|
||||
|
||||
enum TcpTransportStatus { disconnected, connecting, connected, disconnecting }
|
||||
@@ -0,0 +1,35 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'app_debug_log_service.dart';
|
||||
|
||||
class TcpTransportService {
|
||||
AppDebugLogService? _debugLogService;
|
||||
|
||||
Stream<Uint8List> get frameStream => const Stream<Uint8List>.empty();
|
||||
bool get isConnected => false;
|
||||
String? get activeEndpoint => null;
|
||||
|
||||
void setDebugLogService(AppDebugLogService? service) {
|
||||
_debugLogService = service;
|
||||
}
|
||||
|
||||
Future<void> connect({
|
||||
required String host,
|
||||
required int port,
|
||||
Duration timeout = const Duration(seconds: 10),
|
||||
}) async {
|
||||
_debugLogService?.warn(
|
||||
'TCP transport requested on web for $host:$port',
|
||||
tag: 'TCP',
|
||||
);
|
||||
throw UnsupportedError('TCP transport is not supported on web.');
|
||||
}
|
||||
|
||||
Future<void> write(Uint8List data) async {
|
||||
throw UnsupportedError('TCP transport is not supported on web.');
|
||||
}
|
||||
|
||||
Future<void> disconnect() async {}
|
||||
|
||||
void dispose() {}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
const int usbSerialTxFrameStart = 0x3c;
|
||||
const int usbSerialRxFrameStart = 0x3e;
|
||||
const int usbSerialHeaderLength = 3;
|
||||
const int usbSerialMaxPayloadLength = 172;
|
||||
|
||||
Uint8List wrapUsbSerialTxFrame(Uint8List payload) {
|
||||
if (payload.length > usbSerialMaxPayloadLength) {
|
||||
throw ArgumentError.value(
|
||||
payload.length,
|
||||
'payload.length',
|
||||
'USB serial payload exceeds $usbSerialMaxPayloadLength bytes',
|
||||
);
|
||||
}
|
||||
final packet = Uint8List(usbSerialHeaderLength + payload.length);
|
||||
packet[0] = usbSerialTxFrameStart;
|
||||
packet[1] = payload.length & 0xff;
|
||||
packet[2] = (payload.length >> 8) & 0xff;
|
||||
packet.setRange(usbSerialHeaderLength, packet.length, payload);
|
||||
return packet;
|
||||
}
|
||||
|
||||
class UsbSerialDecodedPacket {
|
||||
const UsbSerialDecodedPacket({
|
||||
required this.frameStart,
|
||||
required this.payload,
|
||||
});
|
||||
|
||||
final int frameStart;
|
||||
final Uint8List payload;
|
||||
|
||||
bool get isRxFrame => frameStart == usbSerialRxFrameStart;
|
||||
}
|
||||
|
||||
class UsbSerialFrameDecoder {
|
||||
final List<int> _rxBuffer = <int>[];
|
||||
int _startIndex = 0;
|
||||
|
||||
void reset() {
|
||||
_rxBuffer.clear();
|
||||
_startIndex = 0;
|
||||
}
|
||||
|
||||
List<UsbSerialDecodedPacket> ingest(Uint8List bytes) {
|
||||
if (bytes.isEmpty) {
|
||||
return const <UsbSerialDecodedPacket>[];
|
||||
}
|
||||
|
||||
_rxBuffer.addAll(bytes);
|
||||
final packets = <UsbSerialDecodedPacket>[];
|
||||
|
||||
while (true) {
|
||||
if (_startIndex >= _rxBuffer.length) {
|
||||
_rxBuffer.clear();
|
||||
_startIndex = 0;
|
||||
return packets;
|
||||
}
|
||||
|
||||
if (_rxBuffer[_startIndex] != usbSerialRxFrameStart &&
|
||||
_rxBuffer[_startIndex] != usbSerialTxFrameStart) {
|
||||
_startIndex++;
|
||||
_compactBufferIfNeeded();
|
||||
continue;
|
||||
}
|
||||
|
||||
final availableLength = _rxBuffer.length - _startIndex;
|
||||
if (availableLength < usbSerialHeaderLength) {
|
||||
_compactBufferIfNeeded(force: true);
|
||||
return packets;
|
||||
}
|
||||
|
||||
final payloadLength =
|
||||
_rxBuffer[_startIndex + 1] | (_rxBuffer[_startIndex + 2] << 8);
|
||||
if (payloadLength > usbSerialMaxPayloadLength) {
|
||||
_startIndex++;
|
||||
_compactBufferIfNeeded();
|
||||
continue;
|
||||
}
|
||||
final packetLength = usbSerialHeaderLength + payloadLength;
|
||||
if (availableLength < packetLength) {
|
||||
_compactBufferIfNeeded(force: true);
|
||||
return packets;
|
||||
}
|
||||
|
||||
final frameStart = _rxBuffer[_startIndex];
|
||||
final payload = Uint8List.fromList(
|
||||
_rxBuffer.sublist(
|
||||
_startIndex + usbSerialHeaderLength,
|
||||
_startIndex + packetLength,
|
||||
),
|
||||
);
|
||||
_startIndex += packetLength;
|
||||
_compactBufferIfNeeded();
|
||||
packets.add(
|
||||
UsbSerialDecodedPacket(frameStart: frameStart, payload: payload),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void _compactBufferIfNeeded({bool force = false}) {
|
||||
if (_startIndex == 0) {
|
||||
return;
|
||||
}
|
||||
if (!force && _startIndex < 1024 && _startIndex < (_rxBuffer.length ~/ 2)) {
|
||||
return;
|
||||
}
|
||||
_rxBuffer.removeRange(0, _startIndex);
|
||||
_startIndex = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export 'usb_serial_service_native.dart'
|
||||
if (dart.library.js_interop) 'usb_serial_service_web.dart';
|
||||
@@ -0,0 +1,463 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flserial/flserial.dart';
|
||||
import 'package:flserial/flserial_exception.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'app_debug_log_service.dart';
|
||||
import '../utils/macos_usb_device_names.dart';
|
||||
import '../utils/platform_info.dart';
|
||||
import '../utils/usb_port_labels.dart';
|
||||
import 'usb_serial_frame_codec.dart';
|
||||
|
||||
/// Wraps the native flserial plugin to expose a stream of raw bytes for the
|
||||
/// MeshCore connector to consume.
|
||||
class UsbSerialService {
|
||||
UsbSerialService();
|
||||
|
||||
static const MethodChannel _androidMethodChannel = MethodChannel(
|
||||
'meshcore_open/android_usb_serial',
|
||||
);
|
||||
static const EventChannel _androidEventChannel = EventChannel(
|
||||
'meshcore_open/android_usb_serial_events',
|
||||
);
|
||||
final StreamController<Uint8List> _frameController =
|
||||
StreamController<Uint8List>.broadcast();
|
||||
final UsbSerialFrameDecoder _frameDecoder = UsbSerialFrameDecoder();
|
||||
StreamSubscription<dynamic>? _androidDataSubscription;
|
||||
StreamSubscription<FlSerialEventArgs>? _dataSubscription;
|
||||
UsbSerialStatus _status = UsbSerialStatus.disconnected;
|
||||
String? _connectedPortKey;
|
||||
String? _connectedPortLabel;
|
||||
FlSerial? _serial;
|
||||
AppDebugLogService? _debugLogService;
|
||||
|
||||
UsbSerialStatus get status => _status;
|
||||
String? get activePortKey => _connectedPortKey;
|
||||
String? get activePortDisplayLabel =>
|
||||
_connectedPortLabel ?? _connectedPortKey;
|
||||
Stream<Uint8List> get frameStream => _frameController.stream;
|
||||
bool get _useAndroidUsbHost =>
|
||||
!kIsWeb && defaultTargetPlatform == TargetPlatform.android;
|
||||
bool get _useDesktopFlSerial =>
|
||||
PlatformInfo.isWindows || PlatformInfo.isLinux || PlatformInfo.isMacOS;
|
||||
bool get _isSupportedPlatform => _useAndroidUsbHost || _useDesktopFlSerial;
|
||||
// Always-fresh: do NOT use ??= here – a cached FlSerial retains stale
|
||||
// native handle state (flh) from a prior failed open, causing subsequent
|
||||
// open attempts to fail with "port not exist" even when the device is present.
|
||||
FlSerial _freshSerial() => FlSerial();
|
||||
|
||||
bool get isConnected {
|
||||
if (!_isSupportedPlatform) {
|
||||
return false;
|
||||
}
|
||||
// Trust _status as the authoritative connection state. Polling
|
||||
// _serial?.isOpen() via the native FL_CTRL_IS_PORT_OPEN query is
|
||||
// unreliable during the brief USB re-enumeration window that many
|
||||
// microcontrollers (e.g. NRF52) trigger in response to DTR assertion.
|
||||
// Actual port drops are handled by the onDone / onError callbacks on the
|
||||
// serial data stream subscription, which update _status correctly.
|
||||
return _status == UsbSerialStatus.connected;
|
||||
}
|
||||
|
||||
Future<List<String>> listPorts() async {
|
||||
if (!_isSupportedPlatform) {
|
||||
return const <String>[];
|
||||
}
|
||||
if (_useAndroidUsbHost) {
|
||||
final ports = await _androidMethodChannel.invokeListMethod<String>(
|
||||
'listPorts',
|
||||
);
|
||||
return ports ?? <String>[];
|
||||
}
|
||||
final rawPorts = FlSerial.listPorts();
|
||||
// On macOS, flserial's native device-name lookup is broken on macOS
|
||||
// 10.15+ because the IOKit class name changed from IOUSBDevice to
|
||||
// IOUSBHostDevice. We resolve names ourselves via ioreg and rewrite any
|
||||
// "port - n/a" entries with the real product name.
|
||||
if (Platform.isMacOS && rawPorts.isNotEmpty) {
|
||||
return _annotateMacOsPorts(rawPorts);
|
||||
}
|
||||
return Future.value(rawPorts);
|
||||
}
|
||||
|
||||
/// Rewrites the flserial port list on macOS by substituting real USB device
|
||||
/// names (obtained via [ioreg]) for the "n/a" placeholders that flserial
|
||||
/// returns when it can't find the deprecated IOUSBDevice parent.
|
||||
Future<List<String>> _annotateMacOsPorts(List<String> rawPorts) async {
|
||||
final deviceNames = await queryMacOsUsbDeviceNames();
|
||||
if (deviceNames.isEmpty) return rawPorts;
|
||||
return rawPorts.map((entry) {
|
||||
// entry format from fl_ports: "port - description - hardware_id"
|
||||
final port = normalizeUsbPortName(entry); // e.g. /dev/cu.usbmodem1101
|
||||
final knownName = deviceNames[port]; // e.g. "Nordic NRF52 DK"
|
||||
if (knownName == null) return entry; // non-USB port, keep as-is
|
||||
// Replace description field only; preserve hardware_id for device
|
||||
// identity (used by normalizeUsbPortName).
|
||||
final segments = entry.split(' - ');
|
||||
final hardwareId = segments.length >= 3 ? segments.last : 'n/a';
|
||||
return '$port - $knownName - $hardwareId';
|
||||
}).toList();
|
||||
}
|
||||
|
||||
void setDebugLogService(AppDebugLogService? service) {
|
||||
_debugLogService = service;
|
||||
}
|
||||
|
||||
Future<void> connect({
|
||||
required String portName,
|
||||
int baudRate = 115200,
|
||||
}) async {
|
||||
if (_status == UsbSerialStatus.connected ||
|
||||
_status == UsbSerialStatus.connecting) {
|
||||
throw StateError('USB serial transport is already active');
|
||||
}
|
||||
if (!_isSupportedPlatform) {
|
||||
throw UnsupportedError('USB serial is not supported on this platform.');
|
||||
}
|
||||
|
||||
_status = UsbSerialStatus.connecting;
|
||||
var normalizedPortName = normalizeUsbPortName(portName);
|
||||
_frameDecoder.reset();
|
||||
|
||||
if (_useAndroidUsbHost) {
|
||||
try {
|
||||
await _androidMethodChannel.invokeMethod<void>('connect', {
|
||||
'portName': normalizedPortName,
|
||||
'baudRate': baudRate,
|
||||
});
|
||||
_debugLogService?.info(
|
||||
'USB serial opened port=$normalizedPortName on Android via USB host bridge',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
} on PlatformException catch (error) {
|
||||
_status = UsbSerialStatus.disconnected;
|
||||
final msg = error.message ?? error.code;
|
||||
_debugLogService?.error(
|
||||
'Android connect failed: $msg',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
rethrow;
|
||||
}
|
||||
} else {
|
||||
// ── Hot-restart guard ─────────────────────────────────────────────────
|
||||
// On hot restart Dart tears down the isolate without calling dispose().
|
||||
// The NativeCallable registered by flserial's setCallback() is
|
||||
// isolate-local and gets freed when the isolate dies, but the native
|
||||
// SerialThread is still alive and will call it → crash.
|
||||
//
|
||||
// flserial uses process-global native state. Calling fl_free() kills ALL
|
||||
// SerialThreads for every open port across all Dart isolates (there is
|
||||
// only one in a Flutter app). Then fl_init() re-initialises the slot
|
||||
// table so subsequent fl_open() calls work normally.
|
||||
//
|
||||
// This must happen before we register any new NativeCallable, so it must
|
||||
// be the very first thing we do in the desktop branch.
|
||||
try {
|
||||
bindings.fl_free();
|
||||
bindings.fl_init(16);
|
||||
} catch (_) {}
|
||||
|
||||
// On macOS, flserial lists both cu.* and tty.* device nodes.
|
||||
// When a cu.* open fails with FL_ERROR_PORT_NOT_EXIST, try the tty.*
|
||||
// variant as a fallback (and vice-versa) before giving up.
|
||||
final candidates = _buildPortCandidates(normalizedPortName);
|
||||
FlSerialException? lastError;
|
||||
bool opened = false;
|
||||
|
||||
for (final candidate in candidates) {
|
||||
// Always create a fresh FlSerial instance — a cached instance retains
|
||||
// a stale flh handle from prior failed opens, which causes the native
|
||||
// fl_open() to mis-route the request and report port-not-exist even
|
||||
// when the device node is physically present.
|
||||
final serial = _freshSerial();
|
||||
serial.init();
|
||||
try {
|
||||
final openStatus = serial.openPort(candidate, baudRate);
|
||||
if (openStatus != FlOpenStatus.open) {
|
||||
final msg =
|
||||
'Failed to open USB port $candidate (status: $openStatus)';
|
||||
_debugLogService?.error(msg, tag: 'USB Serial');
|
||||
// Not a FlSerialException — treat as terminal failure
|
||||
_status = UsbSerialStatus.disconnected;
|
||||
throw StateError(msg);
|
||||
}
|
||||
serial.setByteSize8();
|
||||
serial.setBitParityNone();
|
||||
serial.setStopBits1();
|
||||
serial.setFlowControlNone();
|
||||
serial.setRTS(false);
|
||||
serial.setDTR(true);
|
||||
_serial = serial;
|
||||
// Update the normalized port name to whichever candidate succeeded.
|
||||
normalizedPortName = candidate;
|
||||
_debugLogService?.info(
|
||||
'USB serial opened port=$candidate cts=${serial.getCTS()} dsr=${serial.getDSR()} dtr=true rts=false',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
opened = true;
|
||||
break;
|
||||
} on FlSerialException catch (error) {
|
||||
// The native fl_open() already called fl_close() on failure
|
||||
// internally, so no extra cleanup is needed here for this candidate.
|
||||
_debugLogService?.warn(
|
||||
'Failed to open $candidate: ${error.msg} (code ${error.error})',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
lastError = error;
|
||||
// Try next candidate
|
||||
} catch (error, stackTrace) {
|
||||
_status = UsbSerialStatus.disconnected;
|
||||
_debugLogService?.error(
|
||||
'Unexpected error opening $candidate: $error\n$stackTrace',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
if (!opened) {
|
||||
_status = UsbSerialStatus.disconnected;
|
||||
final primary = candidates.first;
|
||||
final msg = lastError != null
|
||||
? 'Failed to open USB port $primary: ${lastError.msg} (code ${lastError.error})'
|
||||
: 'Failed to open USB port $primary';
|
||||
_debugLogService?.error(msg, tag: 'USB Serial');
|
||||
throw StateError(msg);
|
||||
}
|
||||
}
|
||||
|
||||
_connectedPortKey = normalizedPortName;
|
||||
_connectedPortLabel = normalizedPortName;
|
||||
if (_useAndroidUsbHost) {
|
||||
_androidDataSubscription = _androidEventChannel
|
||||
.receiveBroadcastStream()
|
||||
.listen(
|
||||
_handleAndroidData,
|
||||
onError: _handleSerialError,
|
||||
onDone: _handleSerialDone,
|
||||
);
|
||||
} else {
|
||||
_dataSubscription = _serial!.onSerialData.stream.listen(
|
||||
_handleSerialData,
|
||||
onError: _handleSerialError,
|
||||
onDone: _handleSerialDone,
|
||||
);
|
||||
}
|
||||
_status = UsbSerialStatus.connected;
|
||||
}
|
||||
|
||||
Future<void> write(Uint8List data) async {
|
||||
if (!isConnected) {
|
||||
throw StateError('USB serial port is not open');
|
||||
}
|
||||
final packet = wrapUsbSerialTxFrame(data);
|
||||
_logFrameSummary('USB TX frame', data);
|
||||
if (_useAndroidUsbHost) {
|
||||
try {
|
||||
await _androidMethodChannel.invokeMethod<void>('write', {
|
||||
'data': packet,
|
||||
});
|
||||
} on PlatformException catch (error) {
|
||||
throw StateError(error.message ?? error.code);
|
||||
}
|
||||
} else {
|
||||
_serial!.write(packet);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> disconnect() async {
|
||||
if (_status == UsbSerialStatus.disconnected) return;
|
||||
|
||||
final portLabel = _connectedPortLabel ?? _connectedPortKey;
|
||||
_debugLogService?.info(
|
||||
'USB disconnect starting port=${portLabel ?? 'unknown'}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
_status = UsbSerialStatus.disconnecting;
|
||||
_connectedPortKey = null;
|
||||
_connectedPortLabel = null;
|
||||
_frameDecoder.reset();
|
||||
|
||||
if (_useAndroidUsbHost) {
|
||||
await _androidDataSubscription?.cancel();
|
||||
_androidDataSubscription = null;
|
||||
try {
|
||||
await _androidMethodChannel.invokeMethod<void>('disconnect');
|
||||
} catch (_) {
|
||||
// Ignore errors while closing.
|
||||
}
|
||||
} else {
|
||||
// IMPORTANT: Close and free the native port FIRST, before cancelling the
|
||||
// Dart subscription. The native SerialThread is blocked on a read(); once
|
||||
// closePort() is called it unblocks and the thread exits. If we cancel
|
||||
// the Dart subscription first (freeing the FFI callback pointer) and the
|
||||
// thread fires one final callback before noticing the port is gone, Dart
|
||||
// crashes with "Callback invoked after it has been deleted".
|
||||
final serial = _serial;
|
||||
_serial = null;
|
||||
try {
|
||||
if (serial?.isOpen() == FlOpenStatus.open) {
|
||||
serial?.closePort();
|
||||
}
|
||||
} catch (_) {
|
||||
// Ignore errors while closing.
|
||||
}
|
||||
// Note: we do NOT call free() here; that would globally reset native
|
||||
// state for all ports. The global reset is done in connect() instead,
|
||||
// before the next open, which is the safer place to do it.
|
||||
|
||||
// Now it is safe to cancel the Dart subscription — the native thread has
|
||||
// already seen the port close and will not fire any more callbacks.
|
||||
await _dataSubscription?.cancel();
|
||||
_dataSubscription = null;
|
||||
}
|
||||
_status = UsbSerialStatus.disconnected;
|
||||
_debugLogService?.info(
|
||||
'USB disconnect complete port=${portLabel ?? 'unknown'}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
}
|
||||
|
||||
void setRequestPortLabel(String label) {
|
||||
// Native implementations do not use a synthetic chooser row.
|
||||
}
|
||||
|
||||
void setFallbackDeviceName(String label) {
|
||||
// Native implementations use OS-provided device names.
|
||||
}
|
||||
|
||||
void updateConnectedLabel(String label) {
|
||||
final trimmed = label.trim();
|
||||
if (trimmed.isEmpty) {
|
||||
return;
|
||||
}
|
||||
_connectedPortLabel = buildUsbDisplayLabel(
|
||||
basePortLabel: _connectedPortKey ?? trimmed,
|
||||
deviceName: trimmed,
|
||||
);
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
// Synchronously close the native port so the SerialThread exits before
|
||||
// the Dart isolate is torn down (e.g. on hot restart). The async
|
||||
// disconnect() path via unawaited() offers no ordering guarantee — the
|
||||
// isolate may die before the Future resolves, leaving the thread alive
|
||||
// with a dangling NativeCallable pointer.
|
||||
if (_useDesktopFlSerial) {
|
||||
final serial = _serial;
|
||||
try {
|
||||
if (serial?.isOpen() == FlOpenStatus.open) {
|
||||
serial?.closePort(); // synchronous C call — kills the SerialThread
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
// Kick off the full async teardown for anything else (subscription cancel,
|
||||
// stream controller close). These are best-effort at dispose time.
|
||||
unawaited(disconnect().whenComplete(_closeFrameController));
|
||||
}
|
||||
|
||||
void _handleSerialData(FlSerialEventArgs event) {
|
||||
try {
|
||||
final bytes = event.serial.readList();
|
||||
if (bytes.isNotEmpty) {
|
||||
_ingestRawBytes(Uint8List.fromList(bytes));
|
||||
}
|
||||
} catch (error, stack) {
|
||||
_addFrameError(error, stack);
|
||||
}
|
||||
}
|
||||
|
||||
void _handleAndroidData(dynamic data) {
|
||||
if (data is Uint8List) {
|
||||
_ingestRawBytes(data);
|
||||
return;
|
||||
}
|
||||
if (data is ByteData) {
|
||||
_ingestRawBytes(data.buffer.asUint8List());
|
||||
return;
|
||||
}
|
||||
_addFrameError(
|
||||
StateError('Unexpected Android USB event payload: ${data.runtimeType}'),
|
||||
);
|
||||
}
|
||||
|
||||
void _handleSerialError(Object error, [StackTrace? stackTrace]) {
|
||||
_addFrameError(error, stackTrace);
|
||||
}
|
||||
|
||||
void _handleSerialDone() {
|
||||
unawaited(disconnect());
|
||||
}
|
||||
|
||||
void _ingestRawBytes(Uint8List bytes) {
|
||||
for (final packet in _frameDecoder.ingest(bytes)) {
|
||||
if (!packet.isRxFrame) {
|
||||
_debugLogService?.info(
|
||||
'USB ignored packet start=0x${packet.frameStart.toRadixString(16).padLeft(2, '0')} len=${packet.payload.length}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
continue;
|
||||
}
|
||||
_addFrame(packet.payload);
|
||||
}
|
||||
}
|
||||
|
||||
void _addFrame(Uint8List payload) {
|
||||
if (_frameController.isClosed) {
|
||||
return;
|
||||
}
|
||||
_frameController.add(payload);
|
||||
}
|
||||
|
||||
void _addFrameError(Object error, [StackTrace? stackTrace]) {
|
||||
if (_frameController.isClosed) {
|
||||
return;
|
||||
}
|
||||
_frameController.addError(error, stackTrace);
|
||||
}
|
||||
|
||||
Future<void> _closeFrameController() async {
|
||||
if (_frameController.isClosed) {
|
||||
return;
|
||||
}
|
||||
await _frameController.close();
|
||||
}
|
||||
|
||||
void _logFrameSummary(String prefix, Uint8List bytes) {
|
||||
if (bytes.isEmpty) {
|
||||
_debugLogService?.info('$prefix len=0', tag: 'USB Serial');
|
||||
return;
|
||||
}
|
||||
_debugLogService?.info(
|
||||
'$prefix code=${bytes[0]} len=${bytes.length}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
}
|
||||
|
||||
/// Returns an ordered list of port paths to try for [portName].
|
||||
///
|
||||
/// On macOS, USB serial devices appear as both `/dev/cu.*` (call-out, the
|
||||
/// correct mode for outgoing serial connections) and `/dev/tty.*` (dial-in).
|
||||
/// `flserial` may list one variant while only the other is actually openable
|
||||
/// at a given moment. We prefer `cu.*` but automatically include the `tty.*`
|
||||
/// sibling as a fallback, and vice-versa.
|
||||
List<String> _buildPortCandidates(String normalizedPort) {
|
||||
if (!Platform.isMacOS) return [normalizedPort];
|
||||
const cuPrefix = '/dev/cu.';
|
||||
const ttyPrefix = '/dev/tty.';
|
||||
if (normalizedPort.startsWith(cuPrefix)) {
|
||||
final suffix = normalizedPort.substring(cuPrefix.length);
|
||||
return [normalizedPort, '$ttyPrefix$suffix'];
|
||||
}
|
||||
if (normalizedPort.startsWith(ttyPrefix)) {
|
||||
final suffix = normalizedPort.substring(ttyPrefix.length);
|
||||
return [normalizedPort, '$cuPrefix$suffix'];
|
||||
}
|
||||
return [normalizedPort];
|
||||
}
|
||||
}
|
||||
|
||||
enum UsbSerialStatus { disconnected, connecting, connected, disconnecting }
|
||||
@@ -0,0 +1,580 @@
|
||||
import 'dart:async';
|
||||
import 'dart:js_interop';
|
||||
import 'dart:js_interop_unsafe';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:web/web.dart' as web;
|
||||
|
||||
import 'app_debug_log_service.dart';
|
||||
import '../utils/usb_port_labels.dart';
|
||||
import 'usb_serial_frame_codec.dart';
|
||||
|
||||
class UsbSerialService {
|
||||
UsbSerialService();
|
||||
|
||||
static const Map<String, String> _knownUsbNames = <String, String>{
|
||||
'2886:1667': 'Seeed Wio Tracker L1',
|
||||
};
|
||||
static final Map<String, String> _deviceNamesByPortKey = <String, String>{};
|
||||
static final Map<String, String> _baseLabelsByPortKey = <String, String>{};
|
||||
static final Map<String, JSObject> _authorizedPortsByKey =
|
||||
<String, JSObject>{};
|
||||
static int _nextAuthorizedPortId = 1;
|
||||
|
||||
final StreamController<Uint8List> _frameController =
|
||||
StreamController<Uint8List>.broadcast();
|
||||
final UsbSerialFrameDecoder _frameDecoder = UsbSerialFrameDecoder();
|
||||
|
||||
UsbSerialStatus _status = UsbSerialStatus.disconnected;
|
||||
JSObject? _port;
|
||||
JSObject? _reader;
|
||||
JSObject? _writer;
|
||||
String? _connectedPortName;
|
||||
String? _connectedPortKey;
|
||||
String _requestPortLabel = 'Choose USB Device';
|
||||
String _fallbackDeviceName = 'Web Serial Device';
|
||||
AppDebugLogService? _debugLogService;
|
||||
|
||||
UsbSerialStatus get status => _status;
|
||||
String? get activePortKey => _connectedPortKey;
|
||||
String? get activePortDisplayLabel => _connectedPortName ?? _connectedPortKey;
|
||||
Stream<Uint8List> get frameStream => _frameController.stream;
|
||||
bool get isConnected => _status == UsbSerialStatus.connected;
|
||||
|
||||
JSObject get _navigator => JSObject.fromInteropObject(web.window.navigator);
|
||||
bool get _isSupported => _navigator.has('serial');
|
||||
JSObject? get _serial {
|
||||
if (!_isSupported) {
|
||||
return null;
|
||||
}
|
||||
final serial = _navigator['serial'];
|
||||
return serial == null ? null : serial as JSObject;
|
||||
}
|
||||
|
||||
Future<List<String>> listPorts() async {
|
||||
if (!_isSupported) {
|
||||
return const <String>[];
|
||||
}
|
||||
|
||||
_resetPortCache();
|
||||
final ports = await _getAuthorizedPorts();
|
||||
return <String>[_requestPortListEntry, ...ports.map(_listEntryForPort)];
|
||||
}
|
||||
|
||||
Future<void> connect({
|
||||
required String portName,
|
||||
int baudRate = 115200,
|
||||
}) async {
|
||||
if (_status == UsbSerialStatus.connected ||
|
||||
_status == UsbSerialStatus.connecting) {
|
||||
throw StateError('USB serial transport is already active');
|
||||
}
|
||||
if (!_isSupported) {
|
||||
throw UnsupportedError('Web Serial is not supported by this browser.');
|
||||
}
|
||||
|
||||
_status = UsbSerialStatus.connecting;
|
||||
_frameDecoder.reset();
|
||||
|
||||
try {
|
||||
final requestedPortName = normalizeUsbPortName(portName);
|
||||
_debugLogService?.info(
|
||||
'Web connect: requested=$requestedPortName baud=$baudRate',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
final selectedPortKey = requestedPortName.startsWith('web:port:')
|
||||
? requestedPortName
|
||||
: null;
|
||||
_port = _authorizedPortsByKey[requestedPortName];
|
||||
final authorizedPorts = await _getAuthorizedPorts();
|
||||
_debugLogService?.info(
|
||||
'Web connect: ${authorizedPorts.length} authorized port(s), cached=${_port != null}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
_port ??= _selectPort(authorizedPorts, requestedPortName);
|
||||
|
||||
_port ??= await _requestPort();
|
||||
if (_port == null) {
|
||||
throw StateError('No USB serial device selected');
|
||||
}
|
||||
|
||||
_debugLogService?.info(
|
||||
'Web connect: opening port at $baudRate baud…',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
await _openPort(_port!, baudRate);
|
||||
_connectedPortKey = _cachePort(_port!, preferredKey: selectedPortKey);
|
||||
_connectedPortName = _displayLabelForPort(
|
||||
_port!,
|
||||
portKey: _connectedPortKey,
|
||||
);
|
||||
_writer = _getWriter(_port!);
|
||||
_reader = _getReader(_port!);
|
||||
_status = UsbSerialStatus.connected;
|
||||
unawaited(_pumpReads());
|
||||
|
||||
_debugLogService?.info(
|
||||
'USB serial opened port=$_connectedPortName via Web Serial',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
} catch (error) {
|
||||
_debugLogService?.error('Web connect failed: $error', tag: 'USB Serial');
|
||||
await _cleanupFailedConnect();
|
||||
_status = UsbSerialStatus.disconnected;
|
||||
_connectedPortName = null;
|
||||
_connectedPortKey = null;
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> write(Uint8List data) async {
|
||||
if (!isConnected || _writer == null) {
|
||||
throw StateError('USB serial port is not open');
|
||||
}
|
||||
|
||||
final packet = wrapUsbSerialTxFrame(data);
|
||||
_logFrameSummary('USB TX frame', data);
|
||||
|
||||
final promise = _writer!.callMethod<JSPromise<JSAny?>>(
|
||||
'write'.toJS,
|
||||
packet.toJS,
|
||||
);
|
||||
await promise.toDart;
|
||||
}
|
||||
|
||||
Future<void> disconnect() async {
|
||||
if (_status == UsbSerialStatus.disconnected) return;
|
||||
|
||||
final portLabel = _connectedPortName ?? _connectedPortKey;
|
||||
_debugLogService?.info(
|
||||
'USB disconnect starting port=${portLabel ?? 'unknown'}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
_status = UsbSerialStatus.disconnecting;
|
||||
final reader = _reader;
|
||||
final writer = _writer;
|
||||
final port = _port;
|
||||
|
||||
_reader = null;
|
||||
_writer = null;
|
||||
_port = null;
|
||||
_connectedPortName = null;
|
||||
_connectedPortKey = null;
|
||||
_frameDecoder.reset();
|
||||
|
||||
if (reader != null) {
|
||||
try {
|
||||
await reader.callMethod<JSPromise<JSAny?>>('cancel'.toJS).toDart;
|
||||
} catch (_) {
|
||||
// Ignore errors while closing.
|
||||
}
|
||||
_releaseLock(reader);
|
||||
}
|
||||
|
||||
if (writer != null) {
|
||||
_releaseLock(writer);
|
||||
}
|
||||
|
||||
if (port != null) {
|
||||
try {
|
||||
await port.callMethod<JSPromise<JSAny?>>('close'.toJS).toDart;
|
||||
} catch (_) {
|
||||
// Ignore errors while closing.
|
||||
}
|
||||
}
|
||||
|
||||
_status = UsbSerialStatus.disconnected;
|
||||
_debugLogService?.info(
|
||||
'USB disconnect complete port=${portLabel ?? 'unknown'}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
}
|
||||
|
||||
void updateConnectedLabel(String label) {
|
||||
final trimmed = label.trim();
|
||||
final portKey = _connectedPortKey;
|
||||
if (trimmed.isEmpty || portKey == null) {
|
||||
return;
|
||||
}
|
||||
_deviceNamesByPortKey[portKey] = trimmed;
|
||||
_connectedPortName = _buildDisplayLabel(portKey);
|
||||
}
|
||||
|
||||
void setRequestPortLabel(String label) {
|
||||
final trimmed = label.trim();
|
||||
if (trimmed.isEmpty) {
|
||||
return;
|
||||
}
|
||||
_requestPortLabel = trimmed;
|
||||
}
|
||||
|
||||
void setFallbackDeviceName(String label) {
|
||||
final trimmed = label.trim();
|
||||
if (trimmed.isEmpty) {
|
||||
return;
|
||||
}
|
||||
_fallbackDeviceName = trimmed;
|
||||
}
|
||||
|
||||
void setDebugLogService(AppDebugLogService? service) {
|
||||
_debugLogService = service;
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unawaited(disconnect().whenComplete(_closeFrameController));
|
||||
}
|
||||
|
||||
Future<List<JSObject>> _getAuthorizedPorts() async {
|
||||
final serial = _serial;
|
||||
if (serial == null) {
|
||||
return const <JSObject>[];
|
||||
}
|
||||
final result = await serial
|
||||
.callMethod<JSPromise<JSAny?>>('getPorts'.toJS)
|
||||
.toDart;
|
||||
return _toObjectList(result);
|
||||
}
|
||||
|
||||
Future<JSObject?> _requestPort() async {
|
||||
final serial = _serial;
|
||||
if (serial == null) {
|
||||
return null;
|
||||
}
|
||||
final result = await serial
|
||||
.callMethod<JSPromise<JSAny?>>('requestPort'.toJS)
|
||||
.toDart;
|
||||
return result == null ? null : result as JSObject;
|
||||
}
|
||||
|
||||
JSObject? _selectPort(List<JSObject> ports, String requestedPortName) {
|
||||
if (ports.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
if (requestedPortName.isEmpty || requestedPortName == _requestPortKey) {
|
||||
return ports.first;
|
||||
}
|
||||
if (requestedPortName.startsWith('web:port:')) {
|
||||
return null;
|
||||
}
|
||||
for (final port in ports) {
|
||||
final description = _describePort(port);
|
||||
if (description == requestedPortName) {
|
||||
return port;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<void> _openPort(JSObject port, int baudRate) async {
|
||||
final options = JSObject()
|
||||
..['baudRate'] = baudRate.toJS
|
||||
..['flowControl'] = 'none'.toJS;
|
||||
await port.callMethod<JSPromise<JSAny?>>('open'.toJS, options).toDart;
|
||||
|
||||
// Prevent ESP32 USB-CDC reset: hold DTR=true, RTS=false after open.
|
||||
try {
|
||||
final signals = JSObject()
|
||||
..['dataTerminalReady'] = true.toJS
|
||||
..['requestToSend'] = false.toJS;
|
||||
await port
|
||||
.callMethod<JSPromise<JSAny?>>('setSignals'.toJS, signals)
|
||||
.toDart;
|
||||
} catch (_) {
|
||||
// setSignals may not be supported on all browsers/devices.
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _cleanupFailedConnect() async {
|
||||
final reader = _reader;
|
||||
final writer = _writer;
|
||||
final port = _port;
|
||||
|
||||
_reader = null;
|
||||
_writer = null;
|
||||
_port = null;
|
||||
|
||||
if (reader != null) {
|
||||
try {
|
||||
await reader.callMethod<JSPromise<JSAny?>>('cancel'.toJS).toDart;
|
||||
} catch (_) {
|
||||
// Ignore cleanup errors after a failed connect.
|
||||
}
|
||||
_releaseLock(reader);
|
||||
}
|
||||
|
||||
if (writer != null) {
|
||||
_releaseLock(writer);
|
||||
}
|
||||
|
||||
if (port != null) {
|
||||
try {
|
||||
await port.callMethod<JSPromise<JSAny?>>('close'.toJS).toDart;
|
||||
} catch (_) {
|
||||
// Ignore cleanup errors after a failed connect.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JSObject? _getReader(JSObject port) {
|
||||
final readable = port.getProperty<JSAny?>('readable'.toJS);
|
||||
if (readable == null) {
|
||||
throw StateError('Web Serial port is not readable');
|
||||
}
|
||||
final readableObject = readable as JSObject;
|
||||
return readableObject.callMethod<JSAny?>('getReader'.toJS) as JSObject;
|
||||
}
|
||||
|
||||
JSObject? _getWriter(JSObject port) {
|
||||
final writable = port.getProperty<JSAny?>('writable'.toJS);
|
||||
if (writable == null) {
|
||||
throw StateError('Web Serial port is not writable');
|
||||
}
|
||||
final writableObject = writable as JSObject;
|
||||
return writableObject.callMethod<JSAny?>('getWriter'.toJS) as JSObject;
|
||||
}
|
||||
|
||||
Future<void> _pumpReads() async {
|
||||
final reader = _reader;
|
||||
if (reader == null) {
|
||||
_debugLogService?.warn('_pumpReads: reader is null', tag: 'USB Serial');
|
||||
return;
|
||||
}
|
||||
|
||||
_debugLogService?.info('_pumpReads: started', tag: 'USB Serial');
|
||||
try {
|
||||
while (_status == UsbSerialStatus.connected &&
|
||||
identical(reader, _reader)) {
|
||||
final result = await reader
|
||||
.callMethod<JSPromise<JSAny?>>('read'.toJS)
|
||||
.toDart;
|
||||
if (result == null) {
|
||||
_debugLogService?.warn('_pumpReads: null result', tag: 'USB Serial');
|
||||
break;
|
||||
}
|
||||
final resultObject = result as JSObject;
|
||||
|
||||
final doneValue = resultObject.getProperty<JSAny?>('done'.toJS);
|
||||
final done = doneValue != null && doneValue.dartify() == true;
|
||||
if (done) {
|
||||
_debugLogService?.info('_pumpReads: done=true', tag: 'USB Serial');
|
||||
break;
|
||||
}
|
||||
|
||||
final value = resultObject.getProperty<JSAny?>('value'.toJS);
|
||||
final bytes = _coerceBytes(value);
|
||||
if (bytes != null && bytes.isNotEmpty) {
|
||||
_debugLogService?.info(
|
||||
'USB RX raw: ${bytes.length} byte(s)',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
_ingestRawBytes(bytes);
|
||||
}
|
||||
}
|
||||
} catch (error, stackTrace) {
|
||||
_debugLogService?.error('_pumpReads error: $error', tag: 'USB Serial');
|
||||
if (_status == UsbSerialStatus.connected) {
|
||||
_addFrameError(error, stackTrace);
|
||||
}
|
||||
} finally {
|
||||
_debugLogService?.info('_pumpReads: ended', tag: 'USB Serial');
|
||||
_releaseLock(reader);
|
||||
if (_status == UsbSerialStatus.connected && identical(reader, _reader)) {
|
||||
_addFrameError(StateError('USB serial connection closed'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Uint8List? _coerceBytes(JSAny? value) {
|
||||
if (value == null) return null;
|
||||
try {
|
||||
return (value as JSUint8Array).toDart;
|
||||
} catch (_) {
|
||||
// Fall back to array-like coercion below.
|
||||
}
|
||||
|
||||
final object = value as JSObject;
|
||||
if (object.has('length')) {
|
||||
final lengthValue = object.getProperty<JSAny?>('length'.toJS)?.dartify();
|
||||
if (lengthValue is num) {
|
||||
final length = lengthValue.toInt();
|
||||
final bytes = Uint8List(length);
|
||||
for (var i = 0; i < length; i++) {
|
||||
final item = object.getProperty<JSAny?>(i.toString().toJS)?.dartify();
|
||||
if (item is num) {
|
||||
bytes[i] = item.toInt();
|
||||
}
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
List<JSObject> _toObjectList(JSAny? value) {
|
||||
if (value == null) {
|
||||
return const <JSObject>[];
|
||||
}
|
||||
final object = value as JSObject;
|
||||
if (!object.has('length')) {
|
||||
return const <JSObject>[];
|
||||
}
|
||||
|
||||
final lengthValue = object.getProperty<JSAny?>('length'.toJS)?.dartify();
|
||||
if (lengthValue is! num) {
|
||||
return const <JSObject>[];
|
||||
}
|
||||
|
||||
final length = lengthValue.toInt();
|
||||
final items = <JSObject>[];
|
||||
for (var i = 0; i < length; i++) {
|
||||
final item = object.getProperty<JSAny?>(i.toString().toJS);
|
||||
if (item != null) {
|
||||
items.add(item as JSObject);
|
||||
}
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
String _describePort(JSObject port) {
|
||||
final info = _portInfo(port);
|
||||
if (info == null) {
|
||||
return _requestPortLabel;
|
||||
}
|
||||
|
||||
final vendorId = info.usbVendorId;
|
||||
final productId = info.usbProductId;
|
||||
final hasVendor = vendorId != null;
|
||||
final hasProduct = productId != null;
|
||||
|
||||
return describeWebUsbPort(
|
||||
vendorId: hasVendor ? vendorId : null,
|
||||
productId: hasProduct ? productId : null,
|
||||
requestPortLabel: _requestPortLabel,
|
||||
fallbackDeviceName: _fallbackDeviceName,
|
||||
knownUsbNames: _knownUsbNames,
|
||||
);
|
||||
}
|
||||
|
||||
_WebPortInfo? _portInfo(JSObject port) {
|
||||
try {
|
||||
final info = port.callMethod<JSAny?>('getInfo'.toJS);
|
||||
if (info == null) {
|
||||
return null;
|
||||
}
|
||||
final infoObject = info as JSObject;
|
||||
|
||||
final vendorId = infoObject
|
||||
.getProperty<JSAny?>('usbVendorId'.toJS)
|
||||
?.dartify();
|
||||
final productId = infoObject
|
||||
.getProperty<JSAny?>('usbProductId'.toJS)
|
||||
?.dartify();
|
||||
return _WebPortInfo(
|
||||
usbVendorId: vendorId is num ? vendorId.toInt() : null,
|
||||
usbProductId: productId is num ? productId.toInt() : null,
|
||||
);
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
String _portKeyFor(JSObject port) {
|
||||
return _cachePort(port);
|
||||
}
|
||||
|
||||
String _cachePort(JSObject port, {String? preferredKey}) {
|
||||
final portKey = preferredKey ?? 'web:port:${_nextAuthorizedPortId++}';
|
||||
_baseLabelsByPortKey[portKey] = _describePort(port);
|
||||
_authorizedPortsByKey[portKey] = port;
|
||||
return portKey;
|
||||
}
|
||||
|
||||
String _displayLabelForPort(JSObject port, {String? portKey}) =>
|
||||
_buildDisplayLabel(portKey ?? _portKeyFor(port));
|
||||
|
||||
String _buildDisplayLabel(String portKey) {
|
||||
return buildUsbDisplayLabel(
|
||||
basePortLabel: _baseLabelsByPortKey[portKey] ?? portKey,
|
||||
deviceName: _deviceNamesByPortKey[portKey],
|
||||
);
|
||||
}
|
||||
|
||||
String _listEntryForPort(JSObject port) {
|
||||
final portKey = _portKeyFor(port);
|
||||
return '$portKey - ${_displayLabelForPort(port, portKey: portKey)}';
|
||||
}
|
||||
|
||||
String get _requestPortKey => 'web:request';
|
||||
|
||||
String get _requestPortListEntry => '$_requestPortKey - $_requestPortLabel';
|
||||
|
||||
void _resetPortCache() {
|
||||
_authorizedPortsByKey.clear();
|
||||
_baseLabelsByPortKey.clear();
|
||||
_deviceNamesByPortKey.clear();
|
||||
_nextAuthorizedPortId = 1;
|
||||
}
|
||||
|
||||
void _releaseLock(JSObject resource) {
|
||||
try {
|
||||
resource.callMethod<JSAny?>('releaseLock'.toJS);
|
||||
} catch (_) {
|
||||
// Ignore lock release failures.
|
||||
}
|
||||
}
|
||||
|
||||
void _ingestRawBytes(Uint8List bytes) {
|
||||
for (final packet in _frameDecoder.ingest(bytes)) {
|
||||
if (!packet.isRxFrame) {
|
||||
_debugLogService?.info(
|
||||
'USB ignored packet start=0x${packet.frameStart.toRadixString(16).padLeft(2, '0')} len=${packet.payload.length}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
continue;
|
||||
}
|
||||
_addFrame(packet.payload);
|
||||
}
|
||||
}
|
||||
|
||||
void _addFrame(Uint8List payload) {
|
||||
if (_frameController.isClosed) {
|
||||
return;
|
||||
}
|
||||
_frameController.add(payload);
|
||||
}
|
||||
|
||||
void _addFrameError(Object error, [StackTrace? stackTrace]) {
|
||||
if (_frameController.isClosed) {
|
||||
return;
|
||||
}
|
||||
_frameController.addError(error, stackTrace);
|
||||
}
|
||||
|
||||
Future<void> _closeFrameController() async {
|
||||
if (_frameController.isClosed) {
|
||||
return;
|
||||
}
|
||||
await _frameController.close();
|
||||
}
|
||||
|
||||
void _logFrameSummary(String prefix, Uint8List bytes) {
|
||||
if (bytes.isEmpty) {
|
||||
_debugLogService?.info('$prefix len=0', tag: 'USB Serial');
|
||||
return;
|
||||
}
|
||||
_debugLogService?.info(
|
||||
'$prefix code=${bytes[0]} len=${bytes.length}',
|
||||
tag: 'USB Serial',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
enum UsbSerialStatus { disconnected, connecting, connected, disconnecting }
|
||||
|
||||
final class _WebPortInfo {
|
||||
const _WebPortInfo({required this.usbVendorId, required this.usbProductId});
|
||||
|
||||
final int? usbVendorId;
|
||||
final int? usbProductId;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
import 'package:meshcore_open/utils/app_logger.dart';
|
||||
|
||||
import '../models/channel_message.dart';
|
||||
import '../helpers/smaz.dart';
|
||||
import 'prefs_manager.dart';
|
||||
@@ -7,13 +9,25 @@ import 'prefs_manager.dart';
|
||||
class ChannelMessageStore {
|
||||
static const String _keyPrefix = 'channel_messages_';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length > 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
/// Save messages for a specific channel
|
||||
Future<void> saveChannelMessages(
|
||||
int channelIndex,
|
||||
List<ChannelMessage> messages,
|
||||
) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn(
|
||||
'Public key hex is not set. Cannot save channel messages.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_keyPrefix$channelIndex';
|
||||
final key = '$keyFor$channelIndex';
|
||||
|
||||
// Convert messages to JSON
|
||||
final jsonList = messages.map((msg) => _messageToJson(msg)).toList();
|
||||
@@ -24,12 +38,35 @@ class ChannelMessageStore {
|
||||
|
||||
/// Load messages for a specific channel
|
||||
Future<List<ChannelMessage>> loadChannelMessages(int channelIndex) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn(
|
||||
'Public key hex is not set. Cannot load channel messages.',
|
||||
);
|
||||
return [];
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_keyPrefix$channelIndex';
|
||||
|
||||
final jsonString = prefs.getString(key);
|
||||
if (jsonString == null) return [];
|
||||
final key = '$keyFor$channelIndex';
|
||||
final oldKey = '$_keyPrefix$channelIndex';
|
||||
|
||||
String? jsonString = prefs.getString(key);
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
final legacyJsonString = prefs.getString(oldKey);
|
||||
prefs.remove(oldKey);
|
||||
if (legacyJsonString != null && legacyJsonString.isNotEmpty) {
|
||||
appLogger.info(
|
||||
'Migrating channel messages from legacy key $oldKey to scoped key $key',
|
||||
);
|
||||
await prefs.setString(key, legacyJsonString);
|
||||
jsonString = legacyJsonString;
|
||||
}
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
jsonString = prefs.getString(keyFor);
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
try {
|
||||
final jsonList = jsonDecode(jsonString) as List<dynamic>;
|
||||
return jsonList.map((json) => _messageFromJson(json)).toList();
|
||||
@@ -42,14 +79,14 @@ class ChannelMessageStore {
|
||||
/// Clear messages for a specific channel
|
||||
Future<void> clearChannelMessages(int channelIndex) async {
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_keyPrefix$channelIndex';
|
||||
final key = '$keyFor$channelIndex';
|
||||
await prefs.remove(key);
|
||||
}
|
||||
|
||||
/// Clear all channel messages
|
||||
Future<void> clearAllChannelMessages() async {
|
||||
final prefs = PrefsManager.instance;
|
||||
final keys = prefs.getKeys().where((k) => k.startsWith(_keyPrefix));
|
||||
final keys = prefs.getKeys().where((k) => k.startsWith(keyFor));
|
||||
for (var key in keys) {
|
||||
await prefs.remove(key);
|
||||
}
|
||||
|
||||
@@ -1,20 +1,49 @@
|
||||
import 'dart:convert';
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
class ChannelOrderStore {
|
||||
static const String _key = 'channel_order';
|
||||
static const String _keyPrefix = 'channel_order_';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length > 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
Future<void> saveChannelOrder(List<int> order) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot save channel order.');
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
await prefs.setString(_key, jsonEncode(order));
|
||||
await prefs.setString(keyFor, jsonEncode(order));
|
||||
}
|
||||
|
||||
Future<List<int>> loadChannelOrder() async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot load channel order.');
|
||||
return [];
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final raw = prefs.getString(_key);
|
||||
if (raw == null || raw.isEmpty) return [];
|
||||
String? jsonString = prefs.getString(keyFor);
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
final legacyJsonString = prefs.getString(_keyPrefix);
|
||||
prefs.remove(_keyPrefix);
|
||||
if (legacyJsonString != null && legacyJsonString.isNotEmpty) {
|
||||
appLogger.info(
|
||||
'Migrating channel order from legacy key $_keyPrefix to scoped key $keyFor',
|
||||
);
|
||||
await prefs.setString(keyFor, legacyJsonString);
|
||||
jsonString = legacyJsonString;
|
||||
}
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
try {
|
||||
final decoded = jsonDecode(raw);
|
||||
final decoded = jsonDecode(jsonString);
|
||||
if (decoded is List) {
|
||||
return decoded
|
||||
.map((value) => value is int ? value : int.tryParse('$value'))
|
||||
@@ -24,7 +53,7 @@ class ChannelOrderStore {
|
||||
} catch (_) {
|
||||
// fall through to legacy parse
|
||||
}
|
||||
return raw
|
||||
return jsonString
|
||||
.split(',')
|
||||
.map((value) => int.tryParse(value))
|
||||
.whereType<int>()
|
||||
|
||||
@@ -1,17 +1,49 @@
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
class ChannelSettingsStore {
|
||||
static const String _smazKeyPrefix = 'channel_smaz_';
|
||||
static const String _keyPrefix = 'channel_smaz_';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length > 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
Future<bool> loadSmazEnabled(int channelIndex) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn(
|
||||
'Public key hex is not set. Cannot load channel settings.',
|
||||
);
|
||||
return false;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_smazKeyPrefix$channelIndex';
|
||||
return prefs.getBool(key) ?? false;
|
||||
final key = '$keyFor$channelIndex';
|
||||
final oldKey = '$_keyPrefix$channelIndex';
|
||||
bool? enabled = prefs.getBool(oldKey);
|
||||
if (enabled == null) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
enabled = prefs.getBool(oldKey);
|
||||
prefs.remove(oldKey);
|
||||
if (enabled != null) {
|
||||
appLogger.info(
|
||||
'Migrating channel settings from legacy key $oldKey to scoped key $key',
|
||||
);
|
||||
await prefs.setBool(key, enabled);
|
||||
}
|
||||
}
|
||||
return enabled ?? false;
|
||||
}
|
||||
|
||||
Future<void> saveSmazEnabled(int channelIndex, bool enabled) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn(
|
||||
'Public key hex is not set. Cannot save channel settings.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_smazKeyPrefix$channelIndex';
|
||||
final key = '$keyFor$channelIndex';
|
||||
await prefs.setBool(key, enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,46 @@ import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import '../models/channel.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
class ChannelStore {
|
||||
static const String _key = 'channels';
|
||||
static const String _keyPrefix = 'channels';
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length >= 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
Future<List<Channel>> loadChannels() async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot load channels.');
|
||||
return [];
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonStr = prefs.getString(_key);
|
||||
if (jsonStr == null) return [];
|
||||
String? jsonString = prefs.getString(keyFor);
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
final legacyJsonString = prefs.getString(_keyPrefix);
|
||||
prefs.remove(_keyPrefix);
|
||||
if (legacyJsonString != null && legacyJsonString.isNotEmpty) {
|
||||
appLogger.info(
|
||||
'Migrating channel messages from legacy key $_keyPrefix to scoped key $keyFor',
|
||||
);
|
||||
await prefs.setString(keyFor, legacyJsonString);
|
||||
jsonString = legacyJsonString;
|
||||
}
|
||||
}
|
||||
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
jsonString = prefs.getString(keyFor);
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
final jsonList = jsonDecode(jsonStr) as List<dynamic>;
|
||||
final jsonList = jsonDecode(jsonString) as List<dynamic>;
|
||||
return jsonList
|
||||
.map((entry) => _fromJson(entry as Map<String, dynamic>))
|
||||
.toList();
|
||||
@@ -23,9 +51,13 @@ class ChannelStore {
|
||||
}
|
||||
|
||||
Future<void> saveChannels(List<Channel> channels) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot save channels.');
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonList = channels.map(_toJson).toList();
|
||||
await prefs.setString(_key, jsonEncode(jsonList));
|
||||
await prefs.setString(keyFor, jsonEncode(jsonList));
|
||||
}
|
||||
|
||||
Map<String, dynamic> _toJson(Channel channel) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import '../models/community.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
/// Persists communities to local storage using SharedPreferences.
|
||||
@@ -9,12 +10,37 @@ import 'prefs_manager.dart';
|
||||
/// Each community contains its secret K, so this data should
|
||||
/// be considered sensitive (though device encryption handles security).
|
||||
class CommunityStore {
|
||||
static const String _communitiesKey = 'communities_v1';
|
||||
static const String _keyPrefix = 'communities_v1';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length > 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
/// Load all communities from storage
|
||||
Future<List<Community>> loadCommunities() async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot load communities.');
|
||||
return [];
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonString = prefs.getString(_communitiesKey);
|
||||
String? jsonString = prefs.getString(keyFor);
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
final legacyJsonString = prefs.getString(_keyPrefix);
|
||||
prefs.remove(_keyPrefix);
|
||||
if (legacyJsonString != null && legacyJsonString.isNotEmpty) {
|
||||
appLogger.info(
|
||||
'Migrating communities from legacy key $_keyPrefix to scoped key $keyFor',
|
||||
);
|
||||
await prefs.setString(keyFor, legacyJsonString);
|
||||
jsonString = legacyJsonString;
|
||||
}
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
jsonString = prefs.getString(keyFor);
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
@@ -32,9 +58,13 @@ class CommunityStore {
|
||||
|
||||
/// Save all communities to storage
|
||||
Future<void> saveCommunities(List<Community> communities) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot save communities.');
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonList = communities.map((c) => c.toJson()).toList();
|
||||
await prefs.setString(_communitiesKey, jsonEncode(jsonList));
|
||||
await prefs.setString(keyFor, jsonEncode(jsonList));
|
||||
}
|
||||
|
||||
/// Add a new community
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import '../models/contact.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
class ContactDiscoveryStore {
|
||||
static const String _keyPrefix = 'discovered_contacts';
|
||||
|
||||
Future<List<Contact>> loadContacts() async {
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonStr = prefs.getString(_keyPrefix);
|
||||
if (jsonStr == null) return [];
|
||||
|
||||
try {
|
||||
final jsonList = jsonDecode(jsonStr) as List<dynamic>;
|
||||
return jsonList
|
||||
.map((entry) => _fromJson(entry as Map<String, dynamic>))
|
||||
.toList();
|
||||
} catch (_) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> saveContacts(List<Contact> contacts) async {
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonList = contacts.map(_toJson).toList();
|
||||
await prefs.setString(_keyPrefix, jsonEncode(jsonList));
|
||||
}
|
||||
|
||||
Map<String, dynamic> _toJson(Contact contact) {
|
||||
return {
|
||||
'publicKey': base64Encode(contact.publicKey),
|
||||
'name': contact.name,
|
||||
'type': contact.type,
|
||||
'flags': contact.flags,
|
||||
'pathLength': contact.pathLength,
|
||||
'path': base64Encode(contact.path),
|
||||
'pathOverride': contact.pathOverride,
|
||||
'pathOverrideBytes': contact.pathOverrideBytes != null
|
||||
? base64Encode(contact.pathOverrideBytes!)
|
||||
: null,
|
||||
'latitude': contact.latitude,
|
||||
'longitude': contact.longitude,
|
||||
'lastSeen': contact.lastSeen.millisecondsSinceEpoch,
|
||||
'lastMessageAt': contact.lastMessageAt.millisecondsSinceEpoch,
|
||||
'rawPacket': contact.rawPacket != null
|
||||
? base64Encode(contact.rawPacket!)
|
||||
: null,
|
||||
};
|
||||
}
|
||||
|
||||
Contact _fromJson(Map<String, dynamic> json) {
|
||||
final lastSeenMs = json['lastSeen'] as int? ?? 0;
|
||||
final lastMessageMs = json['lastMessageAt'] as int?;
|
||||
return Contact(
|
||||
publicKey: Uint8List.fromList(base64Decode(json['publicKey'] as String)),
|
||||
name: json['name'] as String? ?? 'Unknown',
|
||||
type: json['type'] as int? ?? 0,
|
||||
flags: json['flags'] as int? ?? 0,
|
||||
pathLength: json['pathLength'] as int? ?? -1,
|
||||
path: json['path'] != null
|
||||
? Uint8List.fromList(base64Decode(json['path'] as String))
|
||||
: Uint8List(0),
|
||||
pathOverride: json['pathOverride'] as int?,
|
||||
pathOverrideBytes: json['pathOverrideBytes'] != null
|
||||
? Uint8List.fromList(
|
||||
base64Decode(json['pathOverrideBytes'] as String),
|
||||
)
|
||||
: null,
|
||||
latitude: (json['latitude'] as num?)?.toDouble(),
|
||||
longitude: (json['longitude'] as num?)?.toDouble(),
|
||||
lastSeen: DateTime.fromMillisecondsSinceEpoch(lastSeenMs),
|
||||
lastMessageAt: DateTime.fromMillisecondsSinceEpoch(
|
||||
lastMessageMs ?? lastSeenMs,
|
||||
),
|
||||
isActive: false,
|
||||
rawPacket: json['rawPacket'] != null
|
||||
? Uint8List.fromList(base64Decode(json['rawPacket'] as String))
|
||||
: null,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,45 @@
|
||||
import 'dart:convert';
|
||||
import '../models/contact_group.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
class ContactGroupStore {
|
||||
static const String _key = 'contact_groups';
|
||||
static const String _keyPrefix = 'contact_groups';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length > 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
Future<List<ContactGroup>> loadGroups() async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot load contact groups.');
|
||||
return [];
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final raw = prefs.getString(_key);
|
||||
if (raw == null || raw.isEmpty) return [];
|
||||
String? jsonString = prefs.getString(keyFor);
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
final legacyJsonString = prefs.getString(_keyPrefix);
|
||||
prefs.remove(_keyPrefix);
|
||||
if (legacyJsonString != null && legacyJsonString.isNotEmpty) {
|
||||
appLogger.info(
|
||||
'Migrating channel messages from legacy key $_keyPrefix to scoped key $keyFor',
|
||||
);
|
||||
await prefs.setString(keyFor, legacyJsonString);
|
||||
jsonString = legacyJsonString;
|
||||
}
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
jsonString = prefs.getString(keyFor);
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
final decoded = jsonDecode(raw);
|
||||
final decoded = jsonDecode(jsonString);
|
||||
if (decoded is List) {
|
||||
return decoded
|
||||
.whereType<Map<String, dynamic>>()
|
||||
@@ -25,8 +53,12 @@ class ContactGroupStore {
|
||||
}
|
||||
|
||||
Future<void> saveGroups(List<ContactGroup> groups) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot save contact groups.');
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final encoded = jsonEncode(groups.map((group) => group.toJson()).toList());
|
||||
await prefs.setString(_key, encoded);
|
||||
await prefs.setString(keyFor, encoded);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,49 @@
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
class ContactSettingsStore {
|
||||
static const String _smazKeyPrefix = 'contact_smaz_';
|
||||
static const String _keyPrefix = 'contact_smaz_';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length > 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
Future<bool> loadSmazEnabled(String contactKeyHex) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn(
|
||||
'Public key hex is not set. Cannot load contact settings.',
|
||||
);
|
||||
return false;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_smazKeyPrefix$contactKeyHex';
|
||||
final key = '$keyFor$contactKeyHex';
|
||||
final oldKey = '$_keyPrefix$contactKeyHex';
|
||||
bool? enabled = prefs.getBool(key);
|
||||
if (enabled == null) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
enabled = prefs.getBool(oldKey);
|
||||
prefs.remove(oldKey);
|
||||
if (enabled != null) {
|
||||
appLogger.info(
|
||||
'Migrating contact settings from legacy key $oldKey to scoped key $key',
|
||||
);
|
||||
await prefs.setBool(key, enabled);
|
||||
}
|
||||
}
|
||||
return prefs.getBool(key) ?? false;
|
||||
}
|
||||
|
||||
Future<void> saveSmazEnabled(String contactKeyHex, bool enabled) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn(
|
||||
'Public key hex is not set. Cannot save contact settings.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_smazKeyPrefix$contactKeyHex';
|
||||
final key = '$keyFor$contactKeyHex';
|
||||
await prefs.setBool(key, enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,46 @@ import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import '../models/contact.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
class ContactStore {
|
||||
static const String _key = 'contacts';
|
||||
static const String _keyPrefix = 'contacts';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length > 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
Future<List<Contact>> loadContacts() async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot load contacts.');
|
||||
return [];
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonStr = prefs.getString(_key);
|
||||
if (jsonStr == null) return [];
|
||||
String? jsonString = prefs.getString(keyFor);
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
final legacyJsonString = prefs.getString(_keyPrefix);
|
||||
prefs.remove(_keyPrefix);
|
||||
if (legacyJsonString != null && legacyJsonString.isNotEmpty) {
|
||||
appLogger.info(
|
||||
'Migrating contacts from legacy key $_keyPrefix to scoped key $keyFor',
|
||||
);
|
||||
await prefs.setString(keyFor, legacyJsonString);
|
||||
jsonString = legacyJsonString;
|
||||
}
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
jsonString = prefs.getString(keyFor);
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
final jsonList = jsonDecode(jsonStr) as List<dynamic>;
|
||||
final jsonList = jsonDecode(jsonString) as List<dynamic>;
|
||||
return jsonList
|
||||
.map((entry) => _fromJson(entry as Map<String, dynamic>))
|
||||
.toList();
|
||||
@@ -23,9 +51,13 @@ class ContactStore {
|
||||
}
|
||||
|
||||
Future<void> saveContacts(List<Contact> contacts) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot save contacts.');
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonList = contacts.map(_toJson).toList();
|
||||
await prefs.setString(_key, jsonEncode(jsonList));
|
||||
await prefs.setString(keyFor, jsonEncode(jsonList));
|
||||
}
|
||||
|
||||
Map<String, dynamic> _toJson(Contact contact) {
|
||||
@@ -44,6 +76,10 @@ class ContactStore {
|
||||
'longitude': contact.longitude,
|
||||
'lastSeen': contact.lastSeen.millisecondsSinceEpoch,
|
||||
'lastMessageAt': contact.lastMessageAt.millisecondsSinceEpoch,
|
||||
'isActive': contact.isActive,
|
||||
'rawPacket': contact.rawPacket != null
|
||||
? base64Encode(contact.rawPacket!)
|
||||
: null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -71,6 +107,10 @@ class ContactStore {
|
||||
lastMessageAt: DateTime.fromMillisecondsSinceEpoch(
|
||||
lastMessageMs ?? lastSeenMs,
|
||||
),
|
||||
isActive: json['isActive'] as bool? ?? true,
|
||||
rawPacket: json['rawPacket'] != null
|
||||
? Uint8List.fromList(base64Decode(json['rawPacket'] as String))
|
||||
: null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,26 +2,59 @@ import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
import '../models/message.dart';
|
||||
import '../helpers/smaz.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
class MessageStore {
|
||||
static const String _keyPrefix = 'messages_';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length > 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
Future<void> saveMessages(
|
||||
String contactKeyHex,
|
||||
List<Message> messages,
|
||||
) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot save messages.');
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_keyPrefix$contactKeyHex';
|
||||
final key = '$keyFor$contactKeyHex';
|
||||
final jsonList = messages.map(_messageToJson).toList();
|
||||
await prefs.setString(key, jsonEncode(jsonList));
|
||||
}
|
||||
|
||||
Future<List<Message>> loadMessages(String contactKeyHex) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot load messages.');
|
||||
return [];
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_keyPrefix$contactKeyHex';
|
||||
final jsonString = prefs.getString(key);
|
||||
if (jsonString == null) return [];
|
||||
final key = '$keyFor$contactKeyHex';
|
||||
final oldKey = '$_keyPrefix$contactKeyHex';
|
||||
String? jsonString = prefs.getString(key);
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
final legacyJsonString = prefs.getString(oldKey);
|
||||
prefs.remove(oldKey);
|
||||
if (legacyJsonString != null && legacyJsonString.isNotEmpty) {
|
||||
appLogger.info(
|
||||
'Migrating messages from legacy key $oldKey to scoped key $key',
|
||||
);
|
||||
await prefs.setString(key, legacyJsonString);
|
||||
jsonString = legacyJsonString;
|
||||
}
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
jsonString = prefs.getString(keyFor);
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
final jsonList = jsonDecode(jsonString) as List<dynamic>;
|
||||
@@ -32,8 +65,12 @@ class MessageStore {
|
||||
}
|
||||
|
||||
Future<void> clearMessages(String contactKeyHex) async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot clear messages.');
|
||||
return;
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final key = '$_keyPrefix$contactKeyHex';
|
||||
final key = '$keyFor$contactKeyHex';
|
||||
await prefs.remove(key);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import '../utils/app_logger.dart';
|
||||
import 'prefs_manager.dart';
|
||||
|
||||
/// Storage for unread message tracking with debounced writes to reduce I/O.
|
||||
class UnreadStore {
|
||||
static const String _contactUnreadCountKey = 'contact_unread_count';
|
||||
static const String _keyPrefix = 'contact_unread_count';
|
||||
|
||||
String publicKeyHex = '';
|
||||
set setPublicKeyHex(String value) =>
|
||||
publicKeyHex = value.length >= 10 ? value.substring(0, 10) : '';
|
||||
|
||||
String get keyFor => '$_keyPrefix$publicKeyHex';
|
||||
|
||||
// Debounce timers to batch rapid writes
|
||||
Timer? _contactUnreadSaveTimer;
|
||||
@@ -20,12 +27,33 @@ class UnreadStore {
|
||||
}
|
||||
|
||||
Future<Map<String, int>> loadContactUnreadCount() async {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot load unread counts.');
|
||||
return {};
|
||||
}
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonStr = prefs.getString(_contactUnreadCountKey);
|
||||
if (jsonStr == null) return {};
|
||||
String? jsonString = prefs.getString(keyFor);
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
// Attempt migration from legacy unscoped key on first load
|
||||
final legacyJsonString = prefs.getString(_keyPrefix);
|
||||
prefs.remove(_keyPrefix);
|
||||
if (legacyJsonString != null && legacyJsonString.isNotEmpty) {
|
||||
appLogger.info(
|
||||
'Migrating channel messages from legacy key $_keyPrefix to scoped key $keyFor',
|
||||
);
|
||||
await prefs.setString(keyFor, legacyJsonString);
|
||||
jsonString = legacyJsonString;
|
||||
}
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
jsonString = prefs.getString(keyFor);
|
||||
}
|
||||
if (jsonString == null || jsonString.isEmpty) {
|
||||
return {};
|
||||
}
|
||||
|
||||
try {
|
||||
final json = jsonDecode(jsonStr) as Map<String, dynamic>;
|
||||
final json = jsonDecode(jsonString) as Map<String, dynamic>;
|
||||
return json.map((key, value) => MapEntry(key, value as int));
|
||||
} catch (_) {
|
||||
return {};
|
||||
@@ -33,6 +61,10 @@ class UnreadStore {
|
||||
}
|
||||
|
||||
void saveContactUnreadCount(Map<String, int> counts) {
|
||||
if (publicKeyHex.isEmpty) {
|
||||
appLogger.warn('Public key hex is not set. Cannot save unread counts.');
|
||||
return;
|
||||
}
|
||||
_pendingContactUnreadCount = counts;
|
||||
|
||||
_contactUnreadSaveTimer?.cancel();
|
||||
@@ -49,7 +81,7 @@ class UnreadStore {
|
||||
|
||||
final prefs = PrefsManager.instance;
|
||||
final jsonStr = jsonEncode(_pendingContactUnreadCount);
|
||||
await prefs.setString(_contactUnreadCountKey, jsonStr);
|
||||
await prefs.setString(keyFor, jsonStr);
|
||||
_pendingContactUnreadCount = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export 'browser_detection_stub.dart'
|
||||
if (dart.library.js_interop) 'browser_detection_web.dart';
|
||||
@@ -0,0 +1,3 @@
|
||||
class BrowserDetection {
|
||||
static bool get isChrome => false;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import 'package:web/web.dart' as web;
|
||||
|
||||
class BrowserDetection {
|
||||
static bool get isChrome {
|
||||
final userAgent = web.window.navigator.userAgent.toLowerCase();
|
||||
final isChrome = userAgent.contains('chrome');
|
||||
return isChrome;
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,25 @@ bool matchesContactQuery(Contact contact, String query) {
|
||||
return contact.publicKeyHex.toLowerCase().startsWith(hexPrefix);
|
||||
}
|
||||
|
||||
bool matchesDiscoveryContactQuery(Contact contact, String query) {
|
||||
final normalizedQuery = query.trim().toLowerCase();
|
||||
if (normalizedQuery.isEmpty) return true;
|
||||
|
||||
if (contact.name.toLowerCase().contains(normalizedQuery)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final hexPrefix = _extractHexPrefix(normalizedQuery);
|
||||
if (hexPrefix == null) return false;
|
||||
|
||||
return contact.publicKeyHex.toLowerCase().startsWith(hexPrefix);
|
||||
}
|
||||
|
||||
String? _extractHexPrefix(String query) {
|
||||
var cleaned = query;
|
||||
if (cleaned.startsWith('<')) {
|
||||
cleaned = cleaned.substring(1).replaceAll(">", "");
|
||||
}
|
||||
if (cleaned.startsWith('0x')) {
|
||||
cleaned = cleaned.substring(2);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../connector/meshcore_connector.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
import 'app_logger.dart';
|
||||
|
||||
/// Shows a confirmation dialog before disconnecting from the device.
|
||||
/// Returns true if user confirmed and disconnect completed, false otherwise.
|
||||
@@ -28,6 +29,7 @@ Future<bool> showDisconnectDialog(
|
||||
);
|
||||
|
||||
if (confirmed == true) {
|
||||
appLogger.info('Disconnect confirmed from popup', tag: 'Connection');
|
||||
await connector.disconnect();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:meshcore_open/connector/meshcore_connector.dart';
|
||||
import 'package:meshcore_open/connector/meshcore_protocol.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'dart:io';
|
||||
import '../utils/platform_info.dart';
|
||||
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
@@ -109,6 +110,10 @@ class GpxExport {
|
||||
String shareText,
|
||||
String subject,
|
||||
) async {
|
||||
if (PlatformInfo.isWeb) {
|
||||
debugPrint("GPX export is not supported on Web.");
|
||||
return gpxExportNotAvailable;
|
||||
}
|
||||
if (_contacts.isEmpty) {
|
||||
debugPrint("No repeaters to export – nothing to share.");
|
||||
return gpxExportNoContacts;
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
import 'dart:io';
|
||||
|
||||
/// Queries the macOS IOKit registry via [ioreg] to build a map of serial port
|
||||
/// callout device paths to human-readable USB device names.
|
||||
///
|
||||
/// The [flserial] native library uses the deprecated [IOUSBDevice] IOKit class
|
||||
/// to resolve device names, but macOS 10.15+ renamed it to [IOUSBHostDevice].
|
||||
/// As a result flserial always returns "n/a" for USB product/vendor info on
|
||||
/// modern macOS. This utility bypasses that limitation by invoking ioreg
|
||||
/// directly and parsing its output.
|
||||
///
|
||||
/// Returns a Map of e.g. `"/dev/cu.usbmodem1101"` → `"Nordic NRF52 DK"`.
|
||||
/// Devices without a USB product name are not included in the map.
|
||||
Future<Map<String, String>> queryMacOsUsbDeviceNames() async {
|
||||
assert(Platform.isMacOS);
|
||||
try {
|
||||
final result = await Process.run('ioreg', [
|
||||
'-r',
|
||||
'-c',
|
||||
'IOUSBHostDevice',
|
||||
'-l',
|
||||
], stdoutEncoding: const SystemEncoding());
|
||||
if (result.exitCode != 0) return const <String, String>{};
|
||||
return _parseIoregOutput(result.stdout as String);
|
||||
} catch (_) {
|
||||
return const <String, String>{};
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> _parseIoregOutput(String output) {
|
||||
final lines = output.split('\n');
|
||||
final result = <String, String>{};
|
||||
|
||||
// We accumulate the current device block's properties.
|
||||
// A new block starts at a line beginning with "+-o " which indicates a
|
||||
// top-level IOUSBHostDevice entry in the ioreg tree.
|
||||
String? currentVendor;
|
||||
String? currentProduct;
|
||||
final List<String> currentPorts = <String>[];
|
||||
|
||||
void flushBlock() {
|
||||
if (currentPorts.isNotEmpty &&
|
||||
(currentVendor != null || currentProduct != null)) {
|
||||
final parts = <String>[
|
||||
if (currentVendor != null && currentVendor!.isNotEmpty) currentVendor!,
|
||||
if (currentProduct != null && currentProduct!.isNotEmpty)
|
||||
currentProduct!,
|
||||
];
|
||||
final name = parts.join(' ');
|
||||
for (final port in currentPorts) {
|
||||
result[port] = name;
|
||||
}
|
||||
}
|
||||
currentVendor = null;
|
||||
currentProduct = null;
|
||||
currentPorts.clear();
|
||||
}
|
||||
|
||||
for (final line in lines) {
|
||||
// A new top-level device block begins here.
|
||||
if (line.startsWith('+-o ')) {
|
||||
flushBlock();
|
||||
continue;
|
||||
}
|
||||
// USB Product Name (appears at multiple depths in the tree, first wins)
|
||||
final productMatch = _kProductName.firstMatch(line);
|
||||
if (productMatch != null && currentProduct == null) {
|
||||
currentProduct = productMatch.group(1)?.trim();
|
||||
continue;
|
||||
}
|
||||
// USB Vendor Name
|
||||
final vendorMatch = _kVendorName.firstMatch(line);
|
||||
if (vendorMatch != null && currentVendor == null) {
|
||||
currentVendor = vendorMatch.group(1)?.trim();
|
||||
continue;
|
||||
}
|
||||
// IOCalloutDevice — the /dev/cu.xxx path our app uses
|
||||
final calloutMatch = _kCalloutDevice.firstMatch(line);
|
||||
if (calloutMatch != null) {
|
||||
final port = calloutMatch.group(1)?.trim();
|
||||
if (port != null && port.isNotEmpty) {
|
||||
currentPorts.add(port);
|
||||
}
|
||||
}
|
||||
}
|
||||
flushBlock();
|
||||
return result;
|
||||
}
|
||||
|
||||
final RegExp _kProductName = RegExp(r'"USB Product Name" = "([^"]*)"');
|
||||
final RegExp _kVendorName = RegExp(r'"USB Vendor Name" = "([^"]*)"');
|
||||
final RegExp _kCalloutDevice = RegExp(r'"IOCalloutDevice" = "([^"]*)"');
|
||||
@@ -0,0 +1,47 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'dart:io' show Platform;
|
||||
import 'browser_detection.dart';
|
||||
|
||||
/// Utility class to safely check the current platform across web and native.
|
||||
///
|
||||
/// Using `Platform` from `dart:io` directly on Web causes a crash.
|
||||
/// This class handles the `kIsWeb` check first to avoid those crashes.
|
||||
class PlatformInfo {
|
||||
/// Whether the app is running in a web browser.
|
||||
static bool get isWeb => kIsWeb;
|
||||
|
||||
/// Whether the app is running in the Chrome browser (only relevant if [isWeb] is true).
|
||||
static bool get isChrome => isWeb && BrowserDetection.isChrome;
|
||||
|
||||
/// Whether the app is running on Android.
|
||||
static bool get isAndroid => !kIsWeb && Platform.isAndroid;
|
||||
|
||||
/// Whether the app is running on iOS.
|
||||
static bool get isIOS => !kIsWeb && Platform.isIOS;
|
||||
|
||||
/// Whether the app is running on macOS.
|
||||
static bool get isMacOS => !kIsWeb && Platform.isMacOS;
|
||||
|
||||
/// Whether the app is running on Windows.
|
||||
static bool get isWindows => !kIsWeb && Platform.isWindows;
|
||||
|
||||
/// Whether the app is running on Linux.
|
||||
static bool get isLinux => !kIsWeb && Platform.isLinux;
|
||||
|
||||
/// Whether the app is running on a mobile platform (Android or iOS).
|
||||
static bool get isMobile => isAndroid || isIOS;
|
||||
|
||||
/// Whether the app is running on a desktop platform (macOS, Windows, or Linux).
|
||||
static bool get isDesktop => isMacOS || isWindows || isLinux;
|
||||
|
||||
/// Whether the current platform supports a native USB serial backend.
|
||||
static bool get supportsNativeUsbSerial =>
|
||||
isAndroid || isWindows || isLinux || isMacOS;
|
||||
|
||||
/// Whether the current browser supports the Web Serial backend.
|
||||
static bool get supportsWebSerial => isWeb && isChrome;
|
||||
|
||||
/// Whether USB serial is expected to be available on the current platform.
|
||||
static bool get supportsUsbSerial =>
|
||||
supportsNativeUsbSerial || supportsWebSerial;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
String normalizeUsbPortName(String portLabel) {
|
||||
final separatorIndex = portLabel.indexOf(' - ');
|
||||
final normalized = separatorIndex >= 0
|
||||
? portLabel.substring(0, separatorIndex)
|
||||
: portLabel;
|
||||
return normalized.trim();
|
||||
}
|
||||
|
||||
/// Returns a human-readable name for a serial port label.
|
||||
///
|
||||
/// The native flserial library encodes port info as a ` - `-separated string:
|
||||
/// `"<port> - <description> - <hardware_id>"`
|
||||
///
|
||||
/// This function extracts the *description* field (index 1) and discards the
|
||||
/// raw hardware_id, which is not user-friendly. If the description is missing
|
||||
/// or unhelpful (e.g. "n/a"), it falls back to the raw port name.
|
||||
String friendlyUsbPortName(String portLabel) {
|
||||
final parts = portLabel.split(' - ');
|
||||
if (parts.length < 2) {
|
||||
return portLabel.trim();
|
||||
}
|
||||
// parts[0] = port name, parts[1] = description, parts[2+] = hardware id
|
||||
final description = parts[1].trim();
|
||||
if (description.isEmpty || description.toLowerCase() == 'n/a') {
|
||||
return parts[0].trim();
|
||||
}
|
||||
return description;
|
||||
}
|
||||
|
||||
String describeWebUsbPort({
|
||||
required int? vendorId,
|
||||
required int? productId,
|
||||
String requestPortLabel = 'Choose USB Device',
|
||||
String fallbackDeviceName = 'Web Serial Device',
|
||||
Map<String, String> knownUsbNames = const <String, String>{},
|
||||
}) {
|
||||
if (vendorId == null && productId == null) {
|
||||
return requestPortLabel;
|
||||
}
|
||||
|
||||
final vendorHex = vendorId?.toRadixString(16).padLeft(4, '0').toUpperCase();
|
||||
final productHex = productId?.toRadixString(16).padLeft(4, '0').toUpperCase();
|
||||
final knownName = (vendorHex != null && productHex != null)
|
||||
? knownUsbNames['${vendorHex.toLowerCase()}:${productHex.toLowerCase()}']
|
||||
: null;
|
||||
|
||||
final parts = <String>[knownName ?? fallbackDeviceName];
|
||||
if (vendorHex != null) {
|
||||
parts.add('VID:$vendorHex');
|
||||
}
|
||||
if (productHex != null) {
|
||||
parts.add('PID:$productHex');
|
||||
}
|
||||
return '${parts.first} (${parts.skip(1).join(' ')})';
|
||||
}
|
||||
|
||||
String buildUsbDisplayLabel({
|
||||
required String basePortLabel,
|
||||
String? deviceName,
|
||||
}) {
|
||||
final trimmedName = deviceName?.trim() ?? '';
|
||||
if (trimmedName.isEmpty) {
|
||||
return basePortLabel;
|
||||
}
|
||||
return '$basePortLabel - $trimmedName';
|
||||
}
|
||||
@@ -9,7 +9,16 @@ class AppBarTitle extends StatelessWidget {
|
||||
final String title;
|
||||
final Widget? leading;
|
||||
final Widget? trailing;
|
||||
const AppBarTitle(this.title, {this.leading, this.trailing, super.key});
|
||||
final bool indicators;
|
||||
final bool subtitle;
|
||||
const AppBarTitle(
|
||||
this.title, {
|
||||
this.leading,
|
||||
this.trailing,
|
||||
this.indicators = true,
|
||||
this.subtitle = true,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -21,12 +30,12 @@ class AppBarTitle extends StatelessWidget {
|
||||
final availableWidth = constraints.hasBoundedWidth
|
||||
? constraints.maxWidth
|
||||
: MediaQuery.sizeOf(context).width;
|
||||
final compact = availableWidth < 240;
|
||||
final compact = availableWidth < 170;
|
||||
final showSubtitle =
|
||||
!compact && connector.isConnected && selfName != null;
|
||||
!compact && connector.isConnected && selfName != null && subtitle;
|
||||
final showBattery = availableWidth >= 60;
|
||||
final showSnr = availableWidth >= 110;
|
||||
final showIndicators = showBattery || showSnr;
|
||||
final showIndicators = (showBattery || showSnr) && indicators;
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
@@ -40,7 +49,7 @@ class AppBarTitle extends StatelessWidget {
|
||||
Text(title, maxLines: 1, overflow: TextOverflow.ellipsis),
|
||||
if (showSubtitle)
|
||||
Text(
|
||||
'($selfName)',
|
||||
selfName,
|
||||
style: TextStyle(fontSize: 14, color: Colors.grey[600]),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import '../l10n/l10n.dart';
|
||||
import 'signal_ui.dart';
|
||||
|
||||
/// A reusable tile widget for displaying a MeshCore device in a list
|
||||
class DeviceTile extends StatelessWidget {
|
||||
@@ -33,28 +34,25 @@ class DeviceTile extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildSignalIcon(int rssi) {
|
||||
IconData icon;
|
||||
Color color;
|
||||
|
||||
if (rssi >= -60) {
|
||||
icon = Icons.signal_cellular_4_bar;
|
||||
color = Colors.green;
|
||||
} else if (rssi >= -70) {
|
||||
icon = Icons.signal_cellular_alt;
|
||||
color = Colors.lightGreen;
|
||||
} else if (rssi >= -80) {
|
||||
icon = Icons.signal_cellular_alt_2_bar;
|
||||
color = Colors.orange;
|
||||
} else {
|
||||
icon = Icons.signal_cellular_alt_1_bar;
|
||||
color = Colors.red;
|
||||
}
|
||||
final tier = rssi >= -60
|
||||
? 0
|
||||
: rssi >= -70
|
||||
? 1
|
||||
: rssi >= -80
|
||||
? 2
|
||||
: rssi >= -90
|
||||
? 3
|
||||
: 4;
|
||||
final signalUi = signalUiForStrengthTier(tier);
|
||||
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(icon, color: color),
|
||||
Text('$rssi dBm', style: TextStyle(fontSize: 10, color: color)),
|
||||
Icon(signalUi.icon, color: signalUi.color),
|
||||
Text(
|
||||
'$rssi dBm',
|
||||
style: TextStyle(fontSize: 10, color: signalUi.color),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -224,3 +224,93 @@ class ContactsFilterMenu extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class DiscoveryContactsFilterMenu extends StatelessWidget {
|
||||
final ContactSortOption sortOption;
|
||||
final ContactTypeFilter typeFilter;
|
||||
final ValueChanged<ContactSortOption> onSortChanged;
|
||||
final ValueChanged<ContactTypeFilter> onTypeFilterChanged;
|
||||
|
||||
const DiscoveryContactsFilterMenu({
|
||||
super.key,
|
||||
required this.sortOption,
|
||||
required this.typeFilter,
|
||||
required this.onSortChanged,
|
||||
required this.onTypeFilterChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return SortFilterMenu(
|
||||
tooltip: l10n.listFilter_tooltip,
|
||||
sections: [
|
||||
SortFilterMenuSection(
|
||||
title: l10n.listFilter_sortBy,
|
||||
options: [
|
||||
SortFilterMenuOption(
|
||||
value: _actionSortLastSeen,
|
||||
label: l10n.listFilter_heardRecently,
|
||||
checked: sortOption == ContactSortOption.lastSeen,
|
||||
),
|
||||
SortFilterMenuOption(
|
||||
value: _actionSortName,
|
||||
label: l10n.listFilter_az,
|
||||
checked: sortOption == ContactSortOption.name,
|
||||
),
|
||||
],
|
||||
),
|
||||
SortFilterMenuSection(
|
||||
title: l10n.listFilter_filters,
|
||||
options: [
|
||||
SortFilterMenuOption(
|
||||
value: _actionFilterAll,
|
||||
label: l10n.listFilter_all,
|
||||
checked: typeFilter == ContactTypeFilter.all,
|
||||
),
|
||||
SortFilterMenuOption(
|
||||
value: _actionFilterUsers,
|
||||
label: l10n.listFilter_users,
|
||||
checked: typeFilter == ContactTypeFilter.users,
|
||||
),
|
||||
SortFilterMenuOption(
|
||||
value: _actionFilterRepeaters,
|
||||
label: l10n.listFilter_repeaters,
|
||||
checked: typeFilter == ContactTypeFilter.repeaters,
|
||||
),
|
||||
SortFilterMenuOption(
|
||||
value: _actionFilterRooms,
|
||||
label: l10n.listFilter_roomServers,
|
||||
checked: typeFilter == ContactTypeFilter.rooms,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
onSelected: (action) {
|
||||
switch (action) {
|
||||
case _actionSortName:
|
||||
onSortChanged(ContactSortOption.name);
|
||||
break;
|
||||
case _actionSortLastSeen:
|
||||
onSortChanged(ContactSortOption.lastSeen);
|
||||
break;
|
||||
case _actionFilterAll:
|
||||
onTypeFilterChanged(ContactTypeFilter.all);
|
||||
break;
|
||||
case _actionFilterUsers:
|
||||
onTypeFilterChanged(ContactTypeFilter.users);
|
||||
break;
|
||||
case _actionFilterFavorites:
|
||||
onTypeFilterChanged(ContactTypeFilter.favorites);
|
||||
break;
|
||||
case _actionFilterRepeaters:
|
||||
onTypeFilterChanged(ContactTypeFilter.repeaters);
|
||||
break;
|
||||
case _actionFilterRooms:
|
||||
onTypeFilterChanged(ContactTypeFilter.rooms);
|
||||
break;
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ class _PathManagementDialogState extends State<_PathManagementDialog> {
|
||||
title: context.l10n.contacts_repeaterPathTrace,
|
||||
path: Uint8List.fromList(pathBytes),
|
||||
flipPathRound: true,
|
||||
targetContact: widget.contact,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user