blue-twilight/resources/js/external_services.js

29 lines
835 B
JavaScript
Raw Permalink Normal View History

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