|
@@ -58,7 +58,6 @@ module.exports = class ProviderView {
|
|
|
this.logout = this.logout.bind(this)
|
|
|
this.preFirstRender = this.preFirstRender.bind(this)
|
|
|
this.handleAuth = this.handleAuth.bind(this)
|
|
|
- this.handleDemoAuth = this.handleDemoAuth.bind(this)
|
|
|
this.sortByTitle = this.sortByTitle.bind(this)
|
|
|
this.sortByDate = this.sortByDate.bind(this)
|
|
|
this.isActiveRow = this.isActiveRow.bind(this)
|
|
@@ -410,13 +409,6 @@ module.exports = class ProviderView {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- handleDemoAuth () {
|
|
|
- const state = this.plugin.getPluginState()
|
|
|
- this.plugin.setPluginState({}, state, {
|
|
|
- authenticated: true
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
handleAuth () {
|
|
|
const authState = btoa(JSON.stringify({ origin: location.origin }))
|
|
|
const link = `${this.provider.authUrl()}?state=${authState}`
|
|
@@ -453,7 +445,10 @@ module.exports = class ProviderView {
|
|
|
handleError (error) {
|
|
|
const uppy = this.plugin.uppy
|
|
|
uppy.log(error.toString())
|
|
|
- const message = uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError')
|
|
|
+ if (error.isAuthError) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const message = uppy.i18n('companionError')
|
|
|
uppy.info({message: message, details: error.toString()}, 'error', 5000)
|
|
|
}
|
|
|
|
|
@@ -534,9 +529,7 @@ module.exports = class ProviderView {
|
|
|
<AuthView
|
|
|
pluginName={this.plugin.title}
|
|
|
pluginIcon={this.plugin.icon}
|
|
|
- demo={this.plugin.opts.demo}
|
|
|
handleAuth={this.handleAuth}
|
|
|
- handleDemoAuth={this.handleDemoAuth}
|
|
|
i18n={this.plugin.uppy.i18n}
|
|
|
i18nArray={this.plugin.uppy.i18nArray} />
|
|
|
</CloseWrapper>
|
|
@@ -553,7 +546,6 @@ module.exports = class ProviderView {
|
|
|
sortByTitle: this.sortByTitle,
|
|
|
sortByDate: this.sortByDate,
|
|
|
logout: this.logout,
|
|
|
- demo: this.plugin.opts.demo,
|
|
|
isActiveRow: this.isActiveRow,
|
|
|
isChecked: this.isChecked,
|
|
|
toggleCheckbox: this.toggleCheckbox,
|