@@ -3041,58 +3041,59 @@ class GitGraphView {
30413041 const fileExistsAtThisRevision = file . type !== GG . GitFileStatus . Deleted && ! isUncommitted ;
30423042 const fileExistsAtThisRevisionAndDiffPossible = fileExistsAtThisRevision && diffPossible ;
30433043 const codeReviewInProgressAndNotReviewed = expandedCommit . codeReview !== null && expandedCommit . codeReview . remainingFiles . includes ( file . newFilePath ) ;
3044+ const visibility = this . config . contextMenuActionsVisibility . commitDetailsViewFile ;
30443045
30453046 contextMenu . show ( [
30463047 [
30473048 {
30483049 title : 'View Diff' ,
3049- visible : diffPossible ,
3050+ visible : visibility . viewDiff && diffPossible ,
30503051 onClick : ( ) => triggerViewFileDiff ( file , fileElem )
30513052 } ,
30523053 {
30533054 title : 'View File at this Revision' ,
3054- visible : fileExistsAtThisRevisionAndDiffPossible ,
3055+ visible : visibility . viewFileAtThisRevision && fileExistsAtThisRevisionAndDiffPossible ,
30553056 onClick : ( ) => triggerViewFileAtRevision ( file , fileElem )
30563057 } ,
30573058 {
30583059 title : 'View Diff with Working File' ,
3059- visible : fileExistsAtThisRevisionAndDiffPossible ,
3060+ visible : visibility . viewDiffWithWorkingFile && fileExistsAtThisRevisionAndDiffPossible ,
30603061 onClick : ( ) => triggerViewFileDiffWithWorkingFile ( file , fileElem )
30613062 } ,
30623063 {
30633064 title : 'Open File' ,
3064- visible : file . type !== GG . GitFileStatus . Deleted ,
3065+ visible : visibility . openFile && file . type !== GG . GitFileStatus . Deleted ,
30653066 onClick : ( ) => triggerOpenFile ( file , fileElem )
30663067 }
30673068 ] ,
30683069 [
30693070 {
30703071 title : 'Mark as Reviewed' ,
3071- visible : codeReviewInProgressAndNotReviewed ,
3072+ visible : visibility . markAsReviewed && codeReviewInProgressAndNotReviewed ,
30723073 onClick : ( ) => this . cdvUpdateFileState ( file , fileElem , true , false )
30733074 } ,
30743075 {
30753076 title : 'Mark as Not Reviewed' ,
3076- visible : expandedCommit . codeReview !== null && ! codeReviewInProgressAndNotReviewed ,
3077+ visible : visibility . markAsNotReviewed && expandedCommit . codeReview !== null && ! codeReviewInProgressAndNotReviewed ,
30773078 onClick : ( ) => this . cdvUpdateFileState ( file , fileElem , false , false )
30783079 }
30793080 ] ,
30803081 [
30813082 {
30823083 title : 'Reset File to this Revision' + ELLIPSIS ,
3083- visible : fileExistsAtThisRevision && expandedCommit . compareWithHash === null ,
3084+ visible : visibility . resetFileToThisRevision && fileExistsAtThisRevision && expandedCommit . compareWithHash === null ,
30843085 onClick : ( ) => triggerResetFileToRevision ( file , fileElem )
30853086 }
30863087 ] ,
30873088 [
30883089 {
30893090 title : 'Copy Absolute File Path to Clipboard' ,
3090- visible : true ,
3091+ visible : visibility . copyAbsoluteFilePath ,
30913092 onClick : ( ) => triggerCopyFilePath ( file , true )
30923093 } ,
30933094 {
30943095 title : 'Copy Relative File Path to Clipboard' ,
3095- visible : true ,
3096+ visible : visibility . copyRelativeFilePath ,
30963097 onClick : ( ) => triggerCopyFilePath ( file , false )
30973098 }
30983099 ]
0 commit comments