Skip to content

Commit

Permalink
Use opts.id as the plugin ID for all plugins, fixes #1674
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Jun 19, 2019
1 parent a808b1d commit e6c52f7
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/@uppy/aws-s3-multipart/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = class AwsS3Multipart extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'uploader'
this.id = 'AwsS3Multipart'
this.id = this.opts.id || 'AwsS3Multipart'
this.title = 'AWS S3 Multipart'
this.client = new RequestClient(uppy, opts)

Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/aws-s3/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = class AwsS3 extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'uploader'
this.id = 'AwsS3'
this.id = this.opts.id || 'AwsS3'
this.title = 'AWS S3'

this.defaultLocale = {
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/form/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = class Form extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'acquirer'
this.id = 'Form'
this.id = this.opts.id || 'Form'
this.title = 'Form'

// set default options
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/golden-retriever/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = class GoldenRetriever extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'debugger'
this.id = 'GoldenRetriever'
this.id = this.opts.id || 'GoldenRetriever'
this.title = 'Golden Retriever'

const defaultOptions = {
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/react/src/__mocks__/DashboardPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class Dashboard extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)

this.id = opts.id
this.id = this.opts.id
this.type = 'orchestrator'
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/react/src/__mocks__/DragDropPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class DragDrop extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)

this.id = opts.id
this.id = this.opts.id
this.type = 'acquirer'
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/react/src/__mocks__/ProgressBarPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class ProgressBar extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)

this.id = opts.id
this.id = this.opts.id
this.type = 'progressindicator'
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/react/src/__mocks__/StatusBarPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class StatusBar extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)

this.id = opts.id
this.id = this.opts.id
this.type = 'progressindicator'
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/redux-dev-tools/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = class ReduxDevTools extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'debugger'
this.id = 'ReduxDevTools'
this.id = this.opts.id || 'ReduxDevTools'
this.title = 'Redux DevTools'

// set default options
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/robodog/src/AttachFileInputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AttachFileInputs extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)

this.id = opts.id || 'AttachFileInputs'
this.id = this.opts.id || 'AttachFileInputs'
this.type = 'acquirer'

this.handleChange = this.handleChange.bind(this)
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/robodog/src/TransloaditFormResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TransloaditFormResult extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)

this.id = opts.id || 'TransloaditFormResult'
this.id = this.opts.id || 'TransloaditFormResult'
this.type = 'modifier'

this.handleUpload = this.handleUpload.bind(this)
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/robodog/src/TransloaditResultsPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TransloaditResultsPlugin extends Plugin {
super(uppy, opts)

this.type = 'modifier'
this.id = 'TransloaditResultsPlugin'
this.id = this.opts.id || 'TransloaditResultsPlugin'
this._afterUpload = this._afterUpload.bind(this)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/transloadit/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = class Transloadit extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'uploader'
this.id = 'Transloadit'
this.id = this.opts.id || 'Transloadit'
this.title = 'Transloadit'

this.defaultLocale = {
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/tus/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = class Tus extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'uploader'
this.id = 'Tus'
this.id = this.opts.id || 'Tus'
this.title = 'Tus'

// set default options
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/xhr-upload/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = class XHRUpload extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'uploader'
this.id = 'XHRUpload'
this.id = this.opts.id || 'XHRUpload'
this.title = 'XHRUpload'

this.defaultLocale = {
Expand Down

1 comment on commit e6c52f7

@arturi
Copy link
Contributor

@arturi arturi commented on e6c52f7 Jun 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot!

Please sign in to comment.