web/satellite: apply passphrase to newly created access grants

Apply passphrase when creating access grants or S3 credentials.

Change-Id: I59fc391ffdca59e8cd6bdce5632b565e9e9237ea
This commit is contained in:
Vitalii 2022-08-25 15:43:53 +03:00
parent ea0124a183
commit 3019ad3c35
2 changed files with 13 additions and 3 deletions

View File

@ -16,7 +16,8 @@
</form>
<!-- ********* Encrypt Form Modal ********* -->
<form v-if="isEncryptStep">
<EncryptFormModal
<EncryptFormModal
@apply-passphrase="applyPassphrase"
@close-modal="onCloseClick"
@create-access="createAccessGrant"
@backAction="backAction"
@ -136,6 +137,10 @@ export default class CreateAccessModal extends Vue {
this.checkedType = e;
}
public applyPassphrase(passphrase: string) {
this.passphrase = passphrase;
}
/**
* Sets local worker with worker instantiated in store.
* Also sets worker's onmessage and onerror logic.

View File

@ -157,7 +157,7 @@
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import { Component, Vue, Watch } from 'vue-property-decorator';
import { generateMnemonic } from "bip39";
import { Download } from "@/utils/download";
@ -180,7 +180,7 @@ import DownloadIcon from '../../../../static/images/common/download.svg';
},
})
export default class GrantCreatedModal extends Vue {
export default class EncryptFormModal extends Vue {
private encryptSelect = "create";
private isPassphraseCopied = false;
@ -190,6 +190,11 @@ export default class GrantCreatedModal extends Vue {
private acknowledgementCheck = false;
public currentDate = new Date().toISOString();
@Watch('passphrase')
public applyPassphrase(): void {
this.$emit('apply-passphrase', this.passphrase);
}
public createAccessGrant(): void {
this.$emit('create-access');
}