mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 16:19:02 +02:00
[web] Fix FileTreeModalCreateFile modal style on "too many files" error (#28995)
* Temporarily update `maxEntitiesPerProject` to test `FileTreeModalCreateFile` * Remove unused CSS * Move project_has_too_many_files Notification to the modal body * Turn project_approaching_file_limit message into a Notification * Update project_has_too_many_files translation with `fileCount.limit` * Update other project_has_too_many_files with limit parameter * Add translations for project_has_too_many_files_limit * Revert "Temporarily update `maxEntitiesPerProject` to test `FileTreeModalCreateFile`" This reverts commit 704996aa96c9ba592c7e44d165def0b97d30bed1. * Fix unit tests * Move the warning notification to the modal's body --------- Co-authored-by: Rebeka <o.dekany@gmail.com> GitOrigin-RevId: 0f54db7021e4cd4537a14e4f9e1d8ef54337778c
This commit is contained in:
@@ -152,7 +152,11 @@ async function addDoc(req, res, next) {
|
||||
res.json(doc)
|
||||
} catch (err) {
|
||||
if (err.message === 'project_has_too_many_files') {
|
||||
res.status(400).json(req.i18n.translate('project_has_too_many_files'))
|
||||
res.status(400).json(
|
||||
req.i18n.translate('project_has_too_many_files_limit', {
|
||||
limit: Settings.maxEntitiesPerProject,
|
||||
})
|
||||
)
|
||||
} else {
|
||||
next(err)
|
||||
}
|
||||
@@ -178,7 +182,11 @@ async function addFolder(req, res, next) {
|
||||
res.json(doc)
|
||||
} catch (err) {
|
||||
if (err.message === 'project_has_too_many_files') {
|
||||
res.status(400).json(req.i18n.translate('project_has_too_many_files'))
|
||||
res.status(400).json(
|
||||
req.i18n.translate('project_has_too_many_files_limit', {
|
||||
limit: Settings.maxEntitiesPerProject,
|
||||
})
|
||||
)
|
||||
} else if (err.message === 'invalid element name') {
|
||||
res.status(400).json(req.i18n.translate('invalid_file_name'))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user