Add instagram background implementation and generalize application for other identity providers
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
attr = DS.attr
|
||||
App.User= DS.Model.extend
|
||||
facebook_id: attr('string')
|
||||
email: attr('string')
|
||||
name: attr('string')
|
||||
uid: attr('string')
|
||||
provider: attr('string')
|
||||
avatar: attr('string')
|
||||
list: DS.belongsTo('list') # in ember scope not many to many (yet)
|
||||
join_requests: DS.hasMany('join_request')
|
||||
facebook_image_tag: (->
|
||||
facebook_id = @get('facebook_id')
|
||||
return '' unless facebook_id
|
||||
url = "http://graph.facebook.com/#{facebook_id}/picture?type=square"
|
||||
avatar_tag: (->
|
||||
return unless avatar = @get('avatar')
|
||||
name = @get('name')
|
||||
new Handlebars.SafeString "<img src=\"#{url}\" alt=\"#{name}\" title=\"#{name}\" class=\"user-facebook-image\">"
|
||||
).property('facebook_id', 'name')
|
||||
"<img src='#{avatar}' alt='#{name}' title='#{name}' class='user-avatar-image #{@get('provider')}'>".htmlSafe()
|
||||
).property('avatar', 'name')
|
||||
|
||||
@@ -14,7 +14,7 @@ if list.closed_at
|
||||
.display-field= view "close-list-button" content=list
|
||||
.user-info-container
|
||||
each user in list.users
|
||||
=user.facebook_image_tag
|
||||
=user.avatar_tag
|
||||
if list.sorted_orders
|
||||
.list-orders-container
|
||||
each order in list.sorted_orders
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
td.user-info.show-for-large-up
|
||||
each user in view.content.users
|
||||
= user.facebook_image_tag
|
||||
= user.avatar_tag
|
||||
td.status-icons
|
||||
if view.content.needs_help
|
||||
span.icon.needs-help
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
td.user-info.show-for-large-up
|
||||
each user in view.content.list.users
|
||||
= user.facebook_image_tag
|
||||
= user.avatar_tag
|
||||
td.status-icons
|
||||
if view.content.active
|
||||
span.active-order.fa.fa-check.fa-lg
|
||||
|
||||
@@ -14,7 +14,7 @@ table.table
|
||||
tr
|
||||
td
|
||||
each user in order.list.users
|
||||
= user.facebook_image_tag
|
||||
= user.avatar_tag
|
||||
td.status-icons
|
||||
if order.active
|
||||
span.active-order.fa.fa-check.fa-lg
|
||||
|
||||
@@ -18,7 +18,7 @@ if table.active_list
|
||||
/.table-action-row
|
||||
a{action "editTable" table}: span.fa.fa-lg.fa-wrench
|
||||
each user in table.active_list.users
|
||||
= user.facebook_image_tag
|
||||
= user.avatar_tag
|
||||
if editmodedisabled
|
||||
.table-settings
|
||||
select
|
||||
|
||||
Reference in New Issue
Block a user