File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
views/FilesList/FileEntry Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 58
58
@click =" validationFile()" >
59
59
{{ t('libresign', 'Validate') }}
60
60
</NcButton >
61
+ <NcButton v-if =" filesStore.canValidate()"
62
+ variant =" primary"
63
+ @click =" validationFile()" >
64
+ {{ t('libresign', 'Open file') }}
65
+ </NcButton >
61
66
</div >
62
67
<VisibleElements />
63
68
<NcModal v-if =" modalSrc"
Original file line number Diff line number Diff line change 59
59
import svgDelete from ' @mdi/svg/svg/delete.svg?raw'
60
60
import svgSignature from ' @mdi/svg/svg/signature.svg?raw'
61
61
import svgTextBoxCheck from ' @mdi/svg/svg/text-box-check.svg?raw'
62
+ import svgFileDocument from ' @mdi/svg/svg/file-document-outline.svg?raw'
62
63
63
64
import NcActionButton from ' @nextcloud/vue/components/NcActionButton'
64
65
import NcActions from ' @nextcloud/vue/components/NcActions'
@@ -147,6 +148,11 @@ export default {
147
148
title: t (' libresign' , ' Delete' ),
148
149
iconSvgInline: svgDelete,
149
150
})
151
+ this .registerAction ({
152
+ id: ' open' ,
153
+ title: t (' libresign' , ' Open file' ),
154
+ iconSvgInline: svgFileDocument,
155
+ })
150
156
},
151
157
methods: {
152
158
visibleIf (action ) {
@@ -158,6 +164,8 @@ export default {
158
164
visible = this .filesStore .canValidate (file)
159
165
} else if (action .id === ' delete' ) {
160
166
visible = this .filesStore .canDelete (file)
167
+ } else if (action .id === ' open' ) {
168
+ visible = this .filesStore .canValidate (file)
161
169
}
162
170
return visible
163
171
},
You can’t perform that action at this time.
0 commit comments