From 720c9a6340c28eb2a0b7db7a2ecaaab4aa55f2a5 Mon Sep 17 00:00:00 2001 From: p_craft Date: Thu, 10 Jul 2025 00:17:18 +0900 Subject: [PATCH 1/7] =?UTF-8?q?=E5=9B=9E=E7=AD=94=E3=81=8C=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E3=81=97=E3=81=A6=E3=81=84=E3=81=9F=E3=82=89=E3=81=95?= =?UTF-8?q?=E3=81=95=E3=82=84=E3=81=8B=E3=81=AA=E3=82=A2=E3=83=8B=E3=83=A1?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Room.vue | 32 +++++++++++++++-- src/components/RoomParticipant.vue | 8 ++++- src/components/RoomParticipantCard.vue | 49 ++++++++++++++++++++++---- 3 files changed, 79 insertions(+), 10 deletions(-) diff --git a/src/components/Room.vue b/src/components/Room.vue index 1ddc20b..4fa26b5 100644 --- a/src/components/Room.vue +++ b/src/components/Room.vue @@ -148,8 +148,9 @@ watch( { immediate: true } ); -// --- 全員回答済みなら自動で公開(computedで管理) --- -const isOpen = computed(() => { +// --- 全員回答済みなら自動で公開(ちょっと遅延させて裏面を見せてからめくる) --- +const isOpen = ref(false); +const shouldBeOpen = computed(() => { if (!room.value) return false; const participants = room.value.participants; // 観戦者(isAudience)を除外 @@ -157,6 +158,32 @@ const isOpen = computed(() => { return answerable.length > 0 && answerable.every(p => p.answer !== ''); }); +let isOpenTimeout: ReturnType | null = null; +watch(shouldBeOpen, newValue => { + if (isOpenTimeout) { + clearTimeout(isOpenTimeout); + } + + if (newValue) { + isOpenTimeout = setTimeout(() => { + isOpen.value = true; + }, 600); + } else { + isOpen.value = false; + } +}); + +// --- audience以外のメンバーの回答がすべて一致しているかを判定 --- +const allAnswersMatch = computed(() => { + if (!room.value || !isOpen.value) return false; + const participants = room.value.participants; + // 観戦者(isAudience)を除外し、回答がある参加者のみを取得 + const answerable = participants.filter(p => !p.isAudience && p.answer !== ''); + if (answerable.length < 2) return false; // 2人未満なら一致の概念がない + + const firstAnswer = answerable[0].answer; + return answerable.every(p => p.answer === firstAnswer); +}); diff --git a/src/components/RoomParticipantCard.vue b/src/components/RoomParticipantCard.vue index 6543836..78995e5 100644 --- a/src/components/RoomParticipantCard.vue +++ b/src/components/RoomParticipantCard.vue @@ -1,10 +1,11 @@ From 6f8aca7dab1fef0bc4b65dd0cfbcd3ca2b28c536 Mon Sep 17 00:00:00 2001 From: p_craft Date: Thu, 10 Jul 2025 00:21:16 +0900 Subject: [PATCH 2/7] fix --- src/components/RoomParticipantCard.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/RoomParticipantCard.vue b/src/components/RoomParticipantCard.vue index 78995e5..77beea8 100644 --- a/src/components/RoomParticipantCard.vue +++ b/src/components/RoomParticipantCard.vue @@ -66,7 +66,7 @@ const cardClass = computed(() => { .card-match-enter-from, .card-match-leave-to { - transform: rotateY(540deg); /* 5倍多く回転 (90deg × 6 = 540deg) */ + transform: rotateY(calc(90deg * 6)); } .card-match-enter-active { @@ -74,9 +74,6 @@ const cardClass = computed(() => { } @keyframes matchReveal { - /* 0% { - transform: rotateY(450deg) scale(1); - } */ 0% { transform: rotateY(0deg) scale(1); } From 2b7fe652ed656fd73ea9d23e1d3f9d86dd7a6c05 Mon Sep 17 00:00:00 2001 From: p_craft / kamikuzu <35532793+ef81sp@users.noreply.github.com> Date: Thu, 10 Jul 2025 00:23:24 +0900 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BD=99=E8=A8=88=E3=81=AA=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=88=E3=82=92=E6=B6=88=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/components/RoomParticipantCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/RoomParticipantCard.vue b/src/components/RoomParticipantCard.vue index 77beea8..ee6cffb 100644 --- a/src/components/RoomParticipantCard.vue +++ b/src/components/RoomParticipantCard.vue @@ -1,5 +1,5 @@