Bluetooth improvements

This commit is contained in:
notiant
2025-12-26 08:15:07 +01:00
committed by GitHub
parent ce2166a847
commit 687b0a7279
16 changed files with 80 additions and 3 deletions
+2
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -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",
+1
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -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",
+2
View File
@@ -473,11 +473,13 @@
"enable-message": "启用蓝牙以查看可用设备。",
"info": "信息",
"known-devices": "已知设备",
"no-devices": "没有可用设备",
"pair": "一对",
"paired": "配对",
"paired-devices": "已配对的设备",
"pairing": "配对...",
"pairing-mode": "确保您的设备处于配对模式。",
"refresh-devices": "刷新设备",
"scanning": "正在扫描设备...",
"signal": "信号",
"title": "蓝牙",
@@ -247,9 +247,6 @@ NBox {
}
}
}
onRightClicked: {
BluetoothService.forgetDevice(modelData);
}
}
}
}
@@ -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
+2
View File
@@ -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`;