Skip to content

Commit bedc4cf

Browse files
committed
feat: device error modal
1 parent eedc1de commit bedc4cf

36 files changed

+446
-247
lines changed

ui/eslint.config.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default tseslint.config(
9898
{
9999
html: 'ignore',
100100
custom: 'enforce',
101-
exceptions: [],
101+
exceptions: ['BaseModal'],
102102
},
103103
],
104104
'react/jsx-filename-extension': [
@@ -350,7 +350,11 @@ export default tseslint.config(
350350
},
351351
},
352352
{
353-
files: ['src/__mocks__/**', 'src/constants/keyboard-keys-map.ts'],
353+
files: [
354+
'src/__mocks__/**',
355+
'src/constants/keyboard-keys-map.ts',
356+
'src/constants/device-likely-leave-reason-map.ts',
357+
],
354358
rules: {
355359
'@typescript-eslint/naming-convention': 'off',
356360
},

ui/public/locales/en/translation.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@
6363
"Device Photo": "Device Photo",
6464
"Device Settings": "Device Settings",
6565
"Device cannot get kicked from the group": "Device cannot get kicked from the group",
66-
"Device is not present anymore for some reason.": "Device is not present anymore for some reason.",
67-
"Device is present but offline.": "Device is present but offline.",
66+
"Device is not present anymore for some reason": "Device is not present anymore for some reason",
67+
"Device is present but offline": "Device is present but offline",
6868
"Device was disconnected": "Device was disconnected",
69-
"Device was kicked by automatic timeout.": "Device was kicked by automatic timeout.",
69+
"Device was kicked by automatic timeout": "Device was kicked by automatic timeout",
7070
"Devices": "Devices",
7171
"Disable WiFi": "Disable WiFi",
7272
"Discharging": "Discharging",
@@ -232,7 +232,7 @@
232232
"Silent Mode": "Silent Mode",
233233
"Size": "Size",
234234
"Socket connection was lost": "Socket connection was lost",
235-
"Someone stole your device.": "Someone stole your device.",
235+
"Someone stole your device": "Someone stole your device",
236236
"Special Keys": "Special Keys",
237237
"Status": "Status",
238238
"Stop": "Stop",
@@ -328,5 +328,7 @@
328328
"Show Manifest": "Show Manifest",
329329
"Hide Manifest": "Hide Manifest",
330330
"Stop Automation": "Stop Automation",
331-
"Unhealthy": "Unhealthy"
331+
"Unhealthy": "Unhealthy",
332+
"You (or someone else) kicked the device": "You (or someone else) kicked the device",
333+
"Service is currently unavailable": "Service is currently unavailable! Try your attempt later"
332334
}

ui/public/locales/es/translation.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@
6363
"Device Photo": "Foto de dispositivo",
6464
"Device Settings": "Configuración de Dispositivo",
6565
"Device cannot get kicked from the group": "El dispositivo no puede ser expulsado del grupo",
66-
"Device is not present anymore for some reason.": "Por algún motivo el dispositivo ya no está presente",
67-
"Device is present but offline.": "El dispositivo está presente pero no disponible",
66+
"Device is not present anymore for some reason": "Por algún motivo el dispositivo ya no está presente",
67+
"Device is present but offline": "El dispositivo está presente pero no disponible",
6868
"Device was disconnected": "El dispositivo se ha desconectado",
69-
"Device was kicked by automatic timeout.": "El dispositivo fue expulsado por un exceso de tiempo automático",
69+
"Device was kicked by automatic timeout": "El dispositivo fue expulsado por un exceso de tiempo automático",
7070
"Devices": "Dispositivos",
7171
"Disable WiFi": "Deshabilitar WIFI",
7272
"Discharging": "Descargando",
@@ -232,7 +232,7 @@
232232
"Silent Mode": "Modo silencio",
233233
"Size": "Tamaño",
234234
"Socket connection was lost": "Se perdió la conexión con el socket",
235-
"Someone stole your device.": "Alguien robó tu dispositivo",
235+
"Someone stole your device": "Alguien robó tu dispositivo",
236236
"Special Keys": "Teclas especiales",
237237
"Status": "Estado",
238238
"Stop": "Parar",
@@ -328,5 +328,7 @@
328328
"Show Manifest": "Mostrar manifiesto",
329329
"Hide Manifest": "Ocultar manifiesto",
330330
"Stop Automation": "Detener la automatización",
331-
"Unhealthy": "Malsano"
331+
"Unhealthy": "Malsano",
332+
"You (or someone else) kicked the device": "Tú (u otra persona) pateaste el dispositivo",
333+
"Service is currently unavailable": "¡El servicio no está disponible actualmente! \nPrueba tu intento más tarde"
332334
}

