Merge remote-tracking branch 'origin/develop' into rav/edited_events

This commit is contained in:
Richard van der Hoff 2022-12-20 11:20:03 +00:00
commit ad7c002f4d
62 changed files with 558 additions and 223 deletions

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { ReactNode, useContext } from "react";
import maplibregl from "maplibre-gl";
import * as maplibregl from "maplibre-gl";
import { Beacon, BeaconEvent } from "matrix-js-sdk/src/matrix";
import { LocationAssetType } from "matrix-js-sdk/src/@types/location";

View file

@ -17,7 +17,7 @@ limitations under the License.
import React, { useState, useEffect } from "react";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { Beacon, Room } from "matrix-js-sdk/src/matrix";
import maplibregl from "maplibre-gl";
import * as maplibregl from "maplibre-gl";
import { Icon as LiveLocationIcon } from "../../../../res/img/location/live-location.svg";
import { useLiveBeacons } from "../../../utils/beacon/useLiveBeacons";

View file

@ -137,7 +137,7 @@ class LocationPicker extends React.Component<ILocationPickerProps, IState> {
private addMarkerToMap = () => {
this.marker = new maplibregl.Marker({
element: document.getElementById(this.getMarkerId()),
element: document.getElementById(this.getMarkerId()) ?? undefined,
anchor: "bottom",
offset: [0, -1],
})

View file

@ -16,7 +16,7 @@ limitations under the License.
import React, { ReactNode, useContext, useEffect } from "react";
import classNames from "classnames";
import maplibregl from "maplibre-gl";
import * as maplibregl from "maplibre-gl";
import { ClientEvent, IClientWellKnown } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { ReactNode, useCallback, useEffect, useState } from "react";
import maplibregl from "maplibre-gl";
import * as maplibregl from "maplibre-gl";
import { RoomMember } from "matrix-js-sdk/src/matrix";
import { createMarker, parseGeoUri } from "../../../utils/location";

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import React from "react";
import maplibregl from "maplibre-gl";
import * as maplibregl from "maplibre-gl";
import { _t } from "../../../languageHandler";
import AccessibleButton from "../elements/AccessibleButton";

View file

@ -115,7 +115,7 @@ const CurrentDeviceSection: React.FC<Props> = ({
onClick={() => setIsExpanded(!isExpanded)}
/>
</DeviceTile>
{isExpanded && (
{isExpanded ? (
<DeviceDetails
device={device}
localNotificationSettings={localNotificationSettings}
@ -125,9 +125,12 @@ const CurrentDeviceSection: React.FC<Props> = ({
onSignOutDevice={onSignOutCurrentDevice}
saveDeviceName={saveDeviceName}
/>
) : (
<>
<br />
<DeviceVerificationStatusCard device={device} onVerifyDevice={onVerifyCurrentDevice} />
</>
)}
<br />
<DeviceVerificationStatusCard device={device} onVerifyDevice={onVerifyCurrentDevice} />
</>
)}
</SettingsSubsection>

View file

@ -134,7 +134,7 @@ export const DeviceDetailHeading: React.FC<Props> = ({ device, saveDeviceName })
<DeviceNameEditor device={device} saveDeviceName={saveDeviceName} stopEditing={() => setIsEditing(false)} />
) : (
<div className="mx_DeviceDetailHeading" data-testid="device-detail-heading">
<Heading size="h3">{device.display_name || device.device_id}</Heading>
<Heading size="h4">{device.display_name || device.device_id}</Heading>
<AccessibleButton
kind="link_inline"
onClick={() => setIsEditing(true)}

View file

@ -50,7 +50,7 @@ const FilteredDeviceListHeader: React.FC<Props> = ({
</TooltipTarget>
<span className="mx_FilteredDeviceListHeader_label">
{selectedDeviceCount > 0
? _t("%(selectedDeviceCount)s sessions selected", { selectedDeviceCount })
? _t("%(count)s sessions selected", { count: selectedDeviceCount })
: _t("Sessions")}
</span>
{children}

View file

@ -53,7 +53,7 @@ const SecurityRecommendations: React.FC<Props> = ({ devices, currentDeviceId, go
return (
<SettingsSubsection
heading={_t("Security recommendations")}
description={_t("Improve your account security by following these recommendations")}
description={_t("Improve your account security by following these recommendations.")}
data-testid="security-recommendations-section"
>
{!!unverifiedDevicesCount && (
@ -89,7 +89,7 @@ const SecurityRecommendations: React.FC<Props> = ({ devices, currentDeviceId, go
<>
{_t(
`Consider signing out from old sessions ` +
`(%(inactiveAgeDays)s days or older) you don't use anymore`,
`(%(inactiveAgeDays)s days or older) you don't use anymore.`,
{ inactiveAgeDays },
)}
<DeviceSecurityLearnMore variation={DeviceSecurityVariation.Inactive} />