4141 </template >
4242 </Signers >
4343 <div class =" action-buttons" >
44- <NcButton v-if =" showSaveButton"
45- :variant =" filesStore.canSign() ? 'secondary' : 'primary'"
46- :disabled =" hasLoading"
47- @click =" save()" >
48- <template #icon >
49- <NcLoadingIcon v-if =" hasLoading" :size =" 20" />
50- <Pencil v-else-if =" isSignElementsAvailable()" :size =" 20" />
51- </template >
52- {{ isSignElementsAvailable() ? t('libresign', 'Edit visible signatures') : t('libresign', 'Save') }}
53- </NcButton >
54- <NcButton v-if =" showRequestButton"
55- :variant =" filesStore.canSign() ? 'secondary' : 'primary'"
56- :disabled =" hasLoading"
57- @click =" request()" >
58- <template #icon >
59- <NcLoadingIcon v-if =" hasLoading" :size =" 20" />
60- <Send v-else :size =" 20" />
61- </template >
62- {{ t('libresign', 'Send') }}
63- </NcButton >
64- <NcButton v-if =" filesStore.canSign()"
65- variant =" primary"
66- :disabled =" hasLoading"
67- @click =" sign()" >
68- <template #icon >
69- <NcLoadingIcon v-if =" hasLoading" :size =" 20" />
70- <Draw v-else :size =" 20" />
71- </template >
72- {{ t('libresign', 'Sign') }}
73- </NcButton >
74- <NcButton v-if =" filesStore.canValidate()"
75- variant =" primary"
76- @click =" validationFile()" >
77- {{ t('libresign', 'Validate') }}
78- </NcButton >
79- <NcButton @click =" openFile()" >
80- <template #icon >
81- <FileDocument :size =" 20" />
82- </template >
83- {{ t('libresign', 'Open file') }}
84- </NcButton >
44+ <div v-if =" showSaveButton || showRequestButton" class =" button-group" >
45+ <NcButton v-if =" showSaveButton"
46+ wide
47+ variant =" secondary"
48+ :disabled =" hasLoading"
49+ @click =" save()" >
50+ <template #icon >
51+ <NcLoadingIcon v-if =" hasLoading" :size =" 20" />
52+ <Pencil v-else-if =" isSignElementsAvailable()" :size =" 20" />
53+ </template >
54+ {{ isSignElementsAvailable() ? t('libresign', 'Setup signature positions') : t('libresign', 'Save') }}
55+ </NcButton >
56+ <NcButton v-if =" showRequestButton"
57+ wide
58+ :variant =" filesStore.canSign() ? 'secondary' : 'primary'"
59+ :disabled =" hasLoading"
60+ @click =" request()" >
61+ <template #icon >
62+ <NcLoadingIcon v-if =" hasLoading" :size =" 20" />
63+ <Send v-else :size =" 20" />
64+ </template >
65+ {{ t('libresign', 'Request signatures') }}
66+ </NcButton >
67+ </div >
68+ <div v-if =" filesStore.canSign()" class =" button-group" >
69+ <NcButton wide
70+ variant =" primary"
71+ :disabled =" hasLoading"
72+ @click =" sign()" >
73+ <template #icon >
74+ <NcLoadingIcon v-if =" hasLoading" :size =" 20" />
75+ <Draw v-else :size =" 20" />
76+ </template >
77+ {{ t('libresign', 'Sign document') }}
78+ </NcButton >
79+ </div >
80+ <div class =" button-group" >
81+ <NcButton v-if =" filesStore.canValidate()"
82+ wide
83+ variant =" secondary"
84+ @click =" validationFile()" >
85+ <template #icon >
86+ <Information :size =" 20" />
87+ </template >
88+ {{ t('libresign', 'Validation info') }}
89+ </NcButton >
90+ <NcButton wide
91+ variant =" secondary"
92+ @click =" openFile()" >
93+ <template #icon >
94+ <FileDocument :size =" 20" />
95+ </template >
96+ {{ t('libresign', 'Open file') }}
97+ </NcButton >
98+ </div >
8599 </div >
86100 <VisibleElements />
87101 <NcModal v-if =" modalSrc"
@@ -127,6 +141,7 @@ import svgXmpp from '@mdi/svg/svg/xmpp.svg?raw'
127141import Delete from ' vue-material-design-icons/Delete.vue'
128142import Draw from ' vue-material-design-icons/Draw.vue'
129143import FileDocument from ' vue-material-design-icons/FileDocument.vue'
144+ import Information from ' vue-material-design-icons/Information.vue'
130145import OrderNumericAscending from ' vue-material-design-icons/OrderNumericAscending.vue'
131146import Pencil from ' vue-material-design-icons/Pencil.vue'
132147import Send from ' vue-material-design-icons/Send.vue'
@@ -140,6 +155,7 @@ import { generateOcsUrl } from '@nextcloud/router'
140155
141156import NcActionButton from ' @nextcloud/vue/components/NcActionButton'
142157import NcActionInput from ' @nextcloud/vue/components/NcActionInput'
158+ import NcActions from ' @nextcloud/vue/components/NcActions'
143159import NcAppSidebar from ' @nextcloud/vue/components/NcAppSidebar'
144160import NcAppSidebarTab from ' @nextcloud/vue/components/NcAppSidebarTab'
145161import NcButton from ' @nextcloud/vue/components/NcButton'
@@ -178,6 +194,7 @@ export default {
178194 components: {
179195 NcActionButton,
180196 NcActionInput,
197+ NcActions,
181198 NcAppSidebar,
182199 NcAppSidebarTab,
183200 NcButton,
@@ -188,6 +205,7 @@ export default {
188205 Delete,
189206 Draw,
190207 FileDocument,
208+ Information,
191209 OrderNumericAscending,
192210 Pencil,
193211 Send,
@@ -463,15 +481,17 @@ export default {
463481< / script>
464482< style lang= " scss" scoped>
465483
466- .action - buttons{
484+ .action - buttons {
467485 display: flex;
468- flex- wrap : wrap ;
486+ flex- direction : column ;
469487 gap: 8px ;
470488 margin- top: 12px ;
489+ }
471490
472- button {
473- margin: 0 ! important;
474- }
491+ .button - group {
492+ display: flex;
493+ flex- direction: column;
494+ gap: 8px ;
475495}
476496
477497.iframe {
0 commit comments