mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2624 from overleaf/hb-warning-nearing-file-limit
Show warning near or above file limit in upload modal GitOrigin-RevId: 75e7c41e526ccde9516f7caf6ef1b9cbc59c2439
This commit is contained in:
parent
bb958492a9
commit
d20518fdd4
4 changed files with 24 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
script(type='text/ng-template', id='newFileModalTemplate')
|
||||
.modal-header
|
||||
h3 Add Files
|
||||
.modal-body.modal-new-file
|
||||
.modal-body.modal-new-file(ng-if="file_count < 2000")
|
||||
table
|
||||
tr
|
||||
td.modal-new-file--list
|
||||
|
@ -190,6 +190,10 @@ script(type='text/ng-template', id='newFileModalTemplate')
|
|||
!= moduleIncludes("newFileModal:panel", locals)
|
||||
|
||||
.modal-footer
|
||||
.modal-footer-left.approaching-file-limit(ng-if="file_count > 1900 && file_count < 2000")
|
||||
| #{translate("project_approaching_file_limit")} ({{file_count}}/2000)
|
||||
.alert.alert-warning.at-file-limit(ng-if="file_count >= 2000")
|
||||
| #{translate("project_has_too_many_files")}
|
||||
button.btn.btn-default(
|
||||
ng-disabled="state.inflight"
|
||||
ng-click="cancel()"
|
||||
|
|
|
@ -167,6 +167,14 @@ define([
|
|||
return entities
|
||||
}
|
||||
|
||||
getFullCount() {
|
||||
const entities = []
|
||||
this.forEachEntity(function(e) {
|
||||
return entities.push(e)
|
||||
})
|
||||
return entities.length
|
||||
}
|
||||
|
||||
getMultiSelectedEntityChildNodes() {
|
||||
// use pathnames with a leading slash to avoid
|
||||
// problems with reserved Object properties
|
||||
|
|
|
@ -143,6 +143,7 @@ define(['base'], function(App) {
|
|||
projectFeatures,
|
||||
userFeatures
|
||||
) {
|
||||
$scope.file_count = ide.fileTreeManager.getFullCount()
|
||||
$scope.type = type
|
||||
$scope.parent_folder = parent_folder
|
||||
$scope.state = {
|
||||
|
|
|
@ -338,3 +338,13 @@
|
|||
.modal-new-file--body-upload {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
.approaching-file-limit {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.at-file-limit {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue