From eea002e6f5e3da4c4415d45cffd9cff64fd6c052 Mon Sep 17 00:00:00 2001
From: Shpuld Shpludson <shp@cock.li>
Date: Wed, 8 Jul 2020 10:11:17 +0000
Subject: streamline profile image api, update reset ui for all profile images
 to match avatar, remove unnecessary stuff

---
 src/components/user_avatar/user_avatar.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/user_avatar/user_avatar.vue')

diff --git a/src/components/user_avatar/user_avatar.vue b/src/components/user_avatar/user_avatar.vue
index 9ffb28d8..3545b801 100644
--- a/src/components/user_avatar/user_avatar.vue
+++ b/src/components/user_avatar/user_avatar.vue
@@ -3,7 +3,7 @@
     class="avatar"
     :alt="user.screen_name"
     :title="user.screen_name"
-    :src="imgSrc"
+    :src="imgSrc(user.profile_image_url_original)"
     :class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }"
     :image-load-error="imageLoadError"
   />
-- 
cgit v1.2.3-70-g09d2


From 815f230ac7ace5a1507afae91bafa57589a77522 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Tue, 18 Aug 2020 23:57:42 +0300
Subject: fixed some issues related to user avatar

---
 src/components/attachment/attachment.vue          |  8 ++++++--
 src/components/chat_list_item/chat_list_item.scss |  2 +-
 src/components/chat_title/chat_title.vue          |  2 +-
 src/components/status/status.scss                 |  2 +-
 src/components/still-image/still-image.vue        |  3 +--
 src/components/user_avatar/user_avatar.vue        |  6 ++++--
 src/components/user_card/user_card.vue            | 10 +++-------
 7 files changed, 17 insertions(+), 16 deletions(-)

(limited to 'src/components/user_avatar/user_avatar.vue')

diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index be7377e9..63e0ceba 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -60,6 +60,7 @@
       @click="openModal"
     >
       <StillImage
+        class="image"
         :referrerpolicy="referrerpolicy"
         :mimetype="attachment.mimetype"
         :src="attachment.large_thumb_url || attachment.url"
@@ -281,8 +282,11 @@
   }
 
   .image-attachment {
-    width: 100%;
-    height: 100%;
+    &,
+    & .image {
+      width: 100%;
+      height: 100%;
+    }
 
     &.hidden {
       display: none;
diff --git a/src/components/chat_list_item/chat_list_item.scss b/src/components/chat_list_item/chat_list_item.scss
index 10ba45f2..9e97b28e 100644
--- a/src/components/chat_list_item/chat_list_item.scss
+++ b/src/components/chat_list_item/chat_list_item.scss
@@ -72,7 +72,7 @@
     }
   }
 
-  .avatar.still-image {
+  .Avatar {
     border-radius: $fallback--avatarAltRadius;
     border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
   }
diff --git a/src/components/chat_title/chat_title.vue b/src/components/chat_title/chat_title.vue
index c375b10b..b16ed39d 100644
--- a/src/components/chat_title/chat_title.vue
+++ b/src/components/chat_title/chat_title.vue
@@ -51,7 +51,7 @@
     }
   }
 
-  .still-image.avatar {
+  .Avatar {
     width: 23px;
     height: 23px;
     margin-right: 0.5em;
diff --git a/src/components/status/status.scss b/src/components/status/status.scss
index 7fbab3b8..4973e4ba 100644
--- a/src/components/status/status.scss
+++ b/src/components/status/status.scss
@@ -6,7 +6,7 @@ $status-margin: 0.75em;
 .Status {
   min-width: 0;
 
-  &:hover .avatar {
+  &:hover {
     --still-image-img: visible;
     --still-image-canvas: hidden;
   }
diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue
index 6fa055de..ad82210d 100644
--- a/src/components/still-image/still-image.vue
+++ b/src/components/still-image/still-image.vue
@@ -30,8 +30,6 @@
   position: relative;
   line-height: 0;
   overflow: hidden;
-  width: 100%;
-  height: 100%;
   display: flex;
   align-items: center;
 
@@ -68,6 +66,7 @@
       border-radius: $fallback--tooltipRadius;
       border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
       z-index: 2;
+      visibility: var(--still-image-label-visibility, visible);
     }
 
     &:hover canvas {
diff --git a/src/components/user_avatar/user_avatar.vue b/src/components/user_avatar/user_avatar.vue
index 3545b801..e4e4127c 100644
--- a/src/components/user_avatar/user_avatar.vue
+++ b/src/components/user_avatar/user_avatar.vue
@@ -1,6 +1,6 @@
 <template>
   <StillImage
-    class="avatar"
+    class="Avatar"
     :alt="user.screen_name"
     :title="user.screen_name"
     :src="imgSrc(user.profile_image_url_original)"
@@ -13,7 +13,9 @@
 <style lang="scss">
 @import '../../_variables.scss';
 
-.avatar.still-image {
+.Avatar {
+  --still-image-label-visibility: hidden;
+
   width: 48px;
   height: 48px;
   box-shadow: var(--avatarStatusShadow);
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 75db5db1..07fce79a 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -364,13 +364,9 @@
     }
   }
 
-  &:hover .animated.avatar {
-    canvas {
-      display: none;
-    }
-    img {
-      visibility: visible;
-    }
+  &:hover .avatar {
+    --still-image-img: visible;
+    --still-image-canvas: hidden;
   }
 
   &-avatar-link {
-- 
cgit v1.2.3-70-g09d2

