Skip to content

Commit

Permalink
feat: only show name and allow save signer when have signer
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos authored and backportbot-libresign[bot] committed Nov 21, 2024
1 parent 2aca3bb commit 3aeb367
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Components/Request/IdentifySigner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
@update:account="updateAccount"
@update:email="updateEmail"
@update:display-name="updateDisplayName" />
<label for="name-input">{{ t('libresign', 'Signer name') }}</label>
<NcTextField v-model="displayName"
<label v-if="signerSelected" for="name-input">{{ t('libresign', 'Signer name') }}</label>
<NcTextField v-if="signerSelected"
v-model="signerSelected"
aria-describedby="name-input"
autocapitalize="none"
:label="t('libresign', 'Signer name')"
Expand All @@ -25,7 +26,9 @@
<NcButton @click="filesStore.disableIdentifySigner()">
{{ t('libresign', 'Cancel') }}
</NcButton>
<NcButton type="primary" @click="saveSigner">
<NcButton type="primary"
:disabled="!signerSelected"
@click="saveSigner">
{{ saveButtonText }}
</NcButton>
</div>
Expand Down Expand Up @@ -105,6 +108,9 @@ export default {
return {}
}
},
signerSelected() {
return this.methods.account.value || this.methods.email.value
},
isNewSigner() {
return this.id === null || this.id === undefined
},
Expand Down

0 comments on commit 3aeb367

Please sign in to comment.