Skip to content

Commit 31df2a8

Browse files
committed
feat:button open file
Signed-off-by: Crisciany Souza <[email protected]>
1 parent 3ea314b commit 31df2a8

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/Components/RightSidebar/RequestSignatureTab.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
@click="validationFile()">
5959
{{ t('libresign', 'Validate') }}
6060
</NcButton>
61+
<NcButton v-if="filesStore.canValidate()"
62+
variant="primary"
63+
@click="validationFile()">
64+
{{ t('libresign', 'Open file') }}
65+
</NcButton>
6166
</div>
6267
<VisibleElements />
6368
<NcModal v-if="modalSrc"

src/views/FilesList/FileEntry/FileEntryActions.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import svgDelete from '@mdi/svg/svg/delete.svg?raw'
6060
import svgSignature from '@mdi/svg/svg/signature.svg?raw'
6161
import svgTextBoxCheck from '@mdi/svg/svg/text-box-check.svg?raw'
62+
import svgFileDocument from '@mdi/svg/svg/file-document-outline.svg?raw'
6263
6364
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
6465
import NcActions from '@nextcloud/vue/components/NcActions'
@@ -147,6 +148,11 @@ export default {
147148
title: t('libresign', 'Delete'),
148149
iconSvgInline: svgDelete,
149150
})
151+
this.registerAction({
152+
id: 'open',
153+
title: t('libresign', 'Open file'),
154+
iconSvgInline: svgFileDocument,
155+
})
150156
},
151157
methods: {
152158
visibleIf(action) {
@@ -158,6 +164,8 @@ export default {
158164
visible = this.filesStore.canValidate(file)
159165
} else if (action.id === 'delete') {
160166
visible = this.filesStore.canDelete(file)
167+
} else if (action.id === 'open') {
168+
visible = this.filesStore.canValidate(file)
161169
}
162170
return visible
163171
},

0 commit comments

Comments
 (0)