Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions app/blocks/gaming/gaming.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import DifficultySelect from "@/components/ui/8bit/blocks/difficulty-select";
import GameOver from "@/components/ui/8bit/blocks/game-over";
import MainMenu from "@/components/ui/8bit/blocks/main-menu";
import PauseMenu from "@/components/ui/8bit/blocks/pause-menu";
import PlayerProfileCard from "@/components/ui/8bit/blocks/player-profile-card";
import EnemyHealthDisplay from "@/components/ui/8bit/enemy-health-display";
import HealthBar from "@/components/ui/8bit/health-bar";
import ManaBar from "@/components/ui/8bit/mana-bar";
Expand Down Expand Up @@ -279,6 +280,75 @@ export default function GamingBlocks() {
</div>
</div>

<div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px]">
<div className="flex flex-col md:flex-row gap-2 items-center justify-between">
<h2 className="text-sm text-muted-foreground sm:pl-3">
Player Profile Card
</h2>

<div className="flex flex-col md:flex-row items-center gap-2">
<CopyCommandButton
command="pnpm dlx shadcn@latest add @8bitcn/player-profile-card"
copyCommand="pnpm dlx shadcn@latest add @8bitcn/player-profile-card"
/>
<OpenInV0Button name="8bit-player-profile-card" className="w-fit" />
Copy link

@cubic-dev-ai cubic-dev-ai bot Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenInV0Button name points to /r/8bit-player-profile-card.json, which does not exist; use "player-profile-card" to match the available JSON.

Prompt for AI agents
Address the following comment on app/blocks/gaming/gaming.tsx at line 294:

<comment>OpenInV0Button name points to /r/8bit-player-profile-card.json, which does not exist; use &quot;player-profile-card&quot; to match the available JSON.</comment>

<file context>
@@ -279,6 +280,75 @@ export default function GamingBlocks() {
+              command=&quot;pnpm dlx shadcn@latest add @8bitcn/player-profile-card&quot;
+              copyCommand=&quot;pnpm dlx shadcn@latest add @8bitcn/player-profile-card&quot;
+            /&gt;
+            &lt;OpenInV0Button name=&quot;8bit-player-profile-card&quot; className=&quot;w-fit&quot; /&gt;
+          &lt;/div&gt;
+        &lt;/div&gt;
</file context>
Suggested change
<OpenInV0Button name="8bit-player-profile-card" className="w-fit" />
<OpenInV0Button name="player-profile-card" className="w-fit" />
Fix with Cubic

</div>
</div>

<div className="py-14 flex flex-col gap-6">
<div className="flex flex-col gap-6 w-full max-w-4xl mx-auto">
{/* Default Variant */}
<div className="space-y-4">
<p className="text-sm text-muted-foreground text-center">
Default Variant
</p>
<div className="flex justify-center">
<PlayerProfileCard
playerName="OrcDev"
avatarSrc="/avatars/orcdev.jpeg"
avatarFallback="OD"
level={25}
stats={{
health: { current: 850, max: 1000 },
mana: { current: 320, max: 400 },
experience: { current: 7500, max: 10000 },
}}
playerClass="Web Dev Warrior"
/>
</div>
</div>

{/* Custom Stats Example */}
<div className="space-y-4">
<p className="text-sm text-muted-foreground text-center">
Custom Stats Example
</p>
<div className="flex justify-center">
<PlayerProfileCard
playerName="Sir Knight"
avatarFallback="SK"
level={42}
stats={{
health: { current: 1200, max: 1500 },
mana: { current: 500, max: 600 },
experience: { current: 15000, max: 20000 },
}}
playerClass="Fighter"
customStats={[
{
label: "Stamina",
value: 72,
max: 100,
color: "bg-green-500",
},
]}
/>
</div>
</div>
</div>
</div>
</div>

<div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px]">
<div className="flex flex-col md:flex-row gap-2 items-center justify-between">
<h2 className="text-sm text-muted-foreground sm:pl-3">Leaderboard</h2>
Expand Down
96 changes: 96 additions & 0 deletions app/blocks/player-profile/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import PlayerProfileCard from "@/components/ui/8bit/blocks/player-profile-card";

import CopyCommandButton from "../../docs/components/copy-command-button";
import { OpenInV0Button } from "../../docs/components/open-in-v0-button";

export default function PlayerProfilePage() {
return (
<div className="container mx-auto py-8">
<div className="flex flex-col gap-8">
<div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px]">
<div className="flex flex-col md:flex-row gap-2 items-center justify-between">
<h2 className="text-sm text-muted-foreground sm:pl-3">
Player Profile Card
</h2>

<div className="flex flex-col md:flex-row items-center gap-2">
<CopyCommandButton
command="pnpm dlx shadcn@latest add @8bitcn/player-profile-card"
copyCommand="pnpm dlx shadcn@latest add @8bitcn/player-profile-card"
/>
<OpenInV0Button
name="8bit-player-profile-card"
className="w-fit"
/>
</div>
</div>

<div className="py-14 flex flex-col gap-6">
<div className="flex flex-col gap-6 w-full max-w-4xl mx-auto">
{/* Default Variant */}
<div className="space-y-4">
<p className="text-sm text-muted-foreground text-center">
Default Variant
</p>
<div className="flex justify-center">
<PlayerProfileCard
playerName="OrcDev"
avatarSrc="/avatars/orcdev.jpeg"
avatarFallback="OD"
level={25}
stats={{
health: { current: 850, max: 1000 },
mana: { current: 320, max: 400 },
experience: { current: 7500, max: 10000 },
}}
playerClass="Pixel Warrior"
/>
</div>
</div>

{/* Custom Stats Example */}
<div className="space-y-4">
<p className="text-sm text-muted-foreground text-center">
Custom Stats Example
</p>
<div className="flex justify-center">
<PlayerProfileCard
playerName="Dragon Slayer"
avatarFallback="DS"
level={42}
stats={{
health: { current: 1200, max: 1500 },
mana: { current: 500, max: 600 },
experience: { current: 15000, max: 20000 },
}}
playerClass="Dragon Slayer"
customStats={[
{
label: "Strength",
value: 95,
max: 100,
color: "bg-red-500",
},
{
label: "Defense",
value: 88,
max: 100,
color: "bg-blue-500",
},
{
label: "Speed",
value: 72,
max: 100,
color: "bg-green-500",
},
]}
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
}
Loading