1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-08 23:31:12 +00:00

Migrate "Manage Template" in editor left menu to react ()

This feature is only available on server pro

GitOrigin-RevId: 7fc508c8039c2e3afd1a5fca469fce411e9d913a
This commit is contained in:
M Fahru 2023-03-20 06:58:46 -07:00 committed by Copybot
parent 5fe98bf0fd
commit 5ae698ec6c
5 changed files with 28 additions and 0 deletions
services/web
app
src/Features/Project
views/project/editor
config
frontend
extracted-translations.json
js/features/editor-left-menu/components

View file

@ -1314,6 +1314,9 @@ const ProjectController = {
gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl,
wsUrl,
showSupport: Features.hasFeature('support'),
showTemplatesServerPro: Features.hasFeature(
'templates-server-pro'
),
pdfjsVariant: pdfjsAssignment.variant,
debugPdfDetach,
showLegacySourceEditor,

View file

@ -36,6 +36,7 @@ meta(name="ol-legacyEditorThemes" data-type="json" content=legacyEditorThemes)
meta(name="ol-showUpgradePrompt" data-type="boolean" content=showUpgradePrompt)
meta(name="ol-useOpenTelemetry" data-type="boolean" content=useOpenTelemetry)
meta(name="ol-showSupport", data-type="boolean" content=showSupport)
meta(name="ol-showTemplatesServerPro", data-type="boolean" content=showTemplatesServerPro)
meta(name="ol-showCM6SwitchAwaySurvey", data-type="boolean" content=showCM6SwitchAwaySurvey)
meta(name="ol-richTextVariant" content=richTextVariant)
meta(name="ol-showOnboardingVideoTour", data-type="boolean" content=showOnboardingVideoTour)

View file

@ -794,6 +794,7 @@ module.exports = {
importProjectFromGithubModalWrapper: [],
importProjectFromGithubMenu: [],
editorLeftMenuSync: [],
editorLeftMenuManageTemplate: [],
},
moduleImportSequence: [

View file

@ -600,6 +600,7 @@
"priority_support": "",
"privacy_policy": "",
"private": "",
"problem_talking_to_publishing_service": "",
"problem_with_subscription_contact_us": "",
"proceed_to_paypal": "",
"proceeding_to_paypal_takes_you_to_the_paypal_site_to_pay": "",
@ -610,6 +611,7 @@
"project_approaching_file_limit": "",
"project_flagged_too_many_compiles": "",
"project_has_too_many_files": "",
"project_last_published_at": "",
"project_layout_sharing_submission": "",
"project_name": "",
"project_not_linked_to_github": "",
@ -629,7 +631,10 @@
"projects": "",
"projects_list": "",
"public": "",
"publish": "",
"publish_as_template": "",
"publisher_account": "",
"publishing": "",
"pull_github_changes_into_sharelatex": "",
"push_sharelatex_changes_to_github": "",
"raw_logs": "",
@ -672,6 +677,7 @@
"rename_project": "",
"renaming": "",
"repository_name": "",
"republish": "",
"resend": "",
"resend_confirmation_email": "",
"resending_confirmation_email": "",
@ -799,6 +805,8 @@
"tags_slash_folders": "",
"take_short_survey": "",
"template_approved_by_publisher": "",
"template_description": "",
"template_title_taken_from_project_title": "",
"templates": "",
"terminated": "",
"tex_live_version": "",
@ -885,6 +893,8 @@
"unlink_reference": "",
"unlink_warning_reference": "",
"unlinking": "",
"unpublish": "",
"unpublishing": "",
"unsubscribe": "",
"untrash": "",
"update": "",
@ -911,6 +921,7 @@
"vat_number": "",
"view_all": "",
"view_hub": "",
"view_in_template_gallery": "",
"view_logs": "",
"view_metrics": "",
"view_pdf": "",

View file

@ -1,8 +1,15 @@
import { ElementType } from 'react'
import { useTranslation } from 'react-i18next'
import getMeta from '../../../utils/meta'
import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
import ActionsCopyProject from './actions-copy-project'
import ActionsWordCount from './actions-word-count'
const components = importOverleafModules('editorLeftMenuManageTemplate') as {
import: { default: ElementType }
path: string
}[]
export default function ActionsMenu() {
const { t } = useTranslation()
const anonymous = getMeta('ol-anonymous') as boolean | undefined
@ -18,6 +25,11 @@ export default function ActionsMenu() {
<li>
<ActionsCopyProject />
</li>
{components.map(({ import: { default: Component }, path }) => (
<li key={path}>
<Component />
</li>
))}
<li>
<ActionsWordCount />
</li>