Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Components/PreviewSignature/PreviewSignature.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
}
if (this.signRequestUuid !== '') {
config.headers = {
'LibreSign-sign-request-uuid': this.signRequestUuid,
'libresign-sign-request-uuid': this.signRequestUuid,
}
}
await axios(config)
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Signers/Signers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
},
computed: {
signers() {
return this.filesStore.getFile()?.signers ?? []
return this.filesStore.getFile().signers
},
sortableSigners: {
get() {
Expand Down
6 changes: 5 additions & 1 deletion src/store/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const slugfy = (val) =>
.replace(/-+$/, '')

export const useFilesStore = function(...args) {
const emptyFile = { signers: [] }
const store = defineStore('files', {
state: () => {
return {
Expand Down Expand Up @@ -68,7 +69,7 @@ export const useFilesStore = function(...args) {
if (typeof file === 'object') {
return file
}
return this.files[this.selectedNodeId] ?? {}
return this.files[this.selectedNodeId] || emptyFile
},
async flushSelectedFile() {
const files = await this.getAllFiles({
Expand Down Expand Up @@ -222,6 +223,9 @@ export const useFilesStore = function(...args) {
}
}
this.getFile().signers.push(signer)
const selected = this.selectedNodeId
this.selectFile(-1) // to force reactivity
this.selectFile(selected) // to force reactivity
},
async deleteSigner(signer) {
if (!isNaN(signer.signRequestId)) {
Expand Down
6 changes: 3 additions & 3 deletions src/store/signatureElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const useSignatureElementsStore = function(...args) {
}
if (this.signRequestUuid !== '') {
config.headers = {
'LibreSign-sign-request-uuid': this.signRequestUuid,
'libresign-sign-request-uuid': this.signRequestUuid,
}
}
await axios(config)
Expand Down Expand Up @@ -98,7 +98,7 @@ export const useSignatureElementsStore = function(...args) {
}
if (this.signRequestUuid !== '') {
config.headers = {
'LibreSign-sign-request-uuid': this.signRequestUuid,
'libresign-sign-request-uuid': this.signRequestUuid,
}
}
await axios(config)
Expand Down Expand Up @@ -128,7 +128,7 @@ export const useSignatureElementsStore = function(...args) {
}
if (this.signRequestUuid !== '') {
config.headers = {
'LibreSign-sign-request-uuid': this.signRequestUuid,
'libresign-sign-request-uuid': this.signRequestUuid,
}
}
await axios(config)
Expand Down
Loading