Browse Source

remove handleDemoAuth

Artur Paikin 6 years ago
parent
commit
61442ec58e

+ 0 - 3
packages/@uppy/provider-views/src/AuthView.js

@@ -25,9 +25,6 @@ class AuthBlock extends Component {
       >
       >
         {this.props.i18nArray('authenticateWith', { pluginName: this.props.pluginName })}
         {this.props.i18nArray('authenticateWith', { pluginName: this.props.pluginName })}
       </button>
       </button>
-      {this.props.demo &&
-        <button class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn" onclick={this.props.handleDemoAuth}>Proceed with Demo Account</button>
-      }
     </div>
     </div>
   }
   }
 }
 }

+ 0 - 9
packages/@uppy/provider-views/src/index.js

@@ -58,7 +58,6 @@ module.exports = class ProviderView {
     this.logout = this.logout.bind(this)
     this.logout = this.logout.bind(this)
     this.preFirstRender = this.preFirstRender.bind(this)
     this.preFirstRender = this.preFirstRender.bind(this)
     this.handleAuth = this.handleAuth.bind(this)
     this.handleAuth = this.handleAuth.bind(this)
-    this.handleDemoAuth = this.handleDemoAuth.bind(this)
     this.sortByTitle = this.sortByTitle.bind(this)
     this.sortByTitle = this.sortByTitle.bind(this)
     this.sortByDate = this.sortByDate.bind(this)
     this.sortByDate = this.sortByDate.bind(this)
     this.isActiveRow = this.isActiveRow.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 () {
   handleAuth () {
     const authState = btoa(JSON.stringify({ origin: location.origin }))
     const authState = btoa(JSON.stringify({ origin: location.origin }))
     const link = `${this.provider.authUrl()}?state=${authState}`
     const link = `${this.provider.authUrl()}?state=${authState}`
@@ -536,7 +528,6 @@ module.exports = class ProviderView {
             pluginIcon={this.plugin.icon}
             pluginIcon={this.plugin.icon}
             demo={this.plugin.opts.demo}
             demo={this.plugin.opts.demo}
             handleAuth={this.handleAuth}
             handleAuth={this.handleAuth}
-            handleDemoAuth={this.handleDemoAuth}
             i18n={this.plugin.uppy.i18n}
             i18n={this.plugin.uppy.i18n}
             i18nArray={this.plugin.uppy.i18nArray} />
             i18nArray={this.plugin.uppy.i18nArray} />
         </CloseWrapper>
         </CloseWrapper>