mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2587 from overleaf/msm-ns-disable-comment-button
disable "add comment" button if feature is not available GitOrigin-RevId: e054f138a84ec634cc777d76e8a288ba2c1b2ee3
This commit is contained in:
parent
96cd1c869e
commit
72c5286622
2 changed files with 43 additions and 36 deletions
|
@ -21,6 +21,10 @@ const supportModuleAvailable = fs.existsSync(
|
|||
`${__dirname}/../../../modules/support`
|
||||
)
|
||||
|
||||
const trackChangesModuleAvailable = fs.existsSync(
|
||||
`${__dirname}/../../../modules/track-changes`
|
||||
)
|
||||
|
||||
module.exports = Features = {
|
||||
externalAuthenticationSystemUsed() {
|
||||
return (
|
||||
|
@ -69,6 +73,8 @@ module.exports = Features = {
|
|||
return publicRegistrationModuleAvailable
|
||||
case 'support':
|
||||
return supportModuleAvailable
|
||||
case 'track-changes':
|
||||
return trackChangesModuleAvailable
|
||||
default:
|
||||
throw new Error(`unknown feature: ${feature}`)
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
i.fa.fa-times
|
||||
| #{translate("reject_all")}
|
||||
| ({{ reviewPanel.nVisibleSelectedChanges }})
|
||||
if hasFeature('track-changes')
|
||||
a.rp-add-comment-btn(
|
||||
href
|
||||
ng-if="reviewPanel.entries[editor.open_doc_id]['add-comment'] != null && permissions.comment"
|
||||
|
|
Loading…
Reference in a new issue