mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Sign own device after enabling key backup
This commit is contained in:
parent
fea5bc9c48
commit
69141af4c4
@ -151,7 +151,7 @@ export class KeyBackupViewModel extends ViewModel<SegmentType, Options> {
|
|||||||
return !!this._crossSigning;
|
return !!this._crossSigning;
|
||||||
}
|
}
|
||||||
|
|
||||||
async signOwnDevice(): Promise<void> {
|
private async _signOwnDevice(): Promise<void> {
|
||||||
const crossSigning = this._crossSigning;
|
const crossSigning = this._crossSigning;
|
||||||
if (crossSigning) {
|
if (crossSigning) {
|
||||||
await this.logger.run("KeyBackupViewModel.signOwnDevice", async log => {
|
await this.logger.run("KeyBackupViewModel.signOwnDevice", async log => {
|
||||||
@ -208,6 +208,7 @@ export class KeyBackupViewModel extends ViewModel<SegmentType, Options> {
|
|||||||
if (setupDehydratedDevice) {
|
if (setupDehydratedDevice) {
|
||||||
this._dehydratedDeviceId = await this._session.setupDehydratedDevice(key);
|
this._dehydratedDeviceId = await this._session.setupDehydratedDevice(key);
|
||||||
}
|
}
|
||||||
|
await this._signOwnDevice();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
this._error = err;
|
this._error = err;
|
||||||
|
@ -63,14 +63,6 @@ export class KeyBackupSettingsView extends TemplateView<KeyBackupViewModel> {
|
|||||||
}),
|
}),
|
||||||
t.if(vm => vm.canSignOwnDevice, t => {
|
t.if(vm => vm.canSignOwnDevice, t => {
|
||||||
return t.div([
|
return t.div([
|
||||||
t.button(
|
|
||||||
{
|
|
||||||
onClick: disableTargetCallback(async (evt) => {
|
|
||||||
await vm.signOwnDevice();
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
"Sign own device"
|
|
||||||
),
|
|
||||||
t.button(
|
t.button(
|
||||||
{
|
{
|
||||||
onClick: disableTargetCallback(async () => {
|
onClick: disableTargetCallback(async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user