From 3e593402ba12c321477621a4f27aadbeef323db1 Mon Sep 17 00:00:00 2001
From: avelous
Date: Sun, 25 Feb 2024 22:03:49 +0100
Subject: [PATCH] open pukwallet as button, display results in brute mode, and
some small ui fix
---
.../nextjs/components/dicedemo/Congrats.tsx | 2 +-
packages/nextjs/pages/game/[id].tsx | 50 ++++++++++---------
2 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/packages/nextjs/components/dicedemo/Congrats.tsx b/packages/nextjs/components/dicedemo/Congrats.tsx
index 85b48cc..c01a970 100644
--- a/packages/nextjs/components/dicedemo/Congrats.tsx
+++ b/packages/nextjs/components/dicedemo/Congrats.tsx
@@ -42,7 +42,7 @@ const Congrats = ({
- Click to open your punk wallet
+ Open in punk wallet
diff --git a/packages/nextjs/pages/game/[id].tsx b/packages/nextjs/pages/game/[id].tsx
index fd7057f..bd077b1 100644
--- a/packages/nextjs/pages/game/[id].tsx
+++ b/packages/nextjs/pages/game/[id].tsx
@@ -246,14 +246,14 @@ function GamePage() {
if (game) {
return (
-
+
-
-
- {isAdmin && (
+
+ {isAdmin && (
+
Copy Invite Url
@@ -329,9 +329,8 @@ function GamePage() {
)}
*/}
- )}
-
- {isAdmin && (
+ )
+
Status: {game.status}
@@ -344,8 +343,6 @@ function GamePage() {
checked={game?.status == "ongoing"}
/>
- )}
- {isAdmin && (
Mode: {game.mode}
@@ -388,20 +385,19 @@ function GamePage() {
+
+ {screenwidth <= 768 && (
+
+
+
PRIVATE KEY
+
+
+ {Object.values(game?.hiddenPrivateKey)}
+
+
)}
-
- {screenwidth <= 768 && isAdmin && (
-
-
-
PRIVATE KEY
-
-
- {Object.values(game?.hiddenPrivateKey)}
-
-
- )}
-
+ )}
{game.winner && (
Winner
@@ -482,6 +478,14 @@ function GamePage() {
{game.mode === "auto" ? " Auto Roll" : game.mode === "brute" ? "Brute Roll" : "Roll"}
+ {game.mode == "brute" && (
+
+
+ Result:
+ {rolledResult.length > 0 && !spinning && {rolledResult.join(" , ")} }
+
+
+ )}
{Object.entries(game.hiddenChars).map(([key], index) =>
rolled ? (
@@ -565,8 +569,8 @@ function GamePage() {
return (
- Oops, it appears that you are attempting to access a game that doesn't exist or to which access
- has been lost. Please return to the homepage to join a new game.
+ Oops, it appears that you are attempting to access a game that doesn't exist or to which access has been
+ lost. Please return to the homepage to join a new game.
);