2020-04-20 22:33:42 +01:00
|
|
|
function ExternalServiceViewModel()
|
|
|
|
{
|
|
|
|
this.el = '#external-service-options';
|
|
|
|
this.data = {
|
|
|
|
service_type: ''
|
|
|
|
};
|
|
|
|
this.computed = {
|
|
|
|
hasOAuthStandardOptions()
|
|
|
|
{
|
2020-04-21 08:40:56 +01:00
|
|
|
// This logic must be mirrored in App\ExternalService
|
|
|
|
return this.service_type === 'facebook' ||
|
2020-04-20 22:33:42 +01:00
|
|
|
this.service_type === 'google' ||
|
|
|
|
this.service_type === 'twitter';
|
2020-04-21 08:40:56 +01:00
|
|
|
},
|
|
|
|
isDropbox()
|
|
|
|
{
|
|
|
|
// This logic must be mirrored in App\ExternalService
|
|
|
|
return this.service_type === 'dropbox';
|
2020-04-20 22:33:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|