ui/public/locales/fr/translation.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@
7474
"Device Photo": "Photos du Terminal",
7575
"Device Settings": "Paramètres du Terminal",
7676
"Device cannot get kicked from the group": "Le Terminal ne peut pas être exclu du groupe",
77-
"Device is not present anymore for some reason.": "Le Terminal n'est plus présent pour certaines raisons",
78-
"Device is present but offline.": "Le Terminal est présent mais Hors-Ligne",
77+
"Device is not present anymore for some reason": "Le Terminal n'est plus présent pour certaines raisons",
78+
"Device is present but offline": "Le Terminal est présent mais Hors-Ligne",
7979
"Device was disconnected": "Le Terminal était déconnecté",
80-
"Device was kicked by automatic timeout.": "Le Terminal a été exclu par le Timeout automatique",
80+
"Device was kicked by automatic timeout": "Le Terminal a été exclu par le Timeout automatique",
8181
"Devices": "Terminaux",
8282
"Disable WiFi": "Désactiver le Wifi",
8383
"Discharging": "En Décharge",
@@ -272,7 +272,7 @@
272272
"Silent Mode": "Mode Silencieux",
273273
"Size": "Taille",
274274
"Socket connection was lost": "La connexion au Socket a été perdu",
275-
"Someone stole your device.": "Quelqu'un a volé votre terminal.",
275+
"Someone stole your device": "Quelqu'un a volé votre terminal",
276276
"Special Keys": "Clefs spéciales",
277277
"Start/Stop Logging": "Démarrer/Arrêter les logs",
278278
"Status": "Statut",
@@ -368,7 +368,7 @@
368368
"X DPI": "X DPI",
369369
"Y DPI": "Y DPI",
370370
"Yes": "Oui",
371-
"You (or someone else) kicked the device.": "Vous (ou quelqu'un d'autre) a exclu le Terminal.",
371+
"You (or someone else) kicked the device": "Vous (ou quelqu'un d'autre) a exclu le Terminal",
372372
"translate": "Traduire",
373373
"Empty": "Vide",
374374
"Something went wrong": "Quelque chose s'est mal passé",
@@ -404,5 +404,6 @@
404404
"Please type or select value": "Veuillez saisir ou sélectionner une valeur",
405405
"Show Manifest": "Afficher le manifeste",
406406
"Hide Manifest": "Masquer le manifeste",
407-
"Unhealthy": "Malsain"
407+
"Unhealthy": "Malsain",
408+
"Service is currently unavailable": "Le service est actuellement indisponible ! \nEssayez votre tentative plus tard"
408409
}

ui/public/locales/ja/translation.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@
6767
"Developer": "開発者",
6868
"Device": "デバイス",
6969
"Device cannot get kicked from the group": "このデバイスはグループからキックできません。",
70-
"Device is not present anymore for some reason.": "実機が見えなくなりました。",
71-
"Device is present but offline.": "デバイスは接続されているが、オフラインになっています。",
70+
"Device is not present anymore for some reason": "実機が見えなくなりました。",
71+
"Device is present but offline": "デバイスは接続されているが、オフラインになっています。",
7272
"Device Photo": "実機写真",
7373
"Device Settings": "実機設定",
7474
"Device was disconnected": "デバイスへの接続が切れました",
75-
"Device was kicked by automatic timeout.": "デバイスは自動タイムアウトにより切断されました。",
75+
"Device was kicked by automatic timeout": "デバイスは自動タイムアウトにより切断されました。",
7676
"Devices": "端末リスト",
7777
"Disable WiFi": "無線LANを無効にする",
7878
"Discharging": "放電中",
@@ -264,7 +264,7 @@
264264
"SIM": "SIM",
265265
"Size": "サイズ",
266266
"Socket connection was lost": "ソケットへの接続が切れました",
267-
"Someone stole your device.": "誰かはデバイスを盗みました。",
267+
"Someone stole your device": "誰かはデバイスを盗みました。",
268268
"Special Keys": "特別なキー",
269269
"Start/Stop Logging": "ログ取得の開始/停止",
270270
"Status": "ステータス",
@@ -325,7 +325,7 @@
325325
"X DPI": "X DPI",
326326
"Y DPI": "Y DPI",
327327
"Yes": "はい",
328-
"You (or someone else) kicked the device.": "この実機はキックされました。",
328+
"You (or someone else) kicked the device": "この実機はキックされました。",
329329
"Empty": "空の",
330330
"Something went wrong": "何か問題が発生しました",
331331
"Groups": "グループ",
@@ -362,5 +362,6 @@
362362
"Show Manifest": "マニフェストの表示",
363363
"Hide Manifest": "マニフェストを隠す",
364364
"Stop Automation": "自動化の停止",
365-
"Unhealthy": "不健康"
365+
"Unhealthy": "不健康",
366+
"Service is currently unavailable": "現在サービスはご利用いただけません。\n後で試してください"
366367
}

