@robotical/webapp-types 3.11.8 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ import { CarouselNavigatorManager } from "../../utils/CarouselNavigatorManager";
14
14
  import { CustomBluetoothItem, UserDeviceInfo } from "../../types/userDeviceInfo";
15
15
  import { UserRoleContextTypes } from "../../store/user-role-context";
16
16
  export default class ApplicationManager {
17
+ selectedLocale: string;
17
18
  AnalyticsFacade: typeof AnalyticsFacade;
18
19
  analyticsSessionId: string | undefined;
19
20
  private _observers;
@@ -31,6 +32,8 @@ export default class ApplicationManager {
31
32
  private _router;
32
33
  setRouter(router: any): void;
33
34
  navigateTo(path: string): void;
35
+ setSelectedLocale(locale: string): void;
36
+ getSelectedLocale(): string;
34
37
  ricSelectedCb: ((raft: RAFT) => void) | null;
35
38
  toaster: typeof Toaster;
36
39
  showBackHomeButton: () => void;
@@ -56,10 +56,13 @@ import draggableModalState from "../../state-observables/modal/DraggableModalSta
56
56
  import SensorsDashboardModal from "../../components/modals/ SensorsDashboardModal";
57
57
  import LEDLightsOrQRVerificationModal from "../../components/modals/LEDLightsOrQRVerificationModal";
58
58
  import { CarouselNavigatorManager } from "../../utils/CarouselNavigatorManager";
59
+ import i18n from "../../i18n";
59
60
  var SHOW_LOGS = true;
60
61
  var TAG = "ApplicationManager";
61
62
  var ApplicationManager = /** @class */ (function () {
62
63
  function ApplicationManager() {
64
+ // locale
65
+ this.selectedLocale = "en";
63
66
  // Analytics
64
67
  this.AnalyticsFacade = AnalyticsFacade;
65
68
  // Observers
@@ -122,6 +125,12 @@ var ApplicationManager = /** @class */ (function () {
122
125
  Logger.error(SHOW_LOGS, TAG, "Router is not set");
123
126
  }
124
127
  };
128
+ ApplicationManager.prototype.setSelectedLocale = function (locale) {
129
+ this.selectedLocale = locale;
130
+ };
131
+ ApplicationManager.prototype.getSelectedLocale = function () {
132
+ return this.selectedLocale;
133
+ };
125
134
  ApplicationManager.prototype.getDeviceInfo = function () {
126
135
  return __awaiter(this, void 0, void 0, function () {
127
136
  var _a;
@@ -392,7 +401,7 @@ var ApplicationManager = /** @class */ (function () {
392
401
  switch (_a.label) {
393
402
  case 0:
394
403
  if (!shouldShowQrModal) return [3 /*break*/, 2];
395
- return [4 /*yield*/, modalState.setModal(createElement(LEDLightsOrQRVerificationModal), "Verification Method")];
404
+ return [4 /*yield*/, modalState.setModal(createElement(LEDLightsOrQRVerificationModal), i18n.t("connection.verification_method"))];
396
405
  case 1:
397
406
  specificUUIDs = _a.sent();
398
407
  return [3 /*break*/, 3];
@@ -419,7 +428,7 @@ var ApplicationManager = /** @class */ (function () {
419
428
  case 4:
420
429
  _a.trys.push([4, 9, , 10]);
421
430
  if (!isQRVerification) return [3 /*break*/, 6];
422
- secondaryModalState.setModal(createElement(ConnectingLoadingSpinnerModal, {}), "Connecting...", false);
431
+ secondaryModalState.setModal(createElement(ConnectingLoadingSpinnerModal, {}), i18n.t("connection.connecting_msg"), false);
423
432
  this.ricSelectedCb = null;
424
433
  return [4 /*yield*/, window.applicationManager.startDiscoveryWithoutVerification(uuids, afterRaftConnectedCb)];
425
434
  case 5:
@@ -439,7 +448,7 @@ var ApplicationManager = /** @class */ (function () {
439
448
  return [3 /*break*/, 10];
440
449
  case 10: return [3 /*break*/, 16];
441
450
  case 11:
442
- secondaryModalState.setModal(createElement(ConnectingLoadingSpinnerModal, {}), "Connecting...", false);
451
+ secondaryModalState.setModal(createElement(ConnectingLoadingSpinnerModal, {}), i18n.t("connection.connecting_msg"), false);
443
452
  _a.label = 12;
444
453
  case 12:
445
454
  _a.trys.push([12, 14, , 15]);
@@ -581,7 +590,7 @@ var ApplicationManager = /** @class */ (function () {
581
590
  case 2:
582
591
  _c.sent();
583
592
  if (!!withoutVerification) return [3 /*break*/, 3];
584
- modalState.setModal(createElement(VerificationModal, { connectedRAFT_: raft }), "Looking for ".concat(raft.type));
593
+ modalState.setModal(createElement(VerificationModal, { connectedRAFT_: raft }), i18n.t("connection.looking_for_raft", { raftType: raft.type }), false);
585
594
  return [3 /*break*/, 5];
586
595
  case 3:
587
596
  oldColours = raft._ledLcdColours;
@@ -10,15 +10,17 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { useTranslation } from "react-i18next";
13
14
  import { useEffect } from "react";
14
15
  import { secondaryModalState } from "../../../state-observables/modal/ModalState";
15
16
  import styles from "./styles.module.css";
16
17
  export default function ConnectingLoadingSpinnerModal(_a) {
18
+ var t = useTranslation().t;
17
19
  useEffect(function () {
18
20
  // close modal after 3 minutes assuming no connection will take that long
19
21
  setTimeout(function () {
20
22
  secondaryModalState.closeModal();
21
23
  }, 180000);
22
24
  }, []);
23
- return (_jsx("div", __assign({ className: styles.container }, { children: "This shouldn't take long!" })));
25
+ return (_jsx("div", __assign({ className: styles.container }, { children: t("connection.connecting_loading") })));
24
26
  }
@@ -11,11 +11,13 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
13
  import { useState } from "react";
14
+ import { useTranslation } from "react-i18next";
14
15
  import modalState from "../../../state-observables/modal/ModalState";
15
16
  import styles from "./styles.module.css";
16
17
  import SimpleButton from "../../disposables/buttons/SimpleButton";
17
18
  export default function DetailedFeedbackModal(_a) {
18
19
  var otherInfoObject = _a.otherInfoObject;
20
+ var t = useTranslation().t;
19
21
  var _b = useState(""), report = _b[0], setReport = _b[1];
20
22
  var _c = useState(""), email = _c[0], setEmail = _c[1];
21
23
  var _d = useState(false), reportSent = _d[0], setReportSent = _d[1];
@@ -23,15 +25,15 @@ export default function DetailedFeedbackModal(_a) {
23
25
  if (!report)
24
26
  return;
25
27
  if (!email) {
26
- var confirm_1 = window.confirm("We noticed you didn't leave your email. Without it we won't be able to reach out and help you. If you want to leave your email, press cancel and fill in the email field, otherwise press OK to send the report without your email.");
28
+ var confirm_1 = window.confirm(t("detailed_feedback_modal.no_email_confirm") || "");
27
29
  if (!confirm_1)
28
30
  return;
29
31
  }
30
- var reportWithContact = { text: "".concat(email ? email : "Anonymous", ": ").concat(report) };
32
+ var reportWithContact = { text: "".concat(email ? email : t('detailed_feedback_modal.anonymous', 'Anonymous'), ": ").concat(report) };
31
33
  // window.applicationManager.analyticsManager.logEvent("textfeedback", { ...reportWithContact, ...otherInfoObject });
32
34
  setReportSent(true);
33
35
  modalState.updateModalProps({ modalTitle: "🚀" });
34
36
  setTimeout(function () { return modalState.closeModal(); }, 1500);
35
37
  };
36
- return (_jsx("div", __assign({ className: styles.bugReportModalContainer }, { children: reportSent ? ("Thank you for your feedback!") : (_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: styles.bugReportModalInfo }, { children: ["Please help up improve Marty! Please let us know if you spot any irregularities/bugs. ", _jsx("strong", __assign({ className: styles.bugReportModalInfoStrong }, { children: "You can optionally leave your contact details so we can reach out and help you" })), ". Thank you!"] })), _jsxs("div", __assign({ className: styles.bugReportModalForm }, { children: [_jsx("textarea", { className: styles.bugReportModalTextInput, placeholder: "Your report...", onChange: function (e) { return setReport(e.target.value); }, value: report }), _jsx("label", __assign({ className: styles.bugReportModalEmailLabel }, { children: "Provide your email if you want us to get back to you with a solution!" })), _jsx("input", { type: "email", className: styles.bugReportModalEmailInput, placeholder: "Email (optional)", onChange: function (e) { return setEmail(e.target.value); }, value: email })] })), _jsxs("div", __assign({ className: styles.bugReportModalButtons }, { children: [_jsx(SimpleButton, { onClick: function () { return modalState.closeModal(); }, title: "Cancel" }), _jsx(SimpleButton, { onClick: onReport, title: "Report" })] }))] })) })));
38
+ return (_jsx("div", __assign({ className: styles.bugReportModalContainer }, { children: reportSent ? (t("detailed_feedback_modal.thank_you", "Thank you for your feedback!")) : (_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: styles.bugReportModalInfo }, { children: [t("detailed_feedback_modal.info", "Please help us improve! Please let us know if you spot any irregularities/bugs. "), _jsx("strong", __assign({ className: styles.bugReportModalInfoStrong }, { children: t("detailed_feedback_modal.info_strong", "You can optionally leave your contact details so we can reach out and help you") })), ". ", t("detailed_feedback_modal.thank_you", "Thank you!")] })), _jsxs("div", __assign({ className: styles.bugReportModalForm }, { children: [_jsx("textarea", { className: styles.bugReportModalTextInput, placeholder: t("detailed_feedback_modal.report_placeholder", "Your report...") || "Your report...", onChange: function (e) { return setReport(e.target.value); }, value: report }), _jsx("label", __assign({ className: styles.bugReportModalEmailLabel }, { children: t("detailed_feedback_modal.email_label", "Provide your email if you want us to get back to you with a solution!") })), _jsx("input", { type: "email", className: styles.bugReportModalEmailInput, placeholder: t("detailed_feedback_modal.email_placeholder", "Email (optional)") || "Email (optional)", onChange: function (e) { return setEmail(e.target.value); }, value: email })] })), _jsxs("div", __assign({ className: styles.bugReportModalButtons }, { children: [_jsx(SimpleButton, { onClick: function () { return modalState.closeModal(); }, title: t("detailed_feedback_modal.cancel", "Cancel") }), _jsx(SimpleButton, { onClick: onReport, title: t("detailed_feedback_modal.report", "Report") })] }))] })) })));
37
39
  }
@@ -54,22 +54,10 @@ import { MdQrCode } from "react-icons/md";
54
54
  //@ts-ignore
55
55
  import { Scanner, centerText } from '@yudiel/react-qr-scanner';
56
56
  import { ConnManager } from "@robotical/roboticaljs";
57
- var options = [
58
- {
59
- id: "qr",
60
- title: "QR Code Verification",
61
- subtitle: "Scan a QR code to verify.",
62
- icon: _jsx(MdQrCode, { size: 32 }),
63
- },
64
- {
65
- id: "led",
66
- title: "LED Lights Verification",
67
- subtitle: "Check LED signals for verification.",
68
- icon: _jsx(HiOutlineLightBulb, { size: 32 }),
69
- },
70
- ];
57
+ import { useTranslation } from "react-i18next";
71
58
  export default function LEDLightsOrQRVerificationModal() {
72
59
  var _this = this;
60
+ var t = useTranslation().t;
73
61
  var _a = useState(true), qrSelected = _a[0], setQRSelected = _a[1];
74
62
  var _b = useState(undefined), serialNoFromQR = _b[0], setSerialNoFromQR = _b[1];
75
63
  var _c = useState(false), isButtonToConnectVisible = _c[0], setIsButtonToConnectVisible = _c[1];
@@ -85,6 +73,20 @@ export default function LEDLightsOrQRVerificationModal() {
85
73
  setQRSelected(false);
86
74
  }
87
75
  }, [serialNoFromQR]);
76
+ var options = [
77
+ {
78
+ id: "qr",
79
+ title: t('connection.qr_title'),
80
+ subtitle: t('connection.qr_subtitle'),
81
+ icon: _jsx(MdQrCode, { size: 32 }),
82
+ },
83
+ {
84
+ id: "led",
85
+ title: t('connection.led_title'),
86
+ subtitle: t('connection.led_subtitle'),
87
+ icon: _jsx(HiOutlineLightBulb, { size: 32 }),
88
+ },
89
+ ];
88
90
  var handleSelect = function (id) {
89
91
  if (id === 'qr') {
90
92
  setSerialNoFromQR(undefined);
@@ -112,7 +114,7 @@ export default function LEDLightsOrQRVerificationModal() {
112
114
  var id = _a.id, title = _a.title, subtitle = _a.subtitle, icon = _a.icon;
113
115
  return (_jsxs("div", __assign({ className: qrSelected && id === 'qr' ? [styles.card, styles.qrselected].join(" ") : styles.card, onClick: function () { return handleSelect(id); } }, { children: [_jsx("div", __assign({ className: styles.icon }, { children: icon })), _jsx("h3", __assign({ className: styles.title }, { children: title })), _jsx("p", __assign({ className: styles.subtitle }, { children: subtitle }))] }), id));
114
116
  }) })) :
115
- _jsx("div", __assign({ className: styles.cogNote }, { children: _jsxs("strong", { children: ["Don't forget to ", _jsx("span", __assign({ className: styles.cogNoteHighlight }, { children: "turn on" })), " your Cog!"] }) })), qrSelected && _jsx(QRContent, { setSerialNo: setSerialNoFromQR }), _jsxs("div", __assign({ className: styles.buttonsContainer }, { children: [isButtonToConnectVisible && _jsx("button", __assign({ className: styles.connectButton, onClick: handleConnect }, { children: "QR code scan - click to connect" })), _jsx("button", __assign({ className: styles.cancelButton, onClick: function () { return modalState.closeModal(false); } }, { children: "Cancel" }))] }))] })));
117
+ _jsx("div", __assign({ className: styles.cogNote }, { children: _jsxs("strong", { children: ["Don't forget to ", _jsx("span", __assign({ className: styles.cogNoteHighlight }, { children: "turn on" })), " your Cog!"] }) })), qrSelected && _jsx(QRContent, { setSerialNo: setSerialNoFromQR }), _jsxs("div", __assign({ className: styles.buttonsContainer }, { children: [isButtonToConnectVisible && _jsx("button", __assign({ className: styles.connectButton, onClick: handleConnect }, { children: t('connection.qr_connect_button') })), _jsx("button", __assign({ className: styles.cancelButton, onClick: function () { return modalState.closeModal(false); } }, { children: t('connection.cancel') }))] }))] })));
116
118
  }
