VerificationExplorer: remove reference to internal class (#12362)
* VerificationExplorer: remove reference to internal class The legacy `VerificationRequest` is an internal class. * handle null timeout
This commit is contained in:
parent
d36c1b39fd
commit
4a182e89b0
2 changed files with 10 additions and 9 deletions
|
@ -16,8 +16,11 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useContext, useEffect, useState } from "react";
|
import React, { useContext, useEffect, useState } from "react";
|
||||||
import { VerificationRequest } from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
|
import {
|
||||||
import { VerificationPhase as Phase, VerificationRequestEvent } from "matrix-js-sdk/src/crypto-api";
|
VerificationPhase as Phase,
|
||||||
|
VerificationRequest,
|
||||||
|
VerificationRequestEvent,
|
||||||
|
} from "matrix-js-sdk/src/crypto-api";
|
||||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||||
|
|
||||||
import { useTypedEventEmitter, useTypedEventEmitterState } from "../../../../hooks/useEventEmitter";
|
import { useTypedEventEmitter, useTypedEventEmitterState } from "../../../../hooks/useEventEmitter";
|
||||||
|
@ -67,13 +70,11 @@ const VerificationRequestExplorer: React.FC<{
|
||||||
<dt>{_t("devtools|phase")}</dt>
|
<dt>{_t("devtools|phase")}</dt>
|
||||||
<dd>{PHASE_MAP[request.phase] ? _t(PHASE_MAP[request.phase]) : request.phase}</dd>
|
<dd>{PHASE_MAP[request.phase] ? _t(PHASE_MAP[request.phase]) : request.phase}</dd>
|
||||||
<dt>{_t("devtools|timeout")}</dt>
|
<dt>{_t("devtools|timeout")}</dt>
|
||||||
<dd>{Math.floor(timeout / 1000)}</dd>
|
<dd>{timeout === null ? _t("devtools|timeout_none") : Math.floor(timeout / 1000)}</dd>
|
||||||
<dt>{_t("devtools|methods")}</dt>
|
<dt>{_t("devtools|methods")}</dt>
|
||||||
<dd>{request.methods && request.methods.join(", ")}</dd>
|
<dd>{request.methods && request.methods.join(", ")}</dd>
|
||||||
<dt>{_t("devtools|requester")}</dt>
|
<dt>{_t("devtools|other_user")}</dt>
|
||||||
<dd>{request.requestingUserId}</dd>
|
<dd>{request.otherUserId}</dd>
|
||||||
<dt>{_t("devtools|observe_only")}</dt>
|
|
||||||
<dd>{JSON.stringify(request.observeOnly)}</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -742,15 +742,14 @@
|
||||||
"notification_state": "Notification state is <strong>%(notificationState)s</strong>",
|
"notification_state": "Notification state is <strong>%(notificationState)s</strong>",
|
||||||
"notifications_debug": "Notifications debug",
|
"notifications_debug": "Notifications debug",
|
||||||
"number_of_users": "Number of users",
|
"number_of_users": "Number of users",
|
||||||
"observe_only": "Observe only",
|
|
||||||
"original_event_source": "Original event source",
|
"original_event_source": "Original event source",
|
||||||
|
"other_user": "Other user",
|
||||||
"phase": "Phase",
|
"phase": "Phase",
|
||||||
"phase_cancelled": "Cancelled",
|
"phase_cancelled": "Cancelled",
|
||||||
"phase_ready": "Ready",
|
"phase_ready": "Ready",
|
||||||
"phase_requested": "Requested",
|
"phase_requested": "Requested",
|
||||||
"phase_started": "Started",
|
"phase_started": "Started",
|
||||||
"phase_transaction": "Transaction",
|
"phase_transaction": "Transaction",
|
||||||
"requester": "Requester",
|
|
||||||
"room_encrypted": "Room is <strong>encrypted ✅</strong>",
|
"room_encrypted": "Room is <strong>encrypted ✅</strong>",
|
||||||
"room_id": "Room ID: %(roomId)s",
|
"room_id": "Room ID: %(roomId)s",
|
||||||
"room_not_encrypted": "Room is <strong>not encrypted 🚨</strong>",
|
"room_not_encrypted": "Room is <strong>not encrypted 🚨</strong>",
|
||||||
|
@ -789,6 +788,7 @@
|
||||||
"thread_root_id": "Thread Root ID: %(threadRootId)s",
|
"thread_root_id": "Thread Root ID: %(threadRootId)s",
|
||||||
"threads_timeline": "Threads timeline",
|
"threads_timeline": "Threads timeline",
|
||||||
"timeout": "Timeout",
|
"timeout": "Timeout",
|
||||||
|
"timeout_none": "None",
|
||||||
"title": "Developer tools",
|
"title": "Developer tools",
|
||||||
"toggle_event": "toggle event",
|
"toggle_event": "toggle event",
|
||||||
"toolbox": "Toolbox",
|
"toolbox": "Toolbox",
|
||||||
|
|
Loading…
Reference in a new issue