mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Template Gallery: migration to 6.1.0
enable menu for editor redisign move frontend code to modules
This commit is contained in:
@@ -37,9 +37,12 @@ const TemplatesManager = {
|
||||
compiler = ProjectOptionsHandler.normalizeCompiler(
|
||||
compiler || settings.defaultLatexCompiler
|
||||
)
|
||||
imageName = ProjectOptionsHandler.normalizeImageName(
|
||||
imageName || 'wl_texlive:2018.1'
|
||||
)
|
||||
try {
|
||||
imageName = ProjectOptionsHandler.normalizeImageName(imageName)
|
||||
} catch {
|
||||
logger.warn( { templateId, imageName }, 'cannot use the image required by the template, using the default image')
|
||||
imageName = null
|
||||
}
|
||||
|
||||
const zipUrl = `${settings.apis.filestore.url}/template/${templateId}/v/${templateVersionId}/zip`
|
||||
const zipReq = await fetchStreamWithResponse(zipUrl, {
|
||||
@@ -49,6 +52,7 @@ const TemplatesManager = {
|
||||
const projectName = ProjectDetailsHandler.fixProjectName(templateName)
|
||||
const dumpPath = `${settings.path.dumpFolder}/${crypto.randomUUID()}_templates-manager`
|
||||
const writeStream = fs.createWriteStream(dumpPath)
|
||||
|
||||
try {
|
||||
const attributes = {
|
||||
compiler,
|
||||
|
||||
@@ -309,6 +309,8 @@ async function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||
TokenAccessRouter.apply(webRouter)
|
||||
HistoryRouter.apply(webRouter, privateApiRouter)
|
||||
|
||||
await Modules.applyRouter(webRouter, privateApiRouter, publicApiRouter)
|
||||
|
||||
if (Settings.enableSubscriptions) {
|
||||
webRouter.get(
|
||||
'/user/bonus',
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
extends ../layout-react
|
||||
|
||||
block entrypointVar
|
||||
- entrypoint = 'pages/template-gallery'
|
||||
|
||||
block vars
|
||||
block vars
|
||||
- const suppressNavContentLinks = true
|
||||
- const suppressNavbar = true
|
||||
- const suppressFooter = true
|
||||
- bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||
- isWebsiteRedesign = false
|
||||
|
||||
block append meta
|
||||
meta(name="ol-templateCategory" data-type="string" content=category)
|
||||
|
||||
block content
|
||||
#template-gallery-root
|
||||
@@ -1,20 +0,0 @@
|
||||
extends ../layout-react
|
||||
|
||||
block entrypointVar
|
||||
- entrypoint = 'pages/template'
|
||||
|
||||
block vars
|
||||
- const suppressNavContentLinks = true
|
||||
- const suppressNavbar = true
|
||||
- const suppressFooter = true
|
||||
- bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||
- isWebsiteRedesign = false
|
||||
|
||||
block append meta
|
||||
meta(name="ol-template" data-type="json" content=template)
|
||||
meta(name="ol-languages" data-type="json" content=languages)
|
||||
meta(name="ol-userIsAdmin" data-type="boolean" content=hasAdminAccess())
|
||||
|
||||
block content
|
||||
#template-root
|
||||
|
||||
Reference in New Issue
Block a user