File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 <NcDialog v-if =" modal"
5252 :name =" t('libresign', 'Confirm your signature')"
5353 @closing =" handleModal(false)" >
54- <PreviewSignature :src =" imageData" />
54+ <PreviewSignature :src =" imageData ?? '' " />
5555 <template #actions >
5656 <NcButton variant =" primary" @click =" saveSignature" >
5757 {{ t('libresign', 'Save') }}
@@ -80,6 +80,7 @@ import NcDialog from '@nextcloud/vue/components/NcDialog'
8080import NcIconSvgWrapper from ' @nextcloud/vue/components/NcIconSvgWrapper'
8181
8282import PreviewSignature from ' ../PreviewSignature/PreviewSignature.vue'
83+ import type { NextcloudCapabilities } from ' ../../types/capabilities'
8384
8485defineOptions ({
8586 name: ' Editor' ,
@@ -98,9 +99,10 @@ const emit = defineEmits<{
9899 (event : ' save' , value : string | null ): void
99100}>()
100101
101- const capabilities = getCapabilities ()
102- const canvasWidth = capabilities .libresign .config [' sign-elements' ][' signature-width' ]
103- const canvasHeight = capabilities .libresign .config [' sign-elements' ][' signature-height' ]
102+ const capabilities = getCapabilities () as NextcloudCapabilities
103+ const signElementsConfig = capabilities .libresign ?.config [' sign-elements' ]
104+ const canvasWidth = Number (signElementsConfig ?.[' signature-width' ] ?? 0 )
105+ const canvasHeight = Number (signElementsConfig ?.[' signature-height' ] ?? 0 )
104106const color = ref (' #000000' )
105107const customPalette = [
106108 ' #000000' ,
You can’t perform that action at this time.
0 commit comments