Skip to content

Commit

Permalink
fix: updated avatar border color
Browse files Browse the repository at this point in the history
  • Loading branch information
yougotwill committed Oct 11, 2022
1 parent 948a531 commit a5a48e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
3 changes: 1 addition & 2 deletions stylesheets/_avatar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
img {
object-fit: cover;
border-radius: 50%;
// TODO Theming update
border: 1px solid var(--color-avatar-border-color);
border: 1px solid var(--avatar-border-color);
}
}

Expand Down
15 changes: 0 additions & 15 deletions stylesheets/_session_conversation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,6 @@
}
}

@keyframes pulseLight {
0% {
box-shadow: 0px 0px 0px 0px var(--danger-color);
}

// TODO Theming - Needs fixing
50% {
box-shadow: 0px 0px 12px 0px rgba(var(--color-destructive-alt-rgb), 1);
}

100% {
box-shadow: 0px 0px 0px 0px rgba(var(--color-destructive-alt-rgb), 1);
}
}

.conversation-item__options-pane {
position: absolute;
height: 100%;
Expand Down
8 changes: 3 additions & 5 deletions ts/components/avatar/AvatarPlaceHolder/AvatarPlaceHolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const sha512FromPubkey = async (pubkey: string): Promise<string> => {
// key is the pubkey, value is the hash
const cachedHashes = new Map<string, number>();

const avatarPlaceholderColors = Object.values(COLORS.PRIMARY);
const avatarPlaceholderColors: Array<string> = Object.values(COLORS.PRIMARY);

function useHashBasedOnPubkey(pubkey: string) {
const [hash, setHash] = useState<number | undefined>(undefined);
Expand Down Expand Up @@ -80,7 +80,6 @@ export const AvatarPlaceHolder = (props: Props) => {

if (loading || !hash) {
// return grey circle
// TODO Theming update
return (
<svg viewBox={viewBox}>
<g id="UrTavla">
Expand All @@ -90,7 +89,7 @@ export const AvatarPlaceHolder = (props: Props) => {
r={rWithoutBorder}
fill="#d2d2d3"
shapeRendering="geometricPrecision"
stroke={'var(--color-avatar-border-color)'}
stroke={'var(--avatar-border-color)'}
strokeWidth="1"
/>
</g>
Expand All @@ -106,7 +105,6 @@ export const AvatarPlaceHolder = (props: Props) => {

const bgColor = avatarPlaceholderColors[bgColorIndex];

// TODO Theming Update
return (
<svg viewBox={viewBox}>
<g id="UrTavla">
Expand All @@ -116,7 +114,7 @@ export const AvatarPlaceHolder = (props: Props) => {
r={rWithoutBorder}
fill={bgColor}
shapeRendering="geometricPrecision"
stroke={'var(--color-avatar-border-color)'}
stroke={'var(--avatar-border-color)'}
strokeWidth="1"
/>
<text
Expand Down

0 comments on commit a5a48e0

Please sign in to comment.