function ExternalServiceViewModel() { this.el = '#external-service-options'; this.data = { service_type: '' }; this.computed = { hasOAuthStandardOptions() { // This logic must be mirrored in App\ExternalService return this.service_type === 'facebook' || this.service_type === 'google' || this.service_type === 'twitter'; }, isDropbox() { // This logic must be mirrored in App\ExternalService return this.service_type === 'dropbox'; } } }