From 40ca0b394ea066dea95c672eb0a42a35c9e65317 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shp@cock.li>
Date: Sun, 6 Sep 2020 15:28:09 +0300
Subject: add basic deletes support that works with masto WS

---
 src/components/user_avatar/user_avatar.vue | 11 +++++++++++
 1 file changed, 11 insertions(+)

(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 e4e4127c..eb3d375e 100644
--- a/src/components/user_avatar/user_avatar.vue
+++ b/src/components/user_avatar/user_avatar.vue
@@ -1,5 +1,6 @@
 <template>
   <StillImage
+    v-if="user"
     class="Avatar"
     :alt="user.screen_name"
     :title="user.screen_name"
@@ -7,6 +8,11 @@
     :class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }"
     :image-load-error="imageLoadError"
   />
+  <div
+    v-else
+    class="Avatar -placeholder"
+    :class="{ 'avatar-compact': compact }"
+  />
 </template>
 
 <script src="./user_avatar.js"></script>
@@ -42,5 +48,10 @@
     border-radius: $fallback--avatarAltRadius;
     border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
   }
+
+  &.-placeholder {
+    background-color: $fallback--fg;
+    background-color: var(--fg, $fallback--fg);
+  }
 }
 </style>
-- 
cgit v1.2.3-70-g09d2

