File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import { loadState } from '@nextcloud/initial-state'
4040import { FILE_STATUS } from ' ../../constants.js'
4141import { useSidebarStore } from ' ../../store/sidebar.js'
4242import { useSignStore } from ' ../../store/sign.js'
43+ import { getSigningRouteUuid } from ' ../../utils/signRequestUuid.ts'
4344
4445defineOptions ({
4546 name: ' SignTab' ,
@@ -70,13 +71,11 @@ function signEnabled() {
7071}
7172
7273function getSignRequestUuid() {
73- const doc = currentDocument .value
74- const signer = doc .signers ?.find (row => row .me ) || doc .signers ?.[0 ]
75- const fromDoc = [doc .signRequestUuid , doc .sign_request_uuid , doc .signUuid , doc .sign_uuid ]
76- .find ((value ): value is string => typeof value === ' string' && value .length > 0 )
77- const fromSigner = signer ?.sign_uuid
7874 const fromState = loadState <string | null >(' libresign' , ' sign_request_uuid' , null )
79- return fromDoc || fromSigner || (typeof fromState === ' string' && fromState .length > 0 ? fromState : null )
75+ return getSigningRouteUuid (
76+ currentDocument .value ,
77+ typeof fromState === ' string' && fromState .length > 0 ? fromState : null ,
78+ )
8079}
8180
8281function getValidationRouteName() {
You can’t perform that action at this time.
0 commit comments