]> Untitled Git - lemmy-ui.git/commitdiff
fix: Restore icon avatars; make smaller and roundrect
authorJay Sitter <jay@jaysitter.com>
Mon, 26 Jun 2023 22:07:10 +0000 (18:07 -0400)
committerJay Sitter <jay@jaysitter.com>
Mon, 26 Jun 2023 23:04:13 +0000 (19:04 -0400)
src/assets/css/main.css
src/shared/components/common/pictrs-image.tsx
src/shared/components/post/post-listing.tsx
src/shared/components/post/post-listings.tsx

index b917b3ec73317c4c86d4b57ab0288646f3c3da44..41ec231b873cb4c400811721d24aab50f931c433 100644 (file)
@@ -360,8 +360,9 @@ br.big {
 }
 
 .img-icon {
-  width: 2rem;
-  height: 2rem;
+  width: calc(var(--bs-body-line-height) * 1em);
+  height: calc(var(--bs-body-line-height) * 1em);
+  border-radius: 0.25em;
 }
 
 .tribute-container ul {
index 31fb12299663f27ec9df5d43dec9cf0966783d1e..9c14aefc483d3728252146b5410e95132285e860 100644 (file)
@@ -39,7 +39,7 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
             "img-expanded slight-radius":
               !this.props.thumbnail && !this.props.icon,
             "img-blur": this.props.thumbnail && this.props.nsfw,
-            "rounded-circle img-cover img-icon me-2": this.props.icon,
+            "img-cover img-icon me-1": this.props.icon,
             "ms-2 mb-0 rounded-circle img-cover avatar-overlay":
               this.props.iconOverlay,
             "avatar-pushup": this.props.pushup,
index 3883b9a1111a6d0e3a60b597740c6cdcaeb33079..a7064f05f008eef833d468cd37f5a070ec2a6cf6 100644 (file)
@@ -106,7 +106,7 @@ interface PostListingProps {
   siteLanguages: number[];
   showCommunity?: boolean;
   showBody?: boolean;
-  hideAvatars?: boolean;
+  smallAvatars?: boolean;
   hideImage?: boolean;
   enableDownvotes?: boolean;
   enableNsfw?: boolean;
@@ -398,10 +398,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     const post_view = this.postView;
     return (
       <span className="small">
-        <PersonListing
-          person={post_view.creator}
-          hideAvatar={this.props.hideAvatars}
-        />
+        <PersonListing person={post_view.creator} />
         {this.creatorIsMod_ && (
           <span className="mx-1 badge text-bg-light">
             {I18NextService.i18n.t("mod")}
@@ -421,10 +418,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
           <>
             {" "}
             {I18NextService.i18n.t("to")}{" "}
-            <CommunityLink
-              community={post_view.community}
-              hideAvatar={this.props.hideAvatars}
-            />
+            <CommunityLink community={post_view.community} />
           </>
         )}
         {post_view.post.language_id !== 0 && (
index 29bbf588ed9b2d3d4d696dee57be0f9345c28b1f..1fdaeba2ca40f1aa1f45bbdae292f3c3a908d5cc 100644 (file)
@@ -76,7 +76,6 @@ export class PostListings extends Component<PostListingsProps, any> {
                 showCommunity={this.props.showCommunity}
                 enableDownvotes={this.props.enableDownvotes}
                 enableNsfw={this.props.enableNsfw}
-                hideAvatars={true}
                 viewOnly={this.props.viewOnly}
                 allLanguages={this.props.allLanguages}
                 siteLanguages={this.props.siteLanguages}