From f36310c727ea8d9c071001b1a91c133555807cd1 Mon Sep 17 00:00:00 2001 From: Andres Date: Sat, 10 May 2025 19:24:37 +0200 Subject: [PATCH] add commentators list --- bun.lock | 3 +++ package.json | 1 + .../obs-control-panel/_components/obs-control-panel-client.tsx | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bun.lock b/bun.lock index a925d69..3219264 100644 --- a/bun.lock +++ b/bun.lock @@ -77,6 +77,7 @@ "tailwind-merge": "^3.1.0", "tw-animate-css": "^1.2.5", "usehooks-ts": "^3.1.1", + "uuid": "^11.1.0", "vaul": "^1.1.2", "zod": "^3.24.2", }, @@ -1124,6 +1125,8 @@ "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], + "uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="], + "vaul": ["vaul@1.1.2", "", { "dependencies": { "@radix-ui/react-dialog": "^1.1.1" }, "peerDependencies": { "react": "^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc" } }, "sha512-ZFkClGpWyI2WUQjdLJ/BaGuV6AVQiJ3uELGk3OYtP+B6yCO7Cmn9vPFXVJkRaGkOJu3m8bQMgtyzNHixULceQA=="], "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], diff --git a/package.json b/package.json index 8385ad5..2b60d78 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "tailwind-merge": "^3.1.0", "tw-animate-css": "^1.2.5", "usehooks-ts": "^3.1.1", + "uuid": "^11.1.0", "vaul": "^1.1.2", "zod": "^3.24.2" }, diff --git a/src/app/(home)/admin/stream/obs-control-panel/_components/obs-control-panel-client.tsx b/src/app/(home)/admin/stream/obs-control-panel/_components/obs-control-panel-client.tsx index 20e553c..2fa7bf2 100644 --- a/src/app/(home)/admin/stream/obs-control-panel/_components/obs-control-panel-client.tsx +++ b/src/app/(home)/admin/stream/obs-control-panel/_components/obs-control-panel-client.tsx @@ -28,6 +28,7 @@ import { useEffect, useMemo, useState } from 'react' import { useForm } from 'react-hook-form' import { toast } from 'sonner' import { useLocalStorage } from 'usehooks-ts' +import { v4 } from 'uuid' import { PlayerSelector } from './player-selector' const obs = new OBSController() @@ -397,7 +398,7 @@ function Settings() { if (newCommentatorName.trim()) { setCommentators([ ...commentators, - { id: crypto.randomUUID(), name: newCommentatorName.trim() }, + { id: v4(), name: newCommentatorName.trim() }, ]) setNewCommentatorName('') }