Skip to content

Commit

Permalink
Merge pull request #3723 from LibreSign/backport/3716/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: close button
  • Loading branch information
vitormattos authored Sep 17, 2024
2 parents f399c4e + bedabc9 commit 4880d89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
17 changes: 9 additions & 8 deletions src/Components/RightSidebar/RequestSignatureTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
<VisibleElements />
<NcModal v-if="modalSrc"
size="full"
:can-close="false">
:name="fileName"
:close-button-contained="false"
@close="closeModal()">
<iframe :src="modalSrc" class="iframe" />
</NcModal>
</div>
Expand Down Expand Up @@ -152,27 +154,26 @@ export default {
hasSigners() {
return this.filesStore.hasSigners()
},
fileName() {
return this.filesStore.getFile()?.name ?? ''
},
},
watch: {
signers(signers) {
this.init(signers)
},
},
async mounted() {
window.addEventListener('message', this.closeModal)
subscribe('libresign:edit-signer', this.editSigner)
this.filesStore.disableIdentifySigner()
},
beforeUnmount() {
window.removeEventListener('message', this.closeModal)
unsubscribe('libresign:edit-signer')
},
methods: {
closeModal(message) {
if (message.data.type === 'close-modal') {
this.modalSrc = ''
this.filesStore.flushSelectedFile()
}
closeModal() {
this.modalSrc = ''
this.filesStore.flushSelectedFile()
},
validationFile() {
if (this.useModal) {
Expand Down
15 changes: 0 additions & 15 deletions src/views/SignPDF/_partials/Sign.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@
{{ t('libresign', 'Unable to sign.') }}
</p>
</div>
<NcButton v-if="isModal"
:wide="true"
:disabled="loading"
type="secondary"
@click="closeModal">
{{ t('libresign', 'Cancel') }}
</NcButton>
</div>
<NcDialog v-if="signMethodsStore.modal.clickToSign"
:can-close="!loading"
Expand Down Expand Up @@ -220,11 +213,6 @@ export default {
}
}
},
closeModal() {
window.parent?.postMessage({
type: 'close-modal',
}, '*')
},
toggleManagePassword() {
this.showManagePassword = !this.showManagePassword
},
Expand Down Expand Up @@ -330,9 +318,6 @@ export default {
.button-wrapper {
padding: calc(var(--default-grid-baseline, 4px)*2);
display: flex;
flex-direction: column;
gap: 12px;
}
.sign-elements {
Expand Down

0 comments on commit 4880d89

Please sign in to comment.