117
119
  function QRContent(_a) {
118
120
  var _this = this;
@@ -56,6 +56,7 @@ import SimpleButton from "../../disposables/buttons/SimpleButton";
56
56
  import LEDs from "../../oneoffs/LEDs";
57
57
  import { raftConnectingSubscriptionHelper } from "../../../application/RAFTs/raft-subscription-helpers";
58
58
  import { useConnectedRafts } from "../../../store/SelectedRaftContext";
59
+ import { useTranslation } from "react-i18next";
59
60
  var SHOW_LOGS = true;
60
61
  var TAG = "VerificationModal";
61
62
  function VerificationModal(_a) {
@@ -65,6 +66,7 @@ function VerificationModal(_a) {
65
66
  // const [connectedRaft, setConnectedRaft] = useState<RAFT | undefined>(connectedRAFT_);
66
67
  var _c = useState(-200), RSSI = _c[0], setRSSI = _c[1];
67
68
  var removeConnectedRaft = useConnectedRafts().removeConnectedRaft;
69
+ var t = useTranslation().t;
68
70
  useEffect(function () {
69
71
  /* Subscribe to the connectedRaft's SIGNAL strength */
70
72
  if (!connectedRAFT_)
@@ -119,7 +121,7 @@ function VerificationModal(_a) {
119
121
  /* Verify the connectedRaft once it's connected */
120
122
  connectedRAFT_ === null || connectedRAFT_ === void 0 ? void 0 : connectedRAFT_.verifyRaft();
121
123
  }, [connectedRAFT_]);
122
- var contentJSX = _jsxs("div", __assign({ className: "verification-modal-container" }, { children: [_jsxs("div", __assign({ className: "verification-modal-martys-container" }, { children: [_jsxs("div", __assign({ className: "verification-modal-marty-name-row-container" }, { children: [_jsx("p", __assign({ className: "verification-modal-marty-name" }, { children: connectedRAFT_ === null || connectedRAFT_ === void 0 ? void 0 : connectedRAFT_.getFriendlyName() })), _jsx("div", __assign({ className: "verification-modal-marty-signal-container" }, { children: _jsx(RICSignal, { signalStrength: RSSI }) })), _jsx(BluetoothSVG, { fill: MAIN_BLUE })] })), _jsxs("p", __assign({ className: "verification-modal-martys-back-hint" }, { children: ["Look on ", connectedRAFT_ === null || connectedRAFT_ === void 0 ? void 0 : connectedRAFT_.type, "'s back, is it displaying these lights?"] })), _jsxs("div", __assign({ className: "verification-modal-led-row-container" }, { children: [_jsx(LEDs, { coloursArr: randomColours, connectedRaft: connectedRAFT_ }), _jsx(SimpleButton, { onClick: onCancel, title: "No", borderColour: "red", colour: "white", textColour: "red" }), _jsx(SimpleButton, { onClick: onYes, title: "YES" })] }))] })), _jsxs("div", __assign({ className: "verification-modal-bottom-btns-container" }, { children: [_jsx("div", { className: "dummy-gap" }), _jsx(SimpleButton, { onClick: onCancel, title: "CANCEL" })] }))] }));
124
+ var contentJSX = _jsxs("div", __assign({ className: "verification-modal-container" }, { children: [_jsxs("div", __assign({ className: "verification-modal-martys-container" }, { children: [_jsxs("div", __assign({ className: "verification-modal-marty-name-row-container" }, { children: [_jsx("p", __assign({ className: "verification-modal-marty-name" }, { children: connectedRAFT_ === null || connectedRAFT_ === void 0 ? void 0 : connectedRAFT_.getFriendlyName() })), _jsx("div", __assign({ className: "verification-modal-marty-signal-container" }, { children: _jsx(RICSignal, { signalStrength: RSSI }) })), _jsx(BluetoothSVG, { fill: MAIN_BLUE })] })), _jsx("p", __assign({ className: "verification-modal-martys-back-hint" }, { children: t("verification_modal_phone.look_on_back", { raftType: connectedRAFT_ === null || connectedRAFT_ === void 0 ? void 0 : connectedRAFT_.type }) })), _jsxs("div", __assign({ className: "verification-modal-led-row-container" }, { children: [_jsx(LEDs, { coloursArr: randomColours, connectedRaft: connectedRAFT_ }), _jsx(SimpleButton, { onClick: onCancel, title: t("verification_modal_phone.no"), borderColour: "red", colour: "white", textColour: "red" }), _jsx(SimpleButton, { onClick: onYes, title: t("connection.yes") })] }))] })), _jsxs("div", __assign({ className: "verification-modal-bottom-btns-container" }, { children: [_jsx("div", { className: "dummy-gap" }), _jsx(SimpleButton, { onClick: onCancel, title: t("connection.cancel") })] }))] }));
123
125
  return contentJSX;
124
126
  }
125
127
  export default VerificationModal;
@@ -71,11 +71,13 @@ import LoadingSpinner from "../../disposables/LoadingSpinner";
71
71
  import { RaftConnectionMethod } from "../../../types/raft";
72
72
  import { useConnectedRafts } from "../../../store/SelectedRaftContext";
73
73
  import { ConnManager } from "@robotical/roboticaljs";
74
+ import { useTranslation } from "react-i18next";
74
75
  var SHOW_LOGS = true;
75
76
  var TAG = "VerificationModalPhone";
76
77
  function VerificationModalPhoneApp(_a) {
77
78
  var _this = this;
78
79
  var foundRICs = _a.foundRICs;
80
+ var t = useTranslation().t;
79
81
  var _b = useState([]), randomColours = _b[0], setRandomColours = _b[1];
80
82
  var _c = useState(foundRICs), foundRICsState = _c[0], setFoundRICsState = _c[1];
81
83
  var _d = useState(-1), selectedRICIdx = _d[0], setSelectedRICIdx = _d[1];
@@ -213,12 +215,12 @@ function VerificationModalPhoneApp(_a) {
213
215
  }); };
214
216
  var contentJSX = null;
215
217
  if (foundRICsState.length === 0) {
216
- contentJSX = _jsxs("div", __assign({ className: "verification-modal-container" }, { children: [!isScanning && _jsx("p", __assign({ style: { alignSelf: 'center' } }, { children: "No Robots Found" })), _jsx("div", __assign({ className: "verification-modal-martys-container" }, { children: isScanning && _jsxs("div", __assign({ style: { margin: "auto", width: "50px", height: "50px" } }, { children: [" ", _jsx(LoadingSpinner, {}), " "] })) })), _jsxs("div", __assign({ className: "verification-modal-bottom-btns-container" }, { children: [_jsx(SVGImageButton, { onClick: onScanAgain, title: "SCAN AGAIN", SVGImage: RefreshSVG, backgroundColour: MAIN_BLUE, titleColour: WHITE, SVGColour: WHITE }), _jsx("div", { className: "dummy-gap" }), _jsx(SimpleButton, { onClick: onCancel, title: "CANCEL" })] }))] }));
218
+ contentJSX = _jsxs("div", __assign({ className: "verification-modal-container" }, { children: [!isScanning && _jsx("p", __assign({ style: { alignSelf: 'center' } }, { children: t("verification_modal_phone.no_robots_found", "No Robots Found") })), _jsx("div", __assign({ className: "verification-modal-martys-container" }, { children: isScanning && _jsxs("div", __assign({ style: { margin: "auto", width: "50px", height: "50px" } }, { children: [" ", _jsx(LoadingSpinner, {}), " "] })) })), _jsxs("div", __assign({ className: "verification-modal-bottom-btns-container" }, { children: [_jsx(SVGImageButton, { onClick: onScanAgain, title: t("verification_modal_phone.scan_again", "SCAN AGAIN"), SVGImage: RefreshSVG, backgroundColour: MAIN_BLUE, titleColour: WHITE, SVGColour: WHITE }), _jsx("div", { className: "dummy-gap" }), _jsx(SimpleButton, { onClick: onCancel, title: t("verification_modal_phone.cancel", "CANCEL") })] }))] }));
217
219
  }
218
220
  else {
219
221
  contentJSX = _jsxs("div", __assign({ className: "verification-modal-container" }, { children: [_jsxs("div", __assign({ className: "verification-modal-martys-container" }, { children: [isScanning && _jsxs("div", __assign({ style: { margin: "auto", width: "50px", height: "50px" } }, { children: [" ", _jsx(LoadingSpinner, {}), " "] })), foundRICsState.map(function (raftObj, raftIdx) {
220
- return _jsxs(Fragment, { children: [_jsxs("div", __assign({ className: "verification-modal-marty-name-row-container", onClick: function () { return onSelectRaft(raftIdx); } }, { children: [_jsx("p", __assign({ className: "verification-modal-marty-name" }, { children: raftObj._localName })), _jsx("div", __assign({ className: "verification-modal-marty-signal-container" }, { children: _jsx(RICSignal, { signalStrength: raftObj._rssi }) })), _jsx(BluetoothSVG, { fill: MAIN_BLUE })] })), selectedRICIdx === raftIdx && _jsxs("div", { children: [_jsx("p", __assign({ className: "verification-modal-martys-back-hint" }, { children: isLoading ? "Loading..." : "Look on ".concat(connectedRaft === null || connectedRaft === void 0 ? void 0 : connectedRaft.type, "'s back, is it displaying these lights?") })), _jsxs("div", __assign({ className: "verification-modal-led-row-container" }, { children: [_jsx(LEDs, { coloursArr: randomColours, connectedRaft: connectedRaft }), !isLoading && _jsx(SimpleButton, { onClick: onCancel, title: "No", borderColour: "red", colour: "white", textColour: "red" }), !isLoading && _jsx(SimpleButton, { onClick: onYes, title: "YES" })] }))] })] }, raftIdx);
221
- })] })), _jsxs("div", __assign({ className: "verification-modal-bottom-btns-container" }, { children: [_jsx(SVGImageButton, { onClick: onScanAgain, title: "SCAN AGAIN", SVGImage: RefreshSVG, backgroundColour: MAIN_BLUE, titleColour: WHITE, SVGColour: WHITE, disabled: isScanning }), _jsx("div", { className: "dummy-gap" }), _jsx(SimpleButton, { onClick: onCancel, title: "CANCEL" })] }))] }));
222
+ return _jsxs(Fragment, { children: [_jsxs("div", __assign({ className: "verification-modal-marty-name-row-container", onClick: function () { return onSelectRaft(raftIdx); } }, { children: [_jsx("p", __assign({ className: "verification-modal-marty-name" }, { children: raftObj._localName })), _jsx("div", __assign({ className: "verification-modal-marty-signal-container" }, { children: _jsx(RICSignal, { signalStrength: raftObj._rssi }) })), _jsx(BluetoothSVG, { fill: MAIN_BLUE })] })), selectedRICIdx === raftIdx && _jsxs("div", { children: [_jsx("p", __assign({ className: "verification-modal-martys-back-hint" }, { children: isLoading ? t("verification_modal_phone.loading", "Loading...") : t("verification_modal_phone.look_on_back", { raftType: connectedRaft === null || connectedRaft === void 0 ? void 0 : connectedRaft.type }) })), _jsxs("div", __assign({ className: "verification-modal-led-row-container" }, { children: [_jsx(LEDs, { coloursArr: randomColours, connectedRaft: connectedRaft }), !isLoading && _jsx(SimpleButton, { onClick: onCancel, title: t("verification_modal_phone.no", "No"), borderColour: "red", colour: "white", textColour: "red" }), !isLoading && _jsx(SimpleButton, { onClick: onYes, title: t("connection.yes") })] }))] })] }, raftIdx);
223
+ })] })), _jsxs("div", __assign({ className: "verification-modal-bottom-btns-container" }, { children: [_jsx(SVGImageButton, { onClick: onScanAgain, title: t("connection.scan_again"), SVGImage: RefreshSVG, backgroundColour: MAIN_BLUE, titleColour: WHITE, SVGColour: WHITE, disabled: isScanning }), _jsx("div", { className: "dummy-gap" }), _jsx(SimpleButton, { onClick: onCancel, title: t("connection.cancel") })] }))] }));
222
224
  }
223
225
  return contentJSX;
224
226
  }
@@ -0,0 +1,2 @@
1
+ import i18n from 'i18next';
2
+ export default i18n;