Introduce avatar and banner and fetch Gravatar to fill avatar during registration

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

typo

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Rename avatar to avatar_url, same with header.

Add a comment to explain why the tweak with HTTPoison and TLS1.2

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Rename avatar to avatar_url

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

rename old avatar properties in front-end to avatar_url

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

fix change gravatar from ?d= to ?default=

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

reorganize aliases and imports

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

set avatar url only when gravatar exists, add a test for that case

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-01-26 11:02:11 +01:00
parent 35492570de
commit 4b4ecec693
11 changed files with 71 additions and 23 deletions

View File

@@ -20,13 +20,13 @@
<v-spacer></v-spacer>
<div class="text-xs-center">
<v-avatar size="125px">
<img v-if="!account.avatarRemoteUrl"
<img v-if="!account.avatar_url"
class="img-circle elevation-7 mb-1"
src="http://lorempixel.com/125/125/"
>
<img v-else
class="img-circle elevation-7 mb-1"
:src="account.avatarRemoteUrl"
:src="account.avatar_url"
>
</v-avatar>
</div>

View File

@@ -42,13 +42,13 @@
<v-flex xs2>
<router-link :to="{name: 'Account', params: {'id': event.organizer.id}}">
<v-avatar size="75px">
<img v-if="!event.organizer.avatarRemoteUrl"
<img v-if="!event.organizer.avatar_url"
class="img-circle elevation-7 mb-1"
src="http://lorempixel.com/125/125/"
>
<img v-else
class="img-circle elevation-7 mb-1"
:src="event.organizer.avatarRemoteUrl"
:src="event.organizer.avatar_url"
>
</v-avatar>
</router-link>
@@ -57,13 +57,13 @@
<v-flex xs2 v-for="account in event.participants" :key="account.id">
<router-link :to="{name: 'Account', params: {'id': account.id}}">
<v-avatar size="75px">
<img v-if="!account.avatarRemoteUrl"
<img v-if="!account.avatar_url"
class="img-circle elevation-7 mb-1"
src="http://lorempixel.com/125/125/"
>
<img v-else
class="img-circle elevation-7 mb-1"
:src="account.avatarRemoteUrl"
:src="account.avatar_url"
>
</v-avatar>
</router-link>

View File

@@ -20,13 +20,13 @@
<v-spacer></v-spacer>
<div class="text-xs-center">
<v-avatar size="125px">
<img v-if="!group.avatarRemoteUrl"
<img v-if="!group.avatar_url"
class="img-circle elevation-7 mb-1"
src="http://lorempixel.com/125/125/"
>
<img v-else
class="img-circle elevation-7 mb-1"
:src="group.avatarRemoteUrl"
:src="group.avatar_url"
>
</v-avatar>
<v-card-title class="pl-5 pt-5">
@@ -77,13 +77,13 @@
<v-badge overlap>
<span slot="badge" v-if="member.role == 3"><v-icon>stars</v-icon></span>
<v-avatar size="75px">
<img v-if="!member.account.avatarRemoteUrl"
<img v-if="!member.account.avatar_url"
class="img-circle elevation-7 mb-1"
src="http://lorempixel.com/125/125/"
>
<img v-else
class="img-circle elevation-7 mb-1"
:src="member.account.avatarRemoteUrl"
:src="member.account.avatar_url"
>
</v-avatar>
</v-badge>