mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
wip
This commit is contained in:
parent
11cb650401
commit
0fa68aab9d
5 changed files with 22 additions and 2 deletions
|
|
@ -85,6 +85,10 @@
|
|||
<span class="error"></span>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
<h2>transloadit.dashboard()</h2>
|
||||
|
||||
<p id="dashboard">
|
||||
|
||||
<hr>
|
||||
<h2>transloadit.pick()</h2>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,17 @@ const formUppyWithDashboard = transloadit.form('#dashboard-form', {
|
|||
|
||||
window.formUppyWithDashboard = formUppyWithDashboard
|
||||
|
||||
const dashboard = transloadit.dashboard('#dashboard', {
|
||||
debug: true,
|
||||
waitForEncoding: true,
|
||||
params: {
|
||||
auth: { key: '05a61ed019fe11e783fdbd1f56c73eb0' },
|
||||
template_id: 'be001500a56011e889f9cddd88df842c'
|
||||
}
|
||||
})
|
||||
|
||||
window.dashboard = dashboard
|
||||
|
||||
/**
|
||||
* transloadit.modal
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -248,9 +248,8 @@ module.exports = class Dashboard extends Plugin {
|
|||
requestCloseModal () {
|
||||
if (this.opts.onRequestCloseModal) {
|
||||
return this.opts.onRequestCloseModal()
|
||||
} else {
|
||||
this.closeModal()
|
||||
}
|
||||
return this.closeModal()
|
||||
}
|
||||
|
||||
getFocusableNodes () {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
const form = require('./form')
|
||||
const dashboard = require('./dashboard')
|
||||
const pick = require('./pick')
|
||||
const upload = require('./upload')
|
||||
|
||||
module.exports = {
|
||||
dashboard,
|
||||
form,
|
||||
pick,
|
||||
upload
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ function pick (opts = {}) {
|
|||
closeAfterFinish: true
|
||||
})
|
||||
|
||||
function close () {
|
||||
uppy.close()
|
||||
}
|
||||
|
||||
if (Array.isArray(opts.providers)) {
|
||||
addProviders(uppy, opts.providers, {
|
||||
...opts,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue