Skip to content

Commit 9664ed9

Browse files
committed
refactor(dav): add libresign- prefix to DAV property names
Add libresign- prefix to DAV properties (signature-status and signed-node-id) to follow Nextcloud naming conventions and avoid potential naming conflicts with other apps. Signed-off-by: Vitor Mattos <[email protected]>
1 parent c82875f commit 9664ed9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/Dav/SignatureStatusPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function propFind(PropFind $propFind, INode $node): void {
3434

3535
$fileService->setFileByType('FileId', $nodeId);
3636

37-
$propFind->handle('{http://nextcloud.org/ns}signature-status', $fileService->getStatus());
38-
$propFind->handle('{http://nextcloud.org/ns}signed-node-id', $fileService->getSignedNodeId());
37+
$propFind->handle('{http://nextcloud.org/ns}libresign-signature-status', $fileService->getStatus());
38+
$propFind->handle('{http://nextcloud.org/ns}libresign-signed-node-id', $fileService->getSignedNodeId());
3939
}
4040
}

src/actions/showStatusInlineAction.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const action = new FileAction({
1515
title: (nodes) => {
1616
const node = nodes[0]
1717

18-
const signedNodeId = node.attributes['signed-node-id']
18+
const signedNodeId = node.attributes['libresign-signed-node-id']
1919

2020
if (!signedNodeId || node.fileid === signedNodeId) {
21-
const status = fileStatus.find(status => status.id === node.attributes['signature-status'])
21+
const status = fileStatus.find(status => status.id === node.attributes['libresign-signature-status'])
2222
return status?.label ?? ''
2323
}
2424
return t('libresign', 'original file')
@@ -31,10 +31,10 @@ const action = new FileAction({
3131
iconSvgInline: (nodes) => {
3232
const node = nodes[0]
3333

34-
const signedNodeId = node.attributes['signed-node-id']
34+
const signedNodeId = node.attributes['libresign-signed-node-id']
3535

3636
if (!signedNodeId || node.fileid === signedNodeId) {
37-
const status = fileStatus.find(status => status.id === node.attributes['signature-status'])
37+
const status = fileStatus.find(status => status.id === node.attributes['libresign-signature-status'])
3838
return status?.icon ?? ''
3939
}
4040
const ableToSignStatus = fileStatus.find(status => status.id === SIGN_STATUS.ABLE_TO_SIGN)
@@ -45,9 +45,9 @@ const action = new FileAction({
4545
return loadState('libresign', 'certificate_ok')
4646
&& nodes.length > 0
4747
&& nodes
48-
.map(node => node.mime)
49-
.every(mime => mime === 'application/pdf')
50-
&& nodes.every(node => node.attributes['signature-status'])
48+
.map(node => node.mime)
49+
.every(mime => mime === 'application/pdf')
50+
&& nodes.every(node => node.attributes['libresign-signature-status'])
5151
},
5252
order: -1,
5353
})

0 commit comments

Comments
 (0)