mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
only show editor support buttons if support enabled
GitOrigin-RevId: 8b5cb3c08eefa89673e5f1f16ba98ab57cad4788
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user