diff --git a/html/src/index.pug b/html/src/index.pug index 8cadec5d..f138fc75 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -181,6 +181,7 @@ html .x-friend-item(v-for="user in searchUserResults" :key="user.id" @click="showUserDialog(user.id)") template(v-once) .avatar + //img(v-if="user.userIcon" v-lazy="user.userIcon") No userIcon from search, API bug? img(v-lazy="user.currentAvatarThumbnailImageUrl") .detail span.name(v-text="user.displayName" :class="user.trustClass") @@ -241,7 +242,8 @@ html .x-friend-item(v-for="favorite in favoriteFriends" v-if="favorite.groupKey === group.key" :key="favorite.id" @click="showUserDialog(favorite.id)") template(v-if="favorite.ref") .avatar(:class="userStatusClass(favorite.ref)") - img(v-lazy="favorite.ref.currentAvatarThumbnailImageUrl") + img(v-if="favorite.ref.userIcon" v-lazy="favorite.ref.userIcon") + img(v-else v-lazy="favorite.ref.currentAvatarThumbnailImageUrl") .detail span.name(v-text="favorite.ref.displayName" :class="favorite.ref.$trustClass") location.extra(v-if="favorite.ref.location !== 'offline'" :location="favorite.ref.location" :link="false") @@ -415,7 +417,8 @@ html .x-friend-list(style="margin-top:10px") .x-friend-item(@click="showUserDialog(API.currentUser.id)") .avatar - img(v-lazy="API.currentUser.currentAvatarThumbnailImageUrl") + img(v-if="API.currentUser.userIcon" v-lazy="API.currentUser.userIcon") + img(v-else v-lazy="API.currentUser.currentAvatarThumbnailImageUrl") .detail span.name(v-text="API.currentUser.displayName") span.extra(v-text="API.currentUser.username") @@ -560,7 +563,8 @@ html .detail span.name(v-text="item.ref.displayName" :class="item.ref.$trustClass") location.extra(:location="item.ref.location" :link="false") - img.avatar(v-lazy="item.ref.currentAvatarThumbnailImageUrl") + img.avatar(v-if="item.ref.userIcon" v-lazy="item.ref.userIcon") + img.avatar(v-else v-lazy="item.ref.currentAvatarThumbnailImageUrl") span(v-else) Search More: #[span(v-text="item.label" style="font-weight:bold")] .x-friend-list(style="padding-bottom:10px") .x-friend-group @@ -569,7 +573,8 @@ html div(v-show="isFriendsGroupMe") .x-friend-item(:key="API.currentUser.id" @click="showUserDialog(API.currentUser.id)") .avatar(:class="userStatusClass(API.currentUser)") - img(v-lazy="API.currentUser.currentAvatarThumbnailImageUrl") + img(v-if="API.currentUser.userIcon" v-lazy="API.currentUser.userIcon") + img(v-else v-lazy="API.currentUser.currentAvatarThumbnailImageUrl") .detail span.name(v-text="API.currentUser.displayName" :class="API.currentUser.$trustClass") location.extra(v-if="isGameRunning === true" :location="lastLocation" :link="false") @@ -581,7 +586,8 @@ html .x-friend-item(v-for="friend in friendsGroup0" :key="friend.id" @click="showUserDialog(friend.id)") template(v-if="friend.ref") .avatar(:class="userStatusClass(friend.ref)") - img(v-lazy="friend.ref.currentAvatarThumbnailImageUrl") + img(v-if="friend.ref.userIcon" v-lazy="friend.ref.userIcon") + img(v-else v-lazy="friend.ref.currentAvatarThumbnailImageUrl") .detail span.name(v-if="friend.memo" :class="friend.ref.$trustClass") {{ friend.ref.displayName }} ({{ friend.memo }}) span.name(v-else v-text="friend.ref.displayName" :class="friend.ref.$trustClass") @@ -596,7 +602,8 @@ html .x-friend-item(v-for="friend in friendsGroup1" :key="friend.id" @click="showUserDialog(friend.id)") template(v-if="friend.ref") .avatar(:class="userStatusClass(friend.ref)") - img(v-lazy="friend.ref.currentAvatarThumbnailImageUrl") + img(v-if="friend.ref.userIcon" v-lazy="friend.ref.userIcon") + img(v-else v-lazy="friend.ref.currentAvatarThumbnailImageUrl") .detail span.name(v-if="friend.memo" :class="friend.ref.$trustClass") {{ friend.ref.displayName }} ({{ friend.memo }}) span.name(v-else v-text="friend.ref.displayName" :class="friend.ref.$trustClass") @@ -611,7 +618,8 @@ html .x-friend-item(v-for="friend in friendsGroup2" :key="friend.id" @click="showUserDialog(friend.id)") template(v-if="friend.ref") .avatar - img(v-lazy="friend.ref.currentAvatarThumbnailImageUrl") + img(v-if="friend.ref.userIcon" v-lazy="friend.ref.userIcon") + img(v-else v-lazy="friend.ref.currentAvatarThumbnailImageUrl") .detail span.name(v-if="friend.memo" :class="friend.ref.$trustClass") {{ friend.ref.displayName }} ({{ friend.memo }}) span.name(v-else v-text="friend.ref.displayName" :class="friend.ref.$trustClass") @@ -626,7 +634,8 @@ html .x-friend-item(v-for="friend in friendsGroup3" :key="friend.id" @click="showUserDialog(friend.id)") template(v-if="friend.ref") .avatar - img(v-lazy="friend.ref.currentAvatarThumbnailImageUrl") + img(v-if="friend.ref.userIcon" v-lazy="friend.ref.userIcon") + img(v-else v-lazy="friend.ref.currentAvatarThumbnailImageUrl") .detail span.name(v-if="friend.memo" :class="friend.ref.$trustClass") {{ friend.ref.displayName }} ({{ friend.memo }}) span.name(v-else v-text="friend.ref.displayName" :class="friend.ref.$trustClass") @@ -714,14 +723,16 @@ html .x-friend-item(v-if="userDialog.$location.userId" @click="showUserDialog(userDialog.$location.userId)") template(v-if="userDialog.$location.user") .avatar(:class="userStatusClass(userDialog.$location.user)") - img(v-lazy="userDialog.$location.user.currentAvatarThumbnailImageUrl") + img(v-if="userDialog.$location.user.userIcon" v-lazy="userDialog.$location.user.userIcon") + img(v-else v-lazy="userDialog.$location.user.currentAvatarThumbnailImageUrl") .detail span.name(v-text="userDialog.$location.user.displayName" :class="userDialog.$location.user.$trustClass") span.extra Instance Creator span(v-else v-text="userDialog.$location.userId") .x-friend-item(v-for="user in userDialog.users" :key="user.id" @click="showUserDialog(user.id)") .avatar(:class="userStatusClass(user)") - img(v-lazy="user.currentAvatarThumbnailImageUrl") + img(v-if="user.userIcon" v-lazy="user.userIcon") + img(v-else v-lazy="user.currentAvatarThumbnailImageUrl") .detail span.name(v-text="user.displayName" :class="user.$trustClass") span.extra @@ -838,14 +849,16 @@ html .x-friend-item(v-if="room.$location.userId" @click="showUserDialog(room.$location.userId)") template(v-if="room.$location.user") .avatar(:class="userStatusClass(room.$location.user)") - img(v-lazy="room.$location.user.currentAvatarThumbnailImageUrl") + img(v-if="room.$location.user.userIcon" v-lazy="room.$location.user.userIcon") + img(v-else v-lazy="room.$location.user.currentAvatarThumbnailImageUrl") .detail span.name(v-text="room.$location.user.displayName" :class="room.$location.user.$trustClass") span.extra Instance Creator span(v-else v-text="room.$location.userId") .x-friend-item(v-for="user in room.users" :key="user.id" @click="showUserDialog(user.id)") .avatar(:class="userStatusClass(user)") - img(v-lazy="user.currentAvatarThumbnailImageUrl") + img(v-if="user.userIcon" v-lazy="user.userIcon") + img(v-else v-lazy="user.currentAvatarThumbnailImageUrl") .detail span.name(v-text="user.displayName" :class="user.$trustClass") span.extra @@ -969,14 +982,16 @@ html el-option-group(v-if="API.currentUser" label="ME") el-option.x-friend-item(:label="API.currentUser.displayName" :value="API.currentUser.id" style="height:auto") .avatar(:class="userStatusClass(API.currentUser)") - img(v-lazy="API.currentUser.currentAvatarThumbnailImageUrl") + img(v-if="API.currentUser.userIcon" v-lazy="API.currentUser.userIcon") + img(v-else v-lazy="API.currentUser.currentAvatarThumbnailImageUrl") .detail span.name(v-text="API.currentUser.displayName") el-option-group(v-if="friendsGroup0.length" label="VIP") el-option.x-friend-item(v-for="friend in friendsGroup0" :key="friend.id" :label="friend.name" :value="friend.id" style="height:auto") template(v-if="friend.ref") .avatar(:class="userStatusClass(friend.ref)") - img(v-lazy="friend.ref.currentAvatarThumbnailImageUrl") + img(v-if="friend.ref.userIcon" v-lazy="friend.ref.userIcon") + img(v-else v-lazy="friend.ref.currentAvatarThumbnailImageUrl") .detail span.name(v-text="friend.ref.displayName" :class="friend.ref.$trustClass") span(v-else v-text="friend.id") @@ -984,7 +999,8 @@ html el-option.x-friend-item(v-for="friend in friendsGroup1" :key="friend.id" :label="friend.name" :value="friend.id" style="height:auto") template(v-if="friend.ref") .avatar(:class="userStatusClass(friend.ref)") - img(v-lazy="friend.ref.currentAvatarThumbnailImageUrl") + img(v-if="friend.ref.userIcon" v-lazy="friend.ref.userIcon") + img(v-else v-lazy="friend.ref.currentAvatarThumbnailImageUrl") .detail span.name(v-text="friend.ref.displayName" :class="friend.ref.$trustClass") span(v-else v-text="friend.id") @@ -992,7 +1008,8 @@ html el-option.x-friend-item(v-for="friend in friendsGroup2" :key="friend.id" :label="friend.name" :value="friend.id" style="height:auto") template(v-if="friend.ref") .avatar - img(v-lazy="friend.ref.currentAvatarThumbnailImageUrl") + img(v-if="friend.ref.userIcon" v-lazy="friend.ref.userIcon") + img(v-else v-lazy="friend.ref.currentAvatarThumbnailImageUrl") .detail span.name(v-text="friend.ref.displayName" :class="friend.ref.$trustClass") span(v-else v-text="friend.id")