2024-07-23 18:35:30 +00:00
|
|
|
"use server";
|
2024-07-23 19:34:53 +00:00
|
|
|
//https://github.com/vercel/next.js/discussions/63862
|
2024-07-23 18:35:30 +00:00
|
|
|
import React from "react";
|
2024-07-26 17:19:37 +00:00
|
|
|
import { AvatarCustomization } from "@/components/(customization)/avatarcustomization/page";
|
2024-07-21 04:02:26 +00:00
|
|
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
2024-07-23 18:35:30 +00:00
|
|
|
import ChunithmScorePlaylog from "@/components/scoreplaylog/page";
|
2024-07-26 17:19:37 +00:00
|
|
|
import { getAllAvatarParts } from "@/components/(customization)/avatarcustomization/actions";
|
|
|
|
import { TrophyCustomization } from "@/components/(customization)/trophycustomization/page";
|
|
|
|
import { getTrophies } from "@/components/(customization)/trophycustomization/actions";
|
2024-07-26 18:08:36 +00:00
|
|
|
import { NameplateCustomization } from "@/components/(customization)/nameplatecustomization/page";
|
|
|
|
import { getNamePlates } from "@/components/(customization)/nameplatecustomization/actions";
|
2024-07-26 19:15:13 +00:00
|
|
|
import { getSystemVoices } from "@/components/(customization)/systemvoicecustomization/actions";
|
|
|
|
import { SystemVoiceCustomization } from "@/components/(customization)/systemvoicecustomization/page";
|
|
|
|
import { MapIconCustomization } from "@/components/(customization)/mapiconcustomization/page";
|
|
|
|
import { getMapIcons } from "@/components/(customization)/mapiconcustomization/actions";
|
2024-08-17 02:00:51 +00:00
|
|
|
import { getUserRatingBaseList } from "@/components/userRatingBaseList/action";
|
2024-08-16 19:08:33 +00:00
|
|
|
import { ChunithmHotPlays } from "@/components/userRatingBaseHotList/page";
|
|
|
|
import { getUserRatingBaseHotList } from "@/components/userRatingBaseHotList/action";
|
2024-08-17 02:00:51 +00:00
|
|
|
import { ChunithmTopPlays } from "@/components/userRatingBaseList/page";
|
2024-08-17 20:25:04 +00:00
|
|
|
import Patcher from "../../../components/patcher/page";
|
2024-08-14 15:52:19 +00:00
|
|
|
|
2024-08-16 19:08:33 +00:00
|
|
|
const getChuniTopPlays = async () => {
|
|
|
|
const topPlays = await getUserRatingBaseList();
|
|
|
|
return { topPlays };
|
|
|
|
};
|
|
|
|
|
|
|
|
const getChuniHotPlays = async () => {
|
|
|
|
const hotRating = await getUserRatingBaseHotList();
|
|
|
|
return { hotRating };
|
2024-08-14 15:52:19 +00:00
|
|
|
};
|
|
|
|
|
2024-07-23 19:34:53 +00:00
|
|
|
const getAvatarHeadAccessories = async () => {
|
2024-07-24 19:18:05 +00:00
|
|
|
const avatarParts = await getAllAvatarParts(2); // head
|
2024-07-23 19:34:53 +00:00
|
|
|
return { avatarParts };
|
|
|
|
};
|
|
|
|
|
|
|
|
const getAvatarFaceAccessories = async () => {
|
2024-07-24 19:18:05 +00:00
|
|
|
const avatarParts = await getAllAvatarParts(3); // face
|
2024-07-23 19:34:53 +00:00
|
|
|
return { avatarParts };
|
|
|
|
};
|
|
|
|
|
|
|
|
const getAvatarItemAccessories = async () => {
|
2024-07-24 19:18:05 +00:00
|
|
|
const avatarParts = await getAllAvatarParts(5); // item_l item_r
|
2024-07-23 19:34:53 +00:00
|
|
|
return { avatarParts };
|
|
|
|
};
|
2024-07-26 18:08:36 +00:00
|
|
|
|
2024-07-23 19:34:53 +00:00
|
|
|
const getAvatarBackAccessories = async () => {
|
2024-07-24 19:18:05 +00:00
|
|
|
const avatarParts = await getAllAvatarParts(7); // back
|
2024-07-23 19:34:53 +00:00
|
|
|
return { avatarParts };
|
|
|
|
};
|
2024-07-26 18:08:36 +00:00
|
|
|
|
2024-07-23 19:34:53 +00:00
|
|
|
const getAvatarWearAccessories = async () => {
|
2024-07-24 19:18:05 +00:00
|
|
|
const avatarParts = await getAllAvatarParts(1); // wear
|
2024-07-23 18:35:30 +00:00
|
|
|
return { avatarParts };
|
|
|
|
};
|
2024-07-26 18:08:36 +00:00
|
|
|
|
2024-07-26 17:19:37 +00:00
|
|
|
const getAllTrophies = async () => {
|
|
|
|
const statictrophies = await getTrophies();
|
|
|
|
return { statictrophies };
|
|
|
|
};
|
2024-07-23 18:35:30 +00:00
|
|
|
|
2024-07-26 18:08:36 +00:00
|
|
|
const getAllNameplates = async () => {
|
|
|
|
const namePlates = await getNamePlates();
|
|
|
|
return { namePlates };
|
|
|
|
};
|
|
|
|
|
2024-07-26 19:15:13 +00:00
|
|
|
const getAllSystemVoices = async () => {
|
|
|
|
const systemVoices = await getSystemVoices();
|
|
|
|
return { systemVoices };
|
|
|
|
};
|
|
|
|
|
|
|
|
const getAllMapIcons = async () => {
|
|
|
|
const mapIcon = await getMapIcons();
|
|
|
|
return { mapIcon };
|
|
|
|
};
|
|
|
|
|
2024-07-23 18:35:30 +00:00
|
|
|
const Page = async () => {
|
2024-07-23 19:34:53 +00:00
|
|
|
const AvatarHeadAccessories = await getAvatarHeadAccessories();
|
|
|
|
const AvatarFaceAccessories = await getAvatarFaceAccessories();
|
|
|
|
const AvatarItemAccessories = await getAvatarItemAccessories();
|
|
|
|
const AvatarBackAccessories = await getAvatarBackAccessories();
|
|
|
|
const AvatarWearAccessories = await getAvatarWearAccessories();
|
2024-07-26 17:19:37 +00:00
|
|
|
const AllPlayerTrophies = await getAllTrophies();
|
2024-07-26 18:08:36 +00:00
|
|
|
const AllStaticNameplates = await getAllNameplates();
|
2024-07-26 19:15:13 +00:00
|
|
|
const AllSystemVoices = await getAllSystemVoices();
|
|
|
|
const AllMapIcons = await getAllMapIcons();
|
2024-08-14 15:52:19 +00:00
|
|
|
|
2024-08-16 19:08:33 +00:00
|
|
|
const TopChuniPlays = await getChuniTopPlays();
|
|
|
|
const HotChuniPlays = await getChuniHotPlays();
|
2024-07-26 18:08:36 +00:00
|
|
|
|
2024-06-29 05:22:22 +00:00
|
|
|
return (
|
2024-08-20 20:49:01 +00:00
|
|
|
<div className="p-3">
|
2024-07-21 15:35:22 +00:00
|
|
|
<Tabs defaultValue="scores">
|
2024-08-17 20:25:04 +00:00
|
|
|
<TabsList className="">
|
2024-07-21 04:02:26 +00:00
|
|
|
<TabsTrigger value="scores">Scores</TabsTrigger>
|
|
|
|
<TabsTrigger value="customize">Customize</TabsTrigger>
|
2024-08-15 03:10:24 +00:00
|
|
|
<TabsTrigger value="TopPlays">Top Plays</TabsTrigger>
|
2024-08-16 19:08:33 +00:00
|
|
|
<TabsTrigger value="HotPlays">Hot Plays</TabsTrigger>
|
2024-08-20 20:49:01 +00:00
|
|
|
<TabsTrigger value="Settings">Settings</TabsTrigger>
|
|
|
|
<TabsTrigger value="Patcher" className="hidden md:block">
|
|
|
|
Patcher
|
|
|
|
</TabsTrigger>
|
2024-07-21 04:02:26 +00:00
|
|
|
</TabsList>
|
2024-08-20 20:49:01 +00:00
|
|
|
<TabsContent className="pt-1" value="scores">
|
2024-07-21 04:02:26 +00:00
|
|
|
<ChunithmScorePlaylog />
|
|
|
|
</TabsContent>
|
2024-07-21 16:19:30 +00:00
|
|
|
<TabsContent value="customize">
|
2024-07-23 03:36:04 +00:00
|
|
|
<div className="p-10">
|
2024-07-23 19:34:53 +00:00
|
|
|
<AvatarCustomization
|
|
|
|
avatarHeadSelectionData={AvatarHeadAccessories}
|
|
|
|
avatarFaceSelectionData={AvatarFaceAccessories}
|
|
|
|
avatarItemSelectionData={AvatarItemAccessories}
|
|
|
|
avatarBackSelectionData={AvatarBackAccessories}
|
|
|
|
avatarWearSelectionData={AvatarWearAccessories}
|
|
|
|
/>
|
2024-07-26 17:19:37 +00:00
|
|
|
<div className="pt-4">
|
2024-07-26 18:08:36 +00:00
|
|
|
<NameplateCustomization
|
|
|
|
playerNamePlateSelectionData={AllStaticNameplates}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="pt-4">
|
|
|
|
<TrophyCustomization
|
|
|
|
playerTrophySelectionData={AllPlayerTrophies}
|
|
|
|
/>
|
2024-07-26 17:19:37 +00:00
|
|
|
</div>
|
2024-07-26 19:15:13 +00:00
|
|
|
<div className="pt-4">
|
|
|
|
<SystemVoiceCustomization
|
|
|
|
playerSystemVoiceSelectionData={AllSystemVoices}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="pt-4">
|
|
|
|
<MapIconCustomization playerMapIconCustomization={AllMapIcons} />
|
|
|
|
</div>
|
2024-07-23 03:36:04 +00:00
|
|
|
</div>
|
2024-07-24 19:18:05 +00:00
|
|
|
<div></div>
|
2024-07-21 16:19:30 +00:00
|
|
|
</TabsContent>
|
2024-08-15 03:10:24 +00:00
|
|
|
<TabsContent value="TopPlays">
|
2024-08-16 19:08:33 +00:00
|
|
|
<ChunithmTopPlays chuniProfileTopPlays={TopChuniPlays} />
|
|
|
|
</TabsContent>
|
|
|
|
<TabsContent value="HotPlays">
|
|
|
|
<ChunithmHotPlays chuniProfileHotPlays={HotChuniPlays} />
|
2024-08-14 15:52:19 +00:00
|
|
|
</TabsContent>
|
2024-08-19 21:46:31 +00:00
|
|
|
<TabsContent className="" value="Patcher">
|
2024-08-17 20:25:04 +00:00
|
|
|
<Patcher />
|
|
|
|
</TabsContent>
|
2024-08-20 20:49:01 +00:00
|
|
|
<TabsContent className="" value="Settings">
|
|
|
|
<Patcher />
|
|
|
|
</TabsContent>
|
2024-07-21 04:02:26 +00:00
|
|
|
</Tabs>
|
2024-06-29 19:26:59 +00:00
|
|
|
</div>
|
2024-06-29 05:22:22 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2024-07-23 18:35:30 +00:00
|
|
|
export default Page;
|