mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-17 21:12:16 +01:00
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 <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
parent
c82875fcfc
commit
9664ed97a1
2 changed files with 9 additions and 9 deletions
|
|
@ -34,7 +34,7 @@ class SignatureStatusPlugin extends ServerPlugin {
|
|||
|
||||
$fileService->setFileByType('FileId', $nodeId);
|
||||
|
||||
$propFind->handle('{http://nextcloud.org/ns}signature-status', $fileService->getStatus());
|
||||
$propFind->handle('{http://nextcloud.org/ns}signed-node-id', $fileService->getSignedNodeId());
|
||||
$propFind->handle('{http://nextcloud.org/ns}libresign-signature-status', $fileService->getStatus());
|
||||
$propFind->handle('{http://nextcloud.org/ns}libresign-signed-node-id', $fileService->getSignedNodeId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ const action = new FileAction({
|
|||
title: (nodes) => {
|
||||
const node = nodes[0]
|
||||
|
||||
const signedNodeId = node.attributes['signed-node-id']
|
||||
const signedNodeId = node.attributes['libresign-signed-node-id']
|
||||
|
||||
if (!signedNodeId || node.fileid === signedNodeId) {
|
||||
const status = fileStatus.find(status => status.id === node.attributes['signature-status'])
|
||||
const status = fileStatus.find(status => status.id === node.attributes['libresign-signature-status'])
|
||||
return status?.label ?? ''
|
||||
}
|
||||
return t('libresign', 'original file')
|
||||
|
|
@ -31,10 +31,10 @@ const action = new FileAction({
|
|||
iconSvgInline: (nodes) => {
|
||||
const node = nodes[0]
|
||||
|
||||
const signedNodeId = node.attributes['signed-node-id']
|
||||
const signedNodeId = node.attributes['libresign-signed-node-id']
|
||||
|
||||
if (!signedNodeId || node.fileid === signedNodeId) {
|
||||
const status = fileStatus.find(status => status.id === node.attributes['signature-status'])
|
||||
const status = fileStatus.find(status => status.id === node.attributes['libresign-signature-status'])
|
||||
return status?.icon ?? ''
|
||||
}
|
||||
const ableToSignStatus = fileStatus.find(status => status.id === SIGN_STATUS.ABLE_TO_SIGN)
|
||||
|
|
@ -45,9 +45,9 @@ const action = new FileAction({
|
|||
return loadState('libresign', 'certificate_ok')
|
||||
&& nodes.length > 0
|
||||
&& nodes
|
||||
.map(node => node.mime)
|
||||
.every(mime => mime === 'application/pdf')
|
||||
&& nodes.every(node => node.attributes['signature-status'])
|
||||
.map(node => node.mime)
|
||||
.every(mime => mime === 'application/pdf')
|
||||
&& nodes.every(node => node.attributes['libresign-signature-status'])
|
||||
},
|
||||
order: -1,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue