Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -1,9 +1,22 @@
|
||||
import React, { FormEventHandler, ReactNode, useCallback, useEffect, useState } from 'react';
|
||||
import { Box, Text, IconButton, Chip, Input, Button, color, Spinner, toRem, Overlay, OverlayBackdrop, OverlayCenter } from 'folds';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import {
|
||||
Box,
|
||||
Text,
|
||||
IconButton,
|
||||
Chip,
|
||||
Input,
|
||||
Button,
|
||||
color,
|
||||
Spinner,
|
||||
toRem,
|
||||
Overlay,
|
||||
OverlayBackdrop,
|
||||
OverlayCenter,
|
||||
} from 'folds';
|
||||
import { CryptoApi } from 'matrix-js-sdk/lib/crypto-api';
|
||||
import FocusTrap from 'focus-trap-react';
|
||||
import { IMyDevice, MatrixError } from 'matrix-js-sdk';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { SettingTile } from '../../../components/setting-tile';
|
||||
import { useMatrixClient } from '../../../hooks/useMatrixClient';
|
||||
import { timeDayMonYear, timeHourMinute, today, yesterday } from '../../../utils/time';
|
||||
@@ -72,7 +85,7 @@ export function DeviceKeyDetails({ crypto }: DeviceKeyDetailsProps) {
|
||||
useCallback(() => {
|
||||
const keys = crypto.getOwnDeviceKeys();
|
||||
return keys;
|
||||
}, [crypto])
|
||||
}, [crypto]),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -104,8 +117,8 @@ function DeviceRename({ device, onCancel, onRename, refreshDeviceList }: DeviceR
|
||||
await mx.setDeviceDetails(device.device_id, { display_name: name });
|
||||
await refreshDeviceList();
|
||||
},
|
||||
[mx, device.device_id, refreshDeviceList]
|
||||
)
|
||||
[mx, device.device_id, refreshDeviceList],
|
||||
),
|
||||
);
|
||||
|
||||
const renaming = renameState.status === AsyncStatus.Loading;
|
||||
|
||||
@@ -50,19 +50,19 @@ export function Devices({ requestClose }: DevicesProps) {
|
||||
const verificationStatus = useDeviceVerificationStatus(
|
||||
crypto,
|
||||
mx.getSafeUserId(),
|
||||
currentDevice?.device_id
|
||||
currentDevice?.device_id,
|
||||
);
|
||||
|
||||
const otherDevicesId = useDeviceIds(otherDevices);
|
||||
const unverifiedDeviceCount = useUnverifiedDeviceCount(
|
||||
crypto,
|
||||
mx.getSafeUserId(),
|
||||
otherDevicesId
|
||||
otherDevicesId,
|
||||
);
|
||||
|
||||
const defaultSecretStorageKeyId = useSecretStorageDefaultKeyId();
|
||||
const defaultSecretStorageKeyContent = useSecretStorageKeyContent(
|
||||
defaultSecretStorageKeyId ?? ''
|
||||
defaultSecretStorageKeyId ?? '',
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { FormEventHandler, useCallback, useEffect, useState } from 'react';
|
||||
import { Box, Button, color, Spinner, Text, toRem } from 'folds';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import FileSaver from 'file-saver';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { SequenceCard } from '../../../components/sequence-card';
|
||||
import { SettingTile } from '../../../components/setting-tile';
|
||||
import { SequenceCardStyle } from '../styles.css';
|
||||
@@ -31,8 +31,8 @@ function ExportKeys() {
|
||||
});
|
||||
FileSaver.saveAs(blob, 'paarrot-keys.txt');
|
||||
},
|
||||
[mx]
|
||||
)
|
||||
[mx],
|
||||
),
|
||||
);
|
||||
|
||||
const exporting = exportState.status === AsyncStatus.Loading;
|
||||
@@ -175,8 +175,8 @@ function ImportKeys({ file, onDone }: ImportKeysProps) {
|
||||
|
||||
await crypto.importRoomKeysAsJson(keys);
|
||||
},
|
||||
[file, mx]
|
||||
)
|
||||
[file, mx],
|
||||
),
|
||||
);
|
||||
|
||||
const decrypting = decryptState.status === AsyncStatus.Loading;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { openExternalUrl } from '../../../utils/tauri';
|
||||
import { Box, Button, config, Menu, Spinner, Text } from 'folds';
|
||||
import { AuthDict, IMyDevice, MatrixError } from 'matrix-js-sdk';
|
||||
import { openExternalUrl } from '../../../utils/tauri';
|
||||
import { SequenceCard } from '../../../components/sequence-card';
|
||||
import { SequenceCardStyle } from '../styles.css';
|
||||
import { ActionUIA, ActionUIAFlowsLoader } from '../../../components/ActionUIA';
|
||||
@@ -37,7 +37,7 @@ export function OtherDevices({ devices, refreshDeviceList, showVerification }: O
|
||||
openExternalUrl(
|
||||
withSearchParam(authUrl, {
|
||||
action: accountManagementActions.sessionsList,
|
||||
})
|
||||
}),
|
||||
);
|
||||
}, [authMetadata, accountManagementActions]);
|
||||
|
||||
@@ -50,10 +50,10 @@ export function OtherDevices({ devices, refreshDeviceList, showVerification }: O
|
||||
withSearchParam(authUrl, {
|
||||
action: accountManagementActions.sessionEnd,
|
||||
device_id: deviceId,
|
||||
})
|
||||
}),
|
||||
);
|
||||
},
|
||||
[authMetadata, accountManagementActions]
|
||||
[authMetadata, accountManagementActions],
|
||||
);
|
||||
|
||||
const handleToggleDelete = useCallback((deviceId: string) => {
|
||||
@@ -77,7 +77,7 @@ export function OtherDevices({ devices, refreshDeviceList, showVerification }: O
|
||||
async (authDict?: AuthDict) => {
|
||||
await mx.deleteMultipleDevices(Array.from(deleted), authDict);
|
||||
},
|
||||
[mx, deleted]
|
||||
[mx, deleted],
|
||||
),
|
||||
useCallback(
|
||||
(state: typeof deleteState) => {
|
||||
@@ -87,11 +87,11 @@ export function OtherDevices({ devices, refreshDeviceList, showVerification }: O
|
||||
}
|
||||
setDeleteState(state);
|
||||
},
|
||||
[refreshDeviceList]
|
||||
)
|
||||
[refreshDeviceList],
|
||||
),
|
||||
);
|
||||
const [authData, deleteError] = useUIAMatrixError(
|
||||
deleteState.status === AsyncStatus.Error ? deleteState.error : undefined
|
||||
deleteState.status === AsyncStatus.Error ? deleteState.error : undefined,
|
||||
);
|
||||
const deleting = deleteState.status === AsyncStatus.Loading || authData !== undefined;
|
||||
|
||||
|
||||
@@ -1,8 +1,24 @@
|
||||
import React, { MouseEventHandler, useCallback, useState } from 'react';
|
||||
import { Badge, Box, Button, Chip, config, Spinner, Text, Overlay, OverlayBackdrop, OverlayCenter, IconButton, RectCords, PopOut, Menu, MenuItem } from 'folds';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import {
|
||||
Badge,
|
||||
Box,
|
||||
Button,
|
||||
Chip,
|
||||
config,
|
||||
Spinner,
|
||||
Text,
|
||||
Overlay,
|
||||
OverlayBackdrop,
|
||||
OverlayCenter,
|
||||
IconButton,
|
||||
RectCords,
|
||||
PopOut,
|
||||
Menu,
|
||||
MenuItem,
|
||||
} from 'folds';
|
||||
import FocusTrap from 'focus-trap-react';
|
||||
import { CryptoApi, VerificationRequest } from 'matrix-js-sdk/lib/crypto-api';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { VerificationStatus } from '../../../hooks/useDeviceVerificationStatus';
|
||||
import { InfoCard } from '../../../components/info-card';
|
||||
import { ManualVerificationTile } from '../../../components/ManualVerification';
|
||||
@@ -161,7 +177,7 @@ export function VerifyOtherDeviceTile({ crypto, deviceId }: VerifyOtherDeviceTil
|
||||
const requestPromise = crypto.requestDeviceVerification(mx.getSafeUserId(), deviceId);
|
||||
return requestPromise;
|
||||
}, [mx, crypto, deviceId]),
|
||||
setRequestState
|
||||
setRequestState,
|
||||
);
|
||||
|
||||
const handleExit = useCallback(() => {
|
||||
@@ -260,7 +276,7 @@ export function DeviceVerificationOptions() {
|
||||
openExternalUrl(
|
||||
withSearchParam(authUrl, {
|
||||
action: accountManagementActions.crossSigningReset,
|
||||
})
|
||||
}),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user