Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

enforce border radius on default avatar (#8577)

authored by

Samuel Newman and committed by
GitHub
8f9a8ddc 9fdd98d8

+15 -4
+15 -4
src/view/com/util/UserAvatar.tsx
··· 98 98 size: number 99 99 }): React.ReactNode => { 100 100 const finalShape = overrideShape ?? (type === 'user' ? 'circle' : 'square') 101 + 102 + const aviStyle = useMemo(() => { 103 + if (finalShape === 'square') { 104 + return {borderRadius: size > 32 ? 8 : 3, overflow: 'hidden'} as const 105 + } 106 + }, [finalShape, size]) 107 + 101 108 if (type === 'algo') { 102 109 // TODO: shape=circle 103 110 // Font Awesome Pro 6.4.0 by @fontawesome -https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. ··· 108 115 height={size} 109 116 viewBox="0 0 32 32" 110 117 fill="none" 111 - stroke="none"> 118 + stroke="none" 119 + style={aviStyle}> 112 120 <Rect width="32" height="32" rx="4" fill="#0070FF" /> 113 121 <Path 114 122 d="M13.5 7.25C13.5 6.55859 14.0586 6 14.75 6C20.9648 6 26 11.0352 26 17.25C26 17.9414 25.4414 18.5 24.75 18.5C24.0586 18.5 23.5 17.9414 23.5 17.25C23.5 12.418 19.582 8.5 14.75 8.5C14.0586 8.5 13.5 7.94141 13.5 7.25ZM8.36719 14.6172L12.4336 18.6836L13.543 17.5742C13.5156 17.4727 13.5 17.3633 13.5 17.25C13.5 16.5586 14.0586 16 14.75 16C15.4414 16 16 16.5586 16 17.25C16 17.9414 15.4414 18.5 14.75 18.5C14.6367 18.5 14.5312 18.4844 14.4258 18.457L13.3164 19.5664L17.3828 23.6328C17.9492 24.1992 17.8438 25.1484 17.0977 25.4414C16.1758 25.8008 15.1758 26 14.125 26C9.63672 26 6 22.3633 6 17.875C6 16.8242 6.19922 15.8242 6.5625 14.9023C6.85547 14.1602 7.80469 14.0508 8.37109 14.6172H8.36719ZM14.75 9.75C18.8906 9.75 22.25 13.1094 22.25 17.25C22.25 17.9414 21.6914 18.5 21 18.5C20.3086 18.5 19.75 17.9414 19.75 17.25C19.75 14.4883 17.5117 12.25 14.75 12.25C14.0586 12.25 13.5 11.6914 13.5 11C13.5 10.3086 14.0586 9.75 14.75 9.75Z" ··· 127 135 height={size} 128 136 viewBox="0 0 32 32" 129 137 fill="none" 130 - stroke="none"> 138 + stroke="none" 139 + style={aviStyle}> 131 140 <Path 132 141 d="M28 0H4C1.79086 0 0 1.79086 0 4V28C0 30.2091 1.79086 32 4 32H28C30.2091 32 32 30.2091 32 28V4C32 1.79086 30.2091 0 28 0Z" 133 142 fill="#0070FF" ··· 151 160 height={size} 152 161 viewBox="0 0 32 32" 153 162 fill="none" 154 - stroke="none"> 163 + stroke="none" 164 + style={aviStyle}> 155 165 {finalShape === 'square' ? ( 156 166 <Rect 157 167 x="0" ··· 182 192 height={size} 183 193 viewBox="0 0 24 24" 184 194 fill="none" 185 - stroke="none"> 195 + stroke="none" 196 + style={aviStyle}> 186 197 <Circle cx="12" cy="12" r="12" fill="#0070ff" /> 187 198 <Circle cx="12" cy="9.5" r="3.5" fill="#fff" /> 188 199 <Path