|
@@ -32,7 +32,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
var defaultOpts = {
|
|
var defaultOpts = {
|
|
- DashboardInline: false,
|
|
|
|
|
|
+ DashboardInline: true,
|
|
Webcam: true,
|
|
Webcam: true,
|
|
GoogleDrive: true,
|
|
GoogleDrive: true,
|
|
Instagram: true,
|
|
Instagram: true,
|
|
@@ -42,28 +42,28 @@
|
|
}
|
|
}
|
|
|
|
|
|
// try to get options from localStorage, if its empty, set to defaultOpts
|
|
// try to get options from localStorage, if its empty, set to defaultOpts
|
|
- window.uppyOptions = JSON.parse(localStorage.getItem('uppyOptions')) || {}
|
|
|
|
- if (isObjEmpty(window.uppyOptions)) {
|
|
|
|
- window.uppyOptions = defaultOpts
|
|
|
|
- localStorage.setItem('uppyOptions', JSON.stringify(window.uppyOptions))
|
|
|
|
|
|
+ window.uppyOptions2 = JSON.parse(localStorage.getItem('uppyOptions2')) || {}
|
|
|
|
+ if (isObjEmpty(window.uppyOptions2)) {
|
|
|
|
+ window.uppyOptions2 = defaultOpts
|
|
|
|
+ localStorage.setItem('uppyOptions2', JSON.stringify(window.uppyOptions2))
|
|
}
|
|
}
|
|
|
|
|
|
function toggleModalBtn () {
|
|
function toggleModalBtn () {
|
|
var btn = document.querySelector('.UppyModalOpenerBtn')
|
|
var btn = document.querySelector('.UppyModalOpenerBtn')
|
|
- window.uppyOptions.DashboardInline
|
|
|
|
|
|
+ window.uppyOptions2.DashboardInline
|
|
? btn.style.display = 'none'
|
|
? btn.style.display = 'none'
|
|
: btn.style.display = 'block'
|
|
: btn.style.display = 'block'
|
|
}
|
|
}
|
|
|
|
|
|
// Map input state to options
|
|
// Map input state to options
|
|
Object.keys(optionInputs).forEach(function (item) {
|
|
Object.keys(optionInputs).forEach(function (item) {
|
|
- optionInputs[item].checked = window.uppyOptions[item]
|
|
|
|
|
|
+ optionInputs[item].checked = window.uppyOptions2[item]
|
|
})
|
|
})
|
|
|
|
|
|
// When input value changes, update options
|
|
// When input value changes, update options
|
|
Object.keys(optionInputs).forEach(function (item) {
|
|
Object.keys(optionInputs).forEach(function (item) {
|
|
optionInputs[item].addEventListener('change', function () {
|
|
optionInputs[item].addEventListener('change', function () {
|
|
- window.uppyOptions[item] = optionInputs[item].checked
|
|
|
|
|
|
+ window.uppyOptions2[item] = optionInputs[item].checked
|
|
localStorage.setItem('uppyOptions', JSON.stringify(window.uppyOptions))
|
|
localStorage.setItem('uppyOptions', JSON.stringify(window.uppyOptions))
|
|
|
|
|
|
toggleModalBtn()
|
|
toggleModalBtn()
|