Add support for device dehydration v2 (#12316)
* rehydrate/dehydrate device if configured in well-known * add handling for dehydrated devices * some fixes * schedule dehydration * improve display of own dehydrated device * created dehydrated device when creating or resetting SSSS * some UI tweaks * reorder strings * lint * remove statement for testing * add playwright test * lint and fix broken test * update to new dehydration API * some fixes from review * try to fix test error * remove unneeded debug line * apply changes from review * add Jest tests * fix typo Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * don't need Object.assign Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --------- Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
6392759bec
commit
31373399f9
18 changed files with 823 additions and 8 deletions
|
@ -42,6 +42,7 @@ import type { IServerVersions } from "matrix-js-sdk/src/matrix";
|
|||
import SettingsTab from "../SettingsTab";
|
||||
import { SettingsSection } from "../../shared/SettingsSection";
|
||||
import SettingsSubsection, { SettingsSubsectionText } from "../../shared/SettingsSubsection";
|
||||
import { useOwnDevices } from "../../devices/useOwnDevices";
|
||||
|
||||
interface IIgnoredUserProps {
|
||||
userId: string;
|
||||
|
@ -49,6 +50,23 @@ interface IIgnoredUserProps {
|
|||
inProgress: boolean;
|
||||
}
|
||||
|
||||
const DehydratedDeviceStatus: React.FC = () => {
|
||||
const { dehydratedDeviceId } = useOwnDevices();
|
||||
|
||||
if (dehydratedDeviceId) {
|
||||
return (
|
||||
<div className="mx_SettingsSubsection_content">
|
||||
<div className="mx_SettingsFlag_label">{_t("settings|security|dehydrated_device_enabled")}</div>
|
||||
<div className="mx_SettingsSubsection_text">
|
||||
{_t("settings|security|dehydrated_device_description")}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export class IgnoredUser extends React.Component<IIgnoredUserProps> {
|
||||
private onUnignoreClicked = (): void => {
|
||||
this.props.onUnignored(this.props.userId);
|
||||
|
@ -279,6 +297,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
const secureBackup = (
|
||||
<SettingsSubsection heading={_t("common|secure_backup")}>
|
||||
<SecureBackupPanel />
|
||||
<DehydratedDeviceStatus />
|
||||
</SettingsSubsection>
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue