|
@@ -508,7 +508,7 @@ module.exports = class Dashboard extends Plugin {
|
|
|
|
|
|
render (state) {
|
|
|
const pluginState = this.getPluginState()
|
|
|
- const { files, capabilities } = state
|
|
|
+ const { files, capabilities, allowNewUpload } = state
|
|
|
|
|
|
const newFiles = Object.keys(files).filter((file) => {
|
|
|
return !files[file].progress.uploadStarted
|
|
@@ -576,13 +576,14 @@ module.exports = class Dashboard extends Plugin {
|
|
|
}
|
|
|
|
|
|
return DashboardUI({
|
|
|
- state: state,
|
|
|
+ state,
|
|
|
modal: pluginState,
|
|
|
- newFiles: newFiles,
|
|
|
- files: files,
|
|
|
+ newFiles,
|
|
|
+ files,
|
|
|
totalFileCount: Object.keys(files).length,
|
|
|
totalProgress: state.totalProgress,
|
|
|
- acquirers: acquirers,
|
|
|
+ allowNewUpload,
|
|
|
+ acquirers,
|
|
|
activePanel: pluginState.activePanel,
|
|
|
animateOpenClose: this.opts.animateOpenClose,
|
|
|
isClosing: pluginState.isClosing,
|
|
@@ -610,16 +611,16 @@ module.exports = class Dashboard extends Plugin {
|
|
|
metaFields: pluginState.metaFields,
|
|
|
resumableUploads: capabilities.resumableUploads || false,
|
|
|
bundled: capabilities.bundled || false,
|
|
|
- startUpload: startUpload,
|
|
|
+ startUpload,
|
|
|
pauseUpload: this.uppy.pauseResume,
|
|
|
retryUpload: this.uppy.retryUpload,
|
|
|
- cancelUpload: cancelUpload,
|
|
|
+ cancelUpload,
|
|
|
cancelAll: this.uppy.cancelAll,
|
|
|
fileCardFor: pluginState.fileCardFor,
|
|
|
toggleFileCard: this.toggleFileCard,
|
|
|
toggleAddFilesPanel: this.toggleAddFilesPanel,
|
|
|
showAddFilesPanel: pluginState.showAddFilesPanel,
|
|
|
- saveFileCard: saveFileCard,
|
|
|
+ saveFileCard,
|
|
|
width: this.opts.width,
|
|
|
height: this.opts.height,
|
|
|
showLinkToFileUploadResult: this.opts.showLinkToFileUploadResult,
|