ui/public/locales/kk-KZ/translation.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@
6262
"Developer": "Разработчик",
6363
"Device": "Құрылғы",
6464
"Device cannot get kicked from the group": "Құрылғы топтан шығарылмайды",
65-
"Device is not present anymore for some reason.": "Құрылғы кейбір себептермен қосылмаған.",
66-
"Device is present but offline.": "Құрылғы қосылғанымен, онлайн емес.",
65+
"Device is not present anymore for some reason": "Құрылғы кейбір себептермен қосылмаған",
66+
"Device is present but offline": "Құрылғы қосылғанымен, онлайн емес",
6767
"Device Photo": "Құрылғының суреті",
6868
"Device Settings": "Құрылғының орнатпалары",
6969
"Device was disconnected": "Құрылғы қосылмаған",
70-
"Device was kicked by automatic timeout.": "Құрылғы автоматты таймаутаумен шығарылды.",
70+
"Device was kicked by automatic timeout": "Құрылғы автоматты таймаутаумен шығарылды",
7171
"Devices": "Құрылғылар",
7272
"Disable WiFi": "WiFi сөндіру",
7373
"Discharging": "Разрядталады",
@@ -228,7 +228,7 @@
228228
"Silent Mode": "Тиін режимі",
229229
"Size": "Өлшем",
230230
"Socket connection was lost": "Сокеттік қосылу жоғалтылды",
231-
"Someone stole your device.": "Кім-то сіздің құрылғыңызды утады.",
231+
"Someone stole your device": "Кім-то сіздің құрылғыңызды утады",
232232
"Device Buttons": "Құрылғы кнопкалары",
233233
"Special Keys": "Арнайы түймелер",
234234
"Start/Stop Logging": "Журналдауды бастау/тоқтату",
@@ -299,7 +299,7 @@
299299
"X DPI": "X DPI",
300300
"Y DPI": "Y DPI",
301301
"Yes": "Иә",
302-
"You (or someone else) kicked the device.": "Сіз (немесе кім біреу) құрылғыны шығардыңыз",
302+
"You (or someone else) kicked the device": "Сіз (немесе кім біреу) құрылғыны шығардыңыз",
303303
"DeviceHub Support": "Құрылғы фермасын қолдау",
304304
"Logout": "Шығу",
305305
"Log In": "Кіру",
@@ -335,5 +335,6 @@
335335
"Show Manifest": "Манифест көрсету",
336336
"Hide Manifest": "Манифестті жасыру",
337337
"Stop Automation": "Автоматтандыруды тоқтату",
338-
"Unhealthy": "Дені сау емес"
338+
"Unhealthy": "Дені сау емес",
339+
"Service is currently unavailable": "Қызмет қазір қолжетімсіз! \nӘрекетті кейінірек көріңіз"
339340
}

