-
-
Unverified sessions
- {!isMeVerified && isCSEnabled && (
-
-
-
- )}
- {isMeVerified && unverified.length > 0 && (
-
-
-
- )}
- {!isCSEnabled && (
-
-
-
- )}
- {
- unverified.length > 0
- ? unverified.map((device) => renderDevice(device, false))
- :
No unverified sessions
- }
-
- {noEncryption.length > 0 && (
-
- Sessions without encryption support
- {noEncryption.map((device) => renderDevice(device, null))}
-
- )}
-
- Verified sessions
- {
- verified.length > 0
- ? verified.map((device, index) => {
- if (truncated && index >= TRUNCATED_COUNT) return null;
- return renderDevice(device, true);
- })
- : No verified sessions
- }
- { verified.length > TRUNCATED_COUNT && (
-
- )}
- { deviceList.length > 0 && (
- Session names are visible to everyone, so do not put any private info here.
- )}
-
-
- );
-}
-
-export default DeviceManage;
diff --git a/src/app/organisms/settings/DeviceManage.scss b/src/app/organisms/settings/DeviceManage.scss
deleted file mode 100644
index 5116cda..0000000
--- a/src/app/organisms/settings/DeviceManage.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-@use '../../partials/flex';
-
-.device-manage {
- &__loading {
- @extend .cp-fx__row--c-c;
- padding: var(--sp-extra-loose) var(--sp-normal);
-
- .text {
- margin: 0 var(--sp-normal);
- }
- }
- &__info {
- margin: var(--sp-normal);
- }
- & .setting-tile:last-of-type {
- border-bottom: none;
- }
- & .setting-tile__options {
- display: flex;
- align-items: center;
- gap: var(--sp-ultra-tight);
- & .btn-positive {
- padding: 6px var(--sp-tight);
- min-width: 0;
- }
- }
-
- &__current-label {
- margin: 0 var(--sp-extra-tight);
- padding: 2px var(--sp-ultra-tight);
- color: var(--bg-surface);
- background-color: var(--tc-surface-low);
- border-radius: 4px;
- }
-
- &__rename {
- padding: var(--sp-normal);
- & > *:not(:last-child) {
- margin-bottom: var(--sp-normal);
- }
- &-btn {
- display: flex;
- gap: var(--sp-normal);
- }
- }
-}
\ No newline at end of file
diff --git a/src/app/organisms/settings/KeyBackup.jsx b/src/app/organisms/settings/KeyBackup.jsx
deleted file mode 100644
index 47be511..0000000
--- a/src/app/organisms/settings/KeyBackup.jsx
+++ /dev/null
@@ -1,303 +0,0 @@
-/* eslint-disable react/prop-types */
-import React, { useState, useEffect } from 'react';
-import PropTypes from 'prop-types';
-import './KeyBackup.scss';
-
-import { openReusableDialog } from '../../../client/action/navigation';
-import { deletePrivateKey } from '../../../client/state/secretStorageKeys';
-
-import Text from '../../atoms/text/Text';
-import Button from '../../atoms/button/Button';
-import IconButton from '../../atoms/button/IconButton';
-import Spinner from '../../atoms/spinner/Spinner';
-import InfoCard from '../../atoms/card/InfoCard';
-import SettingTile from '../../molecules/setting-tile/SettingTile';
-
-import { accessSecretStorage } from './SecretStorageAccess';
-
-import InfoIC from '../../../../public/res/ic/outlined/info.svg';
-import BinIC from '../../../../public/res/ic/outlined/bin.svg';
-import DownloadIC from '../../../../public/res/ic/outlined/download.svg';
-
-import { useStore } from '../../hooks/useStore';
-import { useCrossSigningStatus } from '../../hooks/useCrossSigningStatus';
-import { useMatrixClient } from '../../hooks/useMatrixClient';
-
-function CreateKeyBackupDialog({ keyData }) {
- const [done, setDone] = useState(false);
- const mx = useMatrixClient();
- const mountStore = useStore();
-
- const doBackup = async () => {
- setDone(false);
- let info;
-
- try {
- info = await mx.prepareKeyBackupVersion(null, { secureSecretStorage: true });
- info = await mx.createKeyBackupVersion(info);
- await mx.scheduleAllGroupSessionsForBackup();
- if (!mountStore.getItem()) return;
- setDone(true);
- } catch (e) {
- deletePrivateKey(keyData.keyId);
- await mx.deleteKeyBackupVersion(info.version);
- if (!mountStore.getItem()) return;
- setDone(null);
- }
- };
-
- useEffect(() => {
- mountStore.setItem(true);
- doBackup();
- }, []);
-
- return (
-
- {(status === false || status.message) && (
-
-
- {status.message ?? 'Restoring backup keys...'}
-
- )}
- {status.done && (
- <>
-
✅
-
{status.done}
- >
- )}
- {status.error && (
- <>
-
{status.error}
-
- >
- )}
-
- );
-}
-RestoreKeyBackupDialog.propTypes = {
- keyData: PropTypes.shape({}).isRequired,
-};
-
-function DeleteKeyBackupDialog({ requestClose }) {
- const [isDeleting, setIsDeleting] = useState(false);
- const mx = useMatrixClient();
- const mountStore = useStore();
-
- const deleteBackup = async () => {
- mountStore.setItem(true);
- setIsDeleting(true);
- try {
- const backupInfo = await mx.getKeyBackupVersion();
- if (backupInfo) await mx.deleteKeyBackupVersion(backupInfo.version);
- if (!mountStore.getItem()) return;
- requestClose(true);
- } catch {
- if (!mountStore.getItem()) return;
- setIsDeleting(false);
- }
- };
-
- return (
-