]> Untitled Git - lemmy.git/commitdiff
Iframely card now opens embed on title if available.
authorDessalines <tyhou13@gmx.com>
Sun, 8 Mar 2020 01:01:31 +0000 (20:01 -0500)
committerDessalines <tyhou13@gmx.com>
Sun, 8 Mar 2020 01:01:31 +0000 (20:01 -0500)
ui/src/components/iframely-card.tsx

index 0d56a0b6bfd5e1b780d68d5278a1e2358ab986cc..3a89023f5061a61ac18743ae79ac843a55a1d9da 100644 (file)
@@ -34,11 +34,21 @@ export class IFramelyCard extends Component<
               <div class="col-12">
                 <div class="card-body">
                   <h5 class="card-title d-inline">
-                    <span>
-                      <a class="text-body" target="_blank" href={post.url}>
+                    {post.embed_html ? (
+                      <span
+                        class="unselectable pointer"
+                        onClick={linkEvent(this, this.handleIframeExpand)}
+                        data-tippy-content={i18n.t('expand_here')}
+                      >
                         {post.embed_title}
-                      </a>
-                    </span>
+                      </span>
+                    ) : (
+                      <span>
+                        <a class="text-body" target="_blank" href={post.url}>
+                          {post.embed_title}
+                        </a>
+                      </span>
+                    )}
                   </h5>
                   <span class="d-inline-block ml-2 mb-2 small text-muted">
                     <a