ui/public/locales/ko/translation.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@
6868
"Details": "세부 정보",
6969
"Developer": "개발자 옵션",
7070
"Device": "단말기",
71-
"Device is not present anymore for some reason.": "더이상 단말기가 존재하지 않습니다.",
72-
"Device is present but offline.": "장치가 연결되어 있지만 오프라인 상태입니다.",
71+
"Device is not present anymore for some reason": "더이상 단말기가 존재하지 않습니다",
72+
"Device is present but offline": "장치가 연결되어 있지만 오프라인 상태입니다",
7373
"Device Photo": "단말기 사진",
7474
"Device Settings": "단말기 설정",
7575
"Device was disconnected": "연결이 끊어졌습니다",
76-
"Device was kicked by automatic timeout.": "시간초과로 인해 단말기 사용이 종료되었습니다.",
76+
"Device was kicked by automatic timeout": "시간초과로 인해 단말기 사용이 종료되었습니다",
7777
"Devices": "단말기 리스트",
7878
"Disable WiFi": "WiFi 비활성화",
7979
"Discharging": "충전중이 아님",
@@ -336,7 +336,7 @@
336336
"X DPI": "X DPI",
337337
"Y DPI": "Y DPI",
338338
"Yes": "",
339-
"You (or someone else) kicked the device.": "당신(혹은 다른 누군가)이 단말기를 사용 종료 하였습니다.",
339+
"You (or someone else) kicked the device": "당신(혹은 다른 누군가)이 단말기를 사용 종료 하였습니다",
340340
"Empty": "비어 있는",
341341
"Something went wrong": "문제가 발생했습니다.",
342342
"Groups": "여러 떼",
@@ -373,5 +373,7 @@
373373
"Show Manifest": "매니페스트 표시",
374374
"Hide Manifest": "매니페스트 숨기기",
375375
"Stop Automation": "자동화 중지",
376-
"Unhealthy": "위험한"
376+
"Unhealthy": "위험한",
377+
"Someone stole your device": "누군가가 귀하의 기기를 훔쳤습니다.",
378+
"Service is currently unavailable": "현재 서비스를 이용할 수 없습니다! \n나중에 시도해 보세요."
377379
}

ui/public/locales/pl/translation.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@
6969
"Developer": "Developer",
7070
"Device": "Urządzenie",
7171
"Device cannot get kicked from the group": "Urządzenie nie może zostać wyrzucone z grupy",
72-
"Device is not present anymore for some reason.": "Urządzenie z jakiegoś powodu nie jest już dostępne",
73-
"Device is present but offline.": "Urządzenie jest dostępne, lecz jest offline.",
72+
"Device is not present anymore for some reason": "Urządzenie z jakiegoś powodu nie jest już dostępne",
73+
"Device is present but offline": "Urządzenie jest dostępne, lecz jest offline",
7474
"Device Photo": "Zdjęcie urządzenia",
7575
"Device Settings": "Ustawienia urządzenia",
7676
"Device was disconnected": "Urządzenie zostało odłączone",
77-
"Device was kicked by automatic timeout.": "Urządzenie zostało wyrzucone z powodu braku aktywności.",
77+
"Device was kicked by automatic timeout": "Urządzenie zostało wyrzucone z powodu braku aktywności",
7878
"Devices": "Urządzenia",
7979
"Disable WiFi": "Wyłącz WiFi",
8080
"Discharging": "Rozładowywanie",
@@ -252,5 +252,8 @@
252252
"Hide Manifest": "Ukryj manifest",
253253
"Try to reconnect": "Spróbuj połączyć się ponownie",
254254
"Stop Automation": "Zatrzymaj automatyzację",
255-
"Unhealthy": "Niezdrowy"
255+
"Unhealthy": "Niezdrowy",
256+
"Someone stole your device": "Ktoś ukradł Twoje urządzenie",
257+
"You (or someone else) kicked the device": "Ty (lub ktoś inny) kopnąłeś urządzenie",
258+
"Service is currently unavailable": "Usługa jest chwilowo niedostępna! \nSpróbuj później"
256259
}

