From 627b2fec0cf5b4392214a1de7853ee711942a9cb Mon Sep 17 00:00:00 2001 From: naokinaokiboo Date: Fri, 2 Feb 2024 22:57:45 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E4=B8=80=E8=A6=A7=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E5=90=84?= =?UTF-8?q?=E3=82=A2=E3=82=AF=E3=82=B7=E3=83=A7=E3=83=B3=E6=95=B0=E3=82=92?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=82=AF=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/user-activity-counts.vue | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/app/javascript/components/user-activity-counts.vue b/app/javascript/components/user-activity-counts.vue index e7e384104a1..d857bcb9aa3 100644 --- a/app/javascript/components/user-activity-counts.vue +++ b/app/javascript/components/user-activity-counts.vue @@ -7,35 +7,50 @@ | 日報 dd.card-counts__item-value( :class='user.report_count == 0 ? "is-empty" : ""') - | {{ user.report_count }} + span(v-if='user.report_count == 0') + | {{ user.report_count }} + a.a-text-link(v-else)(:href='`${user.url}/reports`') + | {{ user.report_count }} .card-counts__item .card-counts__item-inner dt.card-counts__item-label | 提出物 dd.card-counts__item-value( :class='user.product_count == 0 ? "is-empty" : ""') - | {{ user.product_count }} + span(v-if='user.product_count == 0') + | {{ user.product_count }} + a.a-text-link(v-else)(:href='`${user.url}/products`') + | {{ user.product_count }} .card-counts__item .card-counts__item-inner dt.card-counts__item-label | コメント dd.card-counts__item-value( :class='user.comment_count == 0 ? "is-empty" : ""') - | {{ user.comment_count }} + span(v-if='user.comment_count == 0') + | {{ user.comment_count }} + a.a-text-link(v-else)(:href='`${user.url}/comments`') + | {{ user.comment_count }} .card-counts__item .card-counts__item-inner dt.card-counts__item-label | 質問 dd.card-counts__item-value( :class='user.question_count == 0 ? "is-empty" : ""') - | {{ user.question_count }} + span(v-if='user.question_count == 0') + | {{ user.question_count }} + a.a-text-link(v-else)(:href='`${user.url}/questions`') + | {{ user.question_count }} .card-counts__item .card-counts__item-inner dt.card-counts__item-label | 回答 dd.card-counts__item-value( :class='user.answer_count == 0 ? "is-empty" : ""') - | {{ user.answer_count }} + span(v-if='user.answer_count == 0') + | {{ user.answer_count }} + a.a-text-link(v-else)(:href='`${user.url}/answers`') + | {{ user.answer_count }} diff --git a/app/javascript/components/user-activity-counts.vue b/app/javascript/components/user-activity-counts.vue index d857bcb9aa3..ea3a1264806 100644 --- a/app/javascript/components/user-activity-counts.vue +++ b/app/javascript/components/user-activity-counts.vue @@ -1,59 +1,33 @@