mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-26 03:35:19 +00:00
Move update() to Plugin.js to avoid duplication
This commit is contained in:
parent
7ffc0ee990
commit
6502d66d0b
3 changed files with 14 additions and 25 deletions
|
|
@ -18,15 +18,6 @@ export default class ProgressDrawer extends Plugin {
|
|||
this.opts = Object.assign({}, defaultOptions, opts)
|
||||
}
|
||||
|
||||
update () {
|
||||
if (typeof this.el === 'undefined') {
|
||||
return
|
||||
}
|
||||
|
||||
const newEl = this.render(this.core.state)
|
||||
yo.update(this.el, newEl)
|
||||
}
|
||||
|
||||
drawerItem (file) {
|
||||
const isUploaded = file.progress === 100
|
||||
|
||||
|
|
@ -52,7 +43,7 @@ export default class ProgressDrawer extends Plugin {
|
|||
<h4 class="UppyProgressDrawer-itemName">
|
||||
${file.uploadURL
|
||||
? yo`<a href="${file.uploadURL}" target="_blank">${file.name}</a>`
|
||||
: yo`<span>${file.name} (${file.progress})</span>`
|
||||
: yo`<span>${file.name} (${file.progress}%)</span>`
|
||||
}
|
||||
</h4>
|
||||
${isUploaded ? checkIcon : ''}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue