mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-22 10:36:57 +00:00
only show editor support buttons if support enabled
GitOrigin-RevId: 8b5cb3c08eefa89673e5f1f16ba98ab57cad4788
This commit is contained in:
parent
154f1c9235
commit
eb13ceafd5
3 changed files with 17 additions and 10 deletions
|
@ -801,7 +801,8 @@ const ProjectController = {
|
|||
Boolean(project.overleaf.history.display),
|
||||
brandVariation,
|
||||
allowedImageNames: Settings.allowedImageNames || [],
|
||||
gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl
|
||||
gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl,
|
||||
showSupport: Features.hasFeature('support')
|
||||
})
|
||||
timer.done()
|
||||
}
|
||||
|
|
|
@ -17,6 +17,10 @@ const publicRegistrationModuleAvailable = fs.existsSync(
|
|||
`${__dirname}/../../../modules/public-registration`
|
||||
)
|
||||
|
||||
const supportModuleAvailable = fs.existsSync(
|
||||
`${__dirname}/../../../modules/support`
|
||||
)
|
||||
|
||||
module.exports = Features = {
|
||||
externalAuthenticationSystemUsed() {
|
||||
return (
|
||||
|
@ -61,9 +65,10 @@ module.exports = Features = {
|
|||
return Settings.enableSaml
|
||||
case 'link-url':
|
||||
return Settings.apis.linkedUrlProxy && Settings.apis.linkedUrlProxy.url
|
||||
|
||||
case 'public-registration':
|
||||
return publicRegistrationModuleAvailable
|
||||
case 'support':
|
||||
return supportModuleAvailable
|
||||
default:
|
||||
throw new Error(`unknown feature: ${feature}`)
|
||||
}
|
||||
|
|
|
@ -208,14 +208,15 @@ aside#left-menu.full-size(
|
|||
a(ng-click="openHotkeysModal()")
|
||||
i.fa.fa-keyboard-o.fa-fw
|
||||
| #{translate("show_hotkeys")}
|
||||
li
|
||||
a(href='/learn', target="_blank")
|
||||
i.fa.fa-book.fa-fw
|
||||
| #{translate('documentation')}
|
||||
li
|
||||
a(ng-controller="ContactModal", ng-click="contactUsModal()")
|
||||
i.fa.fa-question.fa-fw
|
||||
| #{translate("contact_us")}
|
||||
if showSupport
|
||||
li
|
||||
a(href='/learn', target="_blank")
|
||||
i.fa.fa-book.fa-fw
|
||||
| #{translate('documentation')}
|
||||
li
|
||||
a(ng-controller="ContactModal", ng-click="contactUsModal()")
|
||||
i.fa.fa-question.fa-fw
|
||||
| #{translate("contact_us")}
|
||||
|
||||
#left-menu-mask(
|
||||
ng-show="ui.leftMenuShown",
|
||||
|
|
Loading…
Add table
Reference in a new issue