ui/public/locales/pt-BR/translation.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@
7474
"Device Photo": "Foto do Dispositivo",
7575
"Device Settings": "Configurações do Dispositivo",
7676
"Device cannot get kicked from the group": "O dispositivo não pode ser removido do grupo",
77-
"Device is not present anymore for some reason.": "O dispositivo não está mais disponível por algum motivo.",
78-
"Device is present but offline.": "Dispositivo presenta mas está indisponível",
77+
"Device is not present anymore for some reason": "O dispositivo não está mais disponível por algum motivo",
78+
"Device is present but offline": "Dispositivo presenta mas está indisponível",
7979
"Device was disconnected": "Dispositivo desconectado",
80-
"Device was kicked by automatic timeout.": "Dispositivo foi removido por tempo limite automático.",
80+
"Device was kicked by automatic timeout": "Dispositivo foi removido por tempo limite automático",
8181
"Devices": "Dispositivos",
8282
"Disable WiFi": "Desabilitar WiFi",
8383
"Discharging": "Descarregando",
@@ -272,7 +272,7 @@
272272
"Silent Mode": "Modo Silencioso",
273273
"Size": "Tamanho",
274274
"Socket connection was lost": "Conexão Socket foi perdida",
275-
"Someone stole your device.": "Alguém roubou seu dispositivo.",
275+
"Someone stole your device": "Alguém roubou seu dispositivo",
276276
"Special Keys": "Chaves Especiais",
277277
"Start/Stop Logging": "Iniciar/Pausar Entrada",
278278
"Status": "Estado",
@@ -368,7 +368,7 @@
368368
"X DPI": "DPI X",
369369
"Y DPI": "DPI Y",
370370
"Yes": "Sim",
371-
"You (or someone else) kicked the device.": "Você removeu o dispositivo.",
371+
"You (or someone else) kicked the device": "Você removeu o dispositivo",
372372
"translate": "traduzir",
373373
"Empty": "Vazio",
374374
"Something went wrong": "Algo deu errado",
@@ -404,5 +404,6 @@
404404
"Please type or select value": "Digite ou selecione o valor",
405405
"Show Manifest": "Mostrar manifesto",
406406
"Hide Manifest": "Ocultar manifesto",
407-
"Unhealthy": "Insalubre"
407+
"Unhealthy": "Insalubre",
408+
"Service is currently unavailable": "O serviço está indisponível no momento! \nTente sua tentativa mais tarde"
408409
}

ui/public/locales/ru-RU/translation.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@
6262
"Developer": "Разработчик",
6363
"Device": "Устройство",
6464
"Device cannot get kicked from the group": "Устройство не может быть исключено из группы",
65-
"Device is not present anymore for some reason.": "Подключение к устройству отсутствует по неизвестной причине.",
66-
"Device is present but offline.": "Устройство подключено, но не активно.",
65+
"Device is not present anymore for some reason": "Подключение к устройству отсутствует по неизвестной причине",
66+
"Device is present but offline": "Устройство подключено, но не активно",
6767
"Device Photo": "Фото устройства",
6868
"Device Settings": "Настройки устройства",
6969
"Device was disconnected": "Устройство было отключено",
70-
"Device was kicked by automatic timeout.": "Устройство было отключено по таймауту.",
70+
"Device was kicked by automatic timeout": "Устройство было отключено по таймауту",
7171
"Devices": "Устройства",
7272
"Disable WiFi": "Отключить WiFi",
7373
"Discharging": "Разряжается",
@@ -228,7 +228,7 @@
228228
"Silent Mode": "Тихий режим",
229229
"Size": "Размер",
230230
"Socket connection was lost": "Подключение потеряно",
231-
"Someone stole your device.": "Кто-то утащил ваше устройство",
231+
"Someone stole your device": "Кто-то утащил ваше устройство",
232232
"Device Buttons": "Кнопки устройства",
233233
"Special Keys": "Специальные кнопки",
234234
"Start/Stop Logging": "Начать/Остановить логирование",
@@ -299,7 +299,7 @@
299299
"X DPI": "X DPI",
300300
"Y DPI": "Y DPI",
301301
"Yes": "Да",
302-
"You (or someone else) kicked the device.": "Вы (или кто-то еще) отключили устройство",
302+
"You (or someone else) kicked the device": "Вы (или кто-то еще) отключили устройство",
303303
"DeviceHub Support": "Поддержка фермы",
304304
"Logout": "Выйти из аккаунта",
305305
"Log In": "Войти",
@@ -335,5 +335,6 @@
335335
"Show Manifest": "Показать манифест",
336336
"Hide Manifest": "Скрыть манифест",
337337
"Stop Automation": "Остановить автоматизацию",
338-
"Unhealthy": "Нездоровый"
338+
"Unhealthy": "Нездоровый",
339+
"Service is currently unavailable": "В данный момент сервис недоступен! \nПопробуйте позже"
339340
}

0 commit comments

Comments
 (0)