From ea17f3ace4f58b726e31523e09423d7fd91475d2 Mon Sep 17 00:00:00 2001 From: Pavel Laptev Date: Tue, 23 Jul 2024 01:12:19 +0200 Subject: [PATCH] avatars component updated --- app/src/lib/navigation/BranchItemNew.svelte | 3 +- app/src/lib/navigation/BranchesNew.svelte | 2 +- app/src/lib/navigation/ProjectAvatar.svelte | 2 +- .../ui/src/lib/CommitLines/AvatarImage.svelte | 34 ++++++++----------- .../ui}/src/lib/utils/stringToColor.ts | 0 5 files changed, 18 insertions(+), 23 deletions(-) rename {app => packages/ui}/src/lib/utils/stringToColor.ts (100%) diff --git a/app/src/lib/navigation/BranchItemNew.svelte b/app/src/lib/navigation/BranchItemNew.svelte index 257f8c52f..309adcdbe 100644 --- a/app/src/lib/navigation/BranchItemNew.svelte +++ b/app/src/lib/navigation/BranchItemNew.svelte @@ -1,7 +1,7 @@ -
- - {altText}
@@ -40,20 +30,24 @@ display: grid; place-content: center; overflow: hidden; + border-radius: 6px; + width: 12px; + height: 12px; } .image-wrapper > * { grid-area: 1 / 1; } - .hidden { + .avatar { + position: relative; + width: 100%; + height: 100%; + object-fit: cover; opacity: 0; } - .avatar { - position: relative; - width: 12px; - height: 12px; - border-radius: 6px; + .show { + opacity: 1; } diff --git a/app/src/lib/utils/stringToColor.ts b/packages/ui/src/lib/utils/stringToColor.ts similarity index 100% rename from app/src/lib/utils/stringToColor.ts rename to packages/ui/src/lib/utils/stringToColor.ts