Skip to content

Commit 7ee7442

Browse files
AntDavidLimavitormattos
authored andcommitted
feat(files-app-integration): create and register stub plugin
Signed-off-by: David Lima <[email protected]>
1 parent 66cd238 commit 7ee7442

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.phpactor.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"indexer.stub_paths": [
3+
"/home/david/Devel/librecode/nextcloud-dev/server"
4+
]
5+
}

appinfo/info.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ Developed with ❤️ by [LibreCode](https://librecode.coop). Help us transform
9696
</plugins>
9797
</sabre>
9898
<types>
99-
<filesystem/>
10099
<dav/>
101100
</types>
102101
</info>

src/actions/showStatusInlineAction.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const action = new FileAction({
5454
enabled: (nodes) => {
5555
return loadState('libresign', 'certificate_ok')
5656
&& nodes.length > 0 && nodes
57-
.map(node => node.mime)
58-
.every(mime => mime === 'application/pdf')
57+
.map(node => node.mime)
58+
.every(mime => mime === 'application/pdf')
5959
},
6060
order: -1,
6161
})

src/init.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import Vue from 'vue'
77

88
import axios from '@nextcloud/axios'
9-
import { addNewFileMenuEntry, Permission } from '@nextcloud/files'
9+
import { addNewFileMenuEntry, Permission, registerDavProperty } from '@nextcloud/files'
1010
import { translate, translatePlural } from '@nextcloud/l10n'
1111
import { generateOcsUrl } from '@nextcloud/router'
1212
import { getUploader } from '@nextcloud/upload'
@@ -21,6 +21,8 @@ Vue.prototype.n = translatePlural
2121
Vue.prototype.OC = OC
2222
Vue.prototype.OCA = OCA
2323

24+
registerDavProperty('nc:node-name', { nc: 'http://nextcloud.org/ns' })
25+
2426
addNewFileMenuEntry({
2527
id: 'libresign-request',
2628
displayName: t('libresign', 'New signature request'),

src/tab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Vue.use(PiniaVuePlugin)
2828

2929
const pinia = createPinia()
3030

31-
const isEnabled = function(fileInfo) {
31+
const isEnabled = function (fileInfo) {
3232
if (fileInfo?.isDirectory() || !loadState('libresign', 'certificate_ok')) {
3333
return false
3434
}

0 commit comments

Comments
 (0)