Commit d0f9c601 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat: add replied to post or comment to reply element

parent 8208ab67
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ class EpisodeComment extends UuidEntity
     */
    protected ?array $replies = null;

    protected bool $has_replies = false;

    /**
     * @var string[]
     */
@@ -115,6 +117,11 @@ class EpisodeComment extends UuidEntity
        return $this->replies;
    }

    public function getHasReplies(): bool
    {
        return $this->getReplies() !== null;
    }

    public function getReplyToComment(): ?self
    {
        if ($this->in_reply_to_id === null) {
+6 −0
Original line number Diff line number Diff line
@layer components {
  .post-content {
    & a {
      @apply text-sm font-semibold text-pine-600 hover:underline;
    }
  }

  .ring-castopod {
    @apply outline-none ring-2 ring-pine-500 ring-offset-2 ring-offset-pine-100;
  }
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
@import "./radioBtn.css";
@import "./switch.css";
@import "./charts.css";
@import "./post.css";
@import "./radioToggler.css";
@import "./formInputTabs.css";
@import "./stickyHeader.css";

app/Resources/styles/post.css

deleted100644 → 0
+0 −22
Original line number Diff line number Diff line
@layer components {
  .post-content {
    & a {
      @apply text-sm font-semibold text-pine-600 hover:underline;
    }
  }

  .post-replies > * {
    @apply relative;

    & img {
      @apply z-20;
    }

    &:not(:last-child)::before {
      @apply absolute z-10 h-full bg-gray-300 top-8;
      content: "";
      left: 3rem;
      width: 2px;
    }
  }
}
+2 −2
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@
) ?></label>
<small class="max-w-md mb-2 text-gray-600"><?= lang('Episode.publish_form.post_hint') ?></small>
<div class="mb-8 overflow-hidden bg-white shadow-md rounded-xl">
    <div class="flex px-4 py-3">
        <img src="<?= $podcast->actor->avatar_image_url ?>" alt="<?= $podcast->actor->display_name ?>" class="w-10 h-10 mr-2 rounded-full" />
    <div class="flex px-4 py-3 gap-x-2">
        <img src="<?= $podcast->actor->avatar_image_url ?>" alt="<?= $podcast->actor->display_name ?>" class="w-10 h-10 rounded-full" />
        <div class="flex flex-col min-w-0">
            <p class="flex items-baseline min-w-0">
                <span class="mr-2 font-semibold truncate"><?= $podcast->actor->display_name ?></span>
Loading