mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-26 11:44:53 +00:00
Add another message for empty folders
This commit is contained in:
parent
912b6b8714
commit
e6eec30783
2 changed files with 10 additions and 3 deletions
|
|
@ -352,9 +352,15 @@ module.exports = class View {
|
|||
state.selectedFolders[folderId] = {loading: false, files: files}
|
||||
this.updateState({selectedFolders: folders})
|
||||
const dashboard = this.plugin.core.getPlugin('Dashboard')
|
||||
this.plugin.core.info(dashboard.i18n('folderAdded', {
|
||||
smart_count: files.length, folder: this.plugin.getItemName(folder)
|
||||
}))
|
||||
let message
|
||||
if (files.length) {
|
||||
message = dashboard.i18n('folderAdded', {
|
||||
smart_count: files.length, folder: this.plugin.getItemName(folder)
|
||||
})
|
||||
} else {
|
||||
message = dashboard.i18n('emptyFolderAdded')
|
||||
}
|
||||
this.plugin.core.info(message)
|
||||
}).catch((e) => {
|
||||
state = this.plugin.core.getState()[this.plugin.stateId]
|
||||
delete state.selectedFolders[folderId]
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ module.exports = class DashboardUI extends Plugin {
|
|||
fileProgress: 'File progress: upload speed and ETA',
|
||||
numberOfSelectedFiles: 'Number of selected files',
|
||||
uploadAllNewFiles: 'Upload all new files',
|
||||
emptyFolderAdded: 'No files were added from empty folder',
|
||||
folderAdded: {
|
||||
0: 'Added %{smart_count} file from %{folder}',
|
||||
1: 'Added %{smart_count} files from %{folder}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue