diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 6d1b69c3c..bf78f9d1f 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -473,11 +473,13 @@ "enable-message": "Aktivieren Sie Bluetooth, um verfügbare Geräte zu sehen.", "info": "Info", "known-devices": "Bekannte Geräte", + "no-devices": "Keine Geräte verfügbar", "pair": "Koppeln", "paired": "Gekoppelt", "paired-devices": "Gekoppelte Geräte", "pairing": "Koppeln...", "pairing-mode": "Stellen Sie sicher, dass sich Ihr Gerät im Kopplungsmodus befindet.", + "refresh-devices": "Geräte aktualisieren", "scanning": "Scannen nach Geräten...", "signal": "Signal", "title": "Bluetooth", diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index bd5a2aa54..be9a2fbca 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -473,11 +473,13 @@ "enable-message": "Enable Bluetooth to see available devices.", "info": "Info", "known-devices": "Known devices", + "no-devices": "No devices available", "pair": "Pair", "paired": "Paired", "paired-devices": "Paired devices", "pairing": "Pairing...", "pairing-mode": "Make sure your device is in pairing mode.", + "refresh-devices": "Refresh devices", "scanning": "Scanning for devices...", "signal": "Signal", "title": "Bluetooth", diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 8feead7cf..0b0107ed0 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -473,11 +473,13 @@ "enable-message": "Activa Bluetooth para ver los dispositivos disponibles.", "info": "Información", "known-devices": "Dispositivos conocidos", + "no-devices": "No hay dispositivos disponibles", "pair": "Emparejar", "paired": "Emparejado", "paired-devices": "Dispositivos emparejados", "pairing": "Emparejamiento...", "pairing-mode": "Asegúrate de que tu dispositivo esté en modo de emparejamiento.", + "refresh-devices": "Actualizar dispositivos", "scanning": "Buscando dispositivos...", "signal": "Señal", "title": "Bluetooth", diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index a55e34f77..2a4f43ab3 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -473,11 +473,13 @@ "enable-message": "Activez le Bluetooth pour voir les appareils disponibles.", "info": "Infos", "known-devices": "Appareils connus", + "no-devices": "Aucun appareil disponible", "pair": "Appairer", "paired": "Appairé", "paired-devices": "Appareils appairés", "pairing": "Appairage en cours...", "pairing-mode": "Assurez-vous que votre appareil est en mode d'appairage.", + "refresh-devices": "Actualiser les appareils", "scanning": "Recherche d'appareils en cours...", "signal": "Signal", "title": "Bluetooth", diff --git a/Assets/Translations/hu.json b/Assets/Translations/hu.json index 4074ca80c..3318589bc 100644 --- a/Assets/Translations/hu.json +++ b/Assets/Translations/hu.json @@ -473,11 +473,13 @@ "enable-message": "Kapcsolja be a Bluetooth-t az elérhető eszközök megtekintéséhez.", "info": "Infó", "known-devices": "Ismert eszközök", + "no-devices": "Nincsenek elérhető eszközök", "pair": "Párosítás", "paired": "Párosítva", "paired-devices": "Párosított eszközök", "pairing": "Párosítás folyamatban...", "pairing-mode": "Győződjön meg arról, hogy eszköze párosítási módban van.", + "refresh-devices": "Eszközök frissítése", "scanning": "Eszközök keresése...", "signal": "Jel", "title": "Bluetooth", diff --git a/Assets/Translations/ja.json b/Assets/Translations/ja.json index 54d4417eb..1c8866d06 100644 --- a/Assets/Translations/ja.json +++ b/Assets/Translations/ja.json @@ -473,11 +473,13 @@ "enable-message": "利用可能なデバイスを表示するには Bluetooth を有効にしてください。", "info": "情報 (Jōhō)", "known-devices": "登録済みデバイス", + "no-devices": "利用可能なデバイスはありません", "pair": "ペア", "paired": "ペアリング済み", "paired-devices": "ペアリングされたデバイス", "pairing": "ペアリング中...", "pairing-mode": "デバイスがペアリングモードになっていることを確認してください。", + "refresh-devices": "デバイスを更新", "scanning": "デバイスをスキャン中...", "signal": "信号 (shingō)", "title": "Bluetooth", diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index ae328d3e8..e2a9d8d23 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -473,11 +473,13 @@ "enable-message": "Schakel Bluetooth in om beschikbare apparaten te zien.", "info": "Info", "known-devices": "Bekende apparaten", + "no-devices": "Geen apparaten beschikbaar", "pair": "Koppelen", "paired": "Gekoppeld", "paired-devices": "Gekoppelde apparaten", "pairing": "Koppelen...", "pairing-mode": "Zorg ervoor dat je apparaat in koppelmodus staat.", + "refresh-devices": "Apparaten verversen", "scanning": "Zoeken naar apparaten...", "signal": "Signaal", "title": "Bluetooth", diff --git a/Assets/Translations/pl.json b/Assets/Translations/pl.json index 90d7bf45a..904476c54 100644 --- a/Assets/Translations/pl.json +++ b/Assets/Translations/pl.json @@ -478,6 +478,7 @@ "paired-devices": "Sparowane urządzenia", "pairing": "Parowanie...", "pairing-mode": "Upewnij się, że urządzenie jest w trybie parowania.", + "refresh-devices": "Odśwież urządzenia", "scanning": "Skanowanie urządzeń...", "signal": "Sygnał", "title": "Bluetooth", diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index f039a8213..0a078b19c 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -473,11 +473,13 @@ "enable-message": "Ative o Bluetooth para ver os dispositivos disponíveis.", "info": "Informações", "known-devices": "Dispositivos conhecidos", + "no-devices": "Nenhum dispositivo disponível", "pair": "Emparelhar", "paired": "Emparelhado", "paired-devices": "Dispositivos emparelhados", "pairing": "Emparelhamento...", "pairing-mode": "Certifique-se de que seu dispositivo está em modo de pareamento.", + "refresh-devices": "Atualizar dispositivos", "scanning": "Procurando por dispositivos...", "signal": "Sinal", "title": "Bluetooth", diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 4a7e906cf..a6a75b774 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -473,11 +473,13 @@ "enable-message": "Включите Bluetooth, чтобы увидеть доступные устройства.", "info": "Информация", "known-devices": "Известные устройства", + "no-devices": "Нет доступных устройств", "pair": "Пара", "paired": "Парный", "paired-devices": "Сопряжённые устройства", "pairing": "Сопряжение...", "pairing-mode": "Убедитесь, что ваше устройство находится в режиме сопряжения.", + "refresh-devices": "Обновить устройства", "scanning": "Поиск устройств...", "signal": "Сигнал", "title": "Bluetooth", diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index 4851e281e..7477cae80 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -473,11 +473,13 @@ "enable-message": "Mevcut cihazları görmek için Bluetooth'u etkinleştirin.", "info": "Bilgi", "known-devices": "Bilinen cihazlar", + "no-devices": "Mevcut cihaz yok", "pair": "Çift", "paired": "Eşleştirilmiş", "paired-devices": "Eşleştirilmiş cihazlar", "pairing": "Eşleştiriliyor...", "pairing-mode": "Cihazınızın eşleştirme modunda olduğundan emin olun.", + "refresh-devices": "Cihazları yenile", "scanning": "Cihazlar tarınıyor...", "signal": "Sinyal", "title": "Bluetooth", diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index cdf4b63ea..b1877b99e 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -473,11 +473,13 @@ "enable-message": "Увімкніть Bluetooth, щоб побачити доступні пристрої.", "info": "Інформація", "known-devices": "Відомі пристрої", + "no-devices": "Пристрої недоступні", "pair": "Пара", "paired": "У парі", "paired-devices": "З'єднані пристрої", "pairing": "Створення пари...", "pairing-mode": "Переконайтеся, що ваш пристрій у режимі з'єднання.", + "refresh-devices": "Оновити пристрої", "scanning": "Сканування пристроїв...", "signal": "Сигнал", "title": "Bluetooth", diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 95b227404..754ce3a19 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -473,11 +473,13 @@ "enable-message": "启用蓝牙以查看可用设备。", "info": "信息", "known-devices": "已知设备", + "no-devices": "没有可用设备", "pair": "一对", "paired": "配对", "paired-devices": "已配对的设备", "pairing": "配对...", "pairing-mode": "确保您的设备处于配对模式。", + "refresh-devices": "刷新设备", "scanning": "正在扫描设备...", "signal": "信号", "title": "蓝牙", diff --git a/Modules/Panels/Bluetooth/BluetoothDevicesList.qml b/Modules/Panels/Bluetooth/BluetoothDevicesList.qml index 132e62d7d..41ef19b6e 100644 --- a/Modules/Panels/Bluetooth/BluetoothDevicesList.qml +++ b/Modules/Panels/Bluetooth/BluetoothDevicesList.qml @@ -247,9 +247,6 @@ NBox { } } } - onRightClicked: { - BluetoothService.forgetDevice(modelData); - } } } } diff --git a/Modules/Panels/Bluetooth/BluetoothPanel.qml b/Modules/Panels/Bluetooth/BluetoothPanel.qml index dd3421a8d..71d3804c4 100644 --- a/Modules/Panels/Bluetooth/BluetoothPanel.qml +++ b/Modules/Panels/Bluetooth/BluetoothPanel.qml @@ -269,6 +269,59 @@ SmartPanel { Layout.fillWidth: true } + // Empty state when no devices + NBox { + visible: { + if (!BluetoothService.adapter || BluetoothService.adapter.discovering || !Bluetooth.devices) + return false; + + var availableCount = Bluetooth.devices.values.filter(dev => { + return dev && !dev.paired && !dev.pairing && !dev.blocked && (dev.signalStrength === undefined || dev.signalStrength > 0); + }).length + return (availableCount === 0); + } + Layout.fillWidth: true + Layout.fillHeight: true + + ColumnLayout { + anchors.fill: parent + spacing: Style.marginL + + Item { + Layout.fillHeight: true + } + + NIcon { + icon: "bluetooth" + pointSize: 64 + color: Color.mOnSurfaceVariant + Layout.alignment: Qt.AlignHCenter + } + + NText { + text: I18n.tr("bluetooth.panel.no-devices") + pointSize: Style.fontSizeL + color: Color.mOnSurfaceVariant + Layout.alignment: Qt.AlignHCenter + } + + NButton { + text: I18n.tr("bluetooth.panel.refresh-devices") + icon: "refresh" + Layout.alignment: Qt.AlignHCenter + onClicked: { + if (BluetoothService.adapter) { + BluetoothService.adapter.discovering = !BluetoothService.adapter.discovering; + } + } + } + + Item { + Layout.fillHeight: true + } + } + } + // Fallback - No devices, scanning NBox { Layout.fillWidth: true diff --git a/Services/Networking/BluetoothService.qml b/Services/Networking/BluetoothService.qml index 9c1639215..ecfa74afc 100644 --- a/Services/Networking/BluetoothService.qml +++ b/Services/Networking/BluetoothService.qml @@ -482,8 +482,10 @@ BluetoothAgent { printf 'agent DisplayYesNo\n'; printf 'default-agent\n'; printf 'pair ${addr}\n'; + sleep 2; printf 'yes\n'; printf 'trust ${addr}\n'; + sleep 1; printf 'connect ${addr}\n'; printf 'quit\n'; ) | bluetoothctl`;