File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 <NcDialog v-if =" modal"
2424 :name =" t('libresign', 'Confirm your signature')"
2525 @closing =" handleModal(false)" >
26- <PreviewSignature :src =" imageData" />
26+ <PreviewSignature :src =" imageData ?? '' " />
2727 <template #actions >
2828 <NcButton variant =" primary" @click =" saveSignature" >
2929 {{ t('libresign', 'Save') }}
@@ -48,6 +48,7 @@ import NcButton from '@nextcloud/vue/components/NcButton'
4848import NcDialog from ' @nextcloud/vue/components/NcDialog'
4949import NcTextField from ' @nextcloud/vue/components/NcTextField'
5050import PreviewSignature from ' ../PreviewSignature/PreviewSignature.vue'
51+ import type { NextcloudCapabilities } from ' ../../types/capabilities'
5152
5253defineOptions ({
5354 name: ' TextInput' ,
@@ -58,9 +59,10 @@ const emit = defineEmits<{
5859 (event : ' close' ): void
5960}>()
6061
61- const capabilities = getCapabilities ()
62- const canvasWidth = capabilities .libresign .config [' sign-elements' ][' signature-width' ]
63- const canvasHeight = capabilities .libresign .config [' sign-elements' ][' signature-height' ]
62+ const capabilities = getCapabilities () as NextcloudCapabilities
63+ const signElementsConfig = capabilities .libresign ?.config [' sign-elements' ]
64+ const canvasWidth = Number (signElementsConfig ?.[' signature-width' ] ?? 0 )
65+ const canvasHeight = Number (signElementsConfig ?.[' signature-height' ] ?? 0 )
6466const value = ref (' ' )
6567const modal = ref (false )
6668const imageData = ref <string | null >(null )
You can’t perform that action at this time.
0 commit comments