changed colors

This commit is contained in:
Polaris
2024-08-25 23:53:37 -04:00
parent 08cc4ddc88
commit ca85649057
2 changed files with 16 additions and 33 deletions

View File

@ -43,56 +43,56 @@ export default async function Share({
); );
return ( return (
<div className="min-h-screen bg-primary"> <div className="min-h-screen bg-primary-foreground">
<div className="flex flex-col items-center justify-center space-y-4 p-4 dark:text-black"> <div className="flex flex-col items-center justify-center space-y-4 p-4 dark:text-black">
<div className="w-full rounded-sm bg-primary-foreground p-4 dark:text-black"> <div className="w-full rounded-sm bg-gray-400 p-4 dark:bg-red-700 dark:text-black">
{chunithm.map((song) => ( {chunithm.map((song) => (
<div key={song.id} className="w-full"> <div key={song.id} className="w-full">
<span className="text-center text-xl font-bold text-primary"> <span className="text-center text-xl font-bold text-primary text-white">
Song: {song.title} Song: {song.title}
</span> </span>
</div> </div>
))} ))}
</div> </div>
<div className="w-full rounded-sm bg-primary-foreground p-4"> <div className="d w-full rounded-sm bg-gray-400 bg-primary-foreground p-4 dark:bg-red-700">
{chunithm.map((song) => ( {chunithm.map((song) => (
<div key={song.id} className="w-full"> <div key={song.id} className="w-full">
<span className="text-center text-xl font-bold text-primary"> <span className="text-xl font-bold text-primary text-white">
Artist: {song.artist} Artist: {song.artist}
</span> </span>
</div> </div>
))} ))}
</div> </div>
<div className="w-full rounded-sm bg-primary-foreground p-4"> <div className="w-full rounded-sm bg-gray-400 bg-primary-foreground p-4 dark:bg-red-700">
{chunithm.map((song) => ( {chunithm.map((song) => (
<div key={song.id} className="w-full"> <div key={song.id} className="w-full">
<span className="text-center text-xl font-bold text-primary"> <span className="text-center text-xl font-bold text-primary text-white">
Score: {song.score?.toLocaleString()} Score: {song.score?.toLocaleString()}
</span> </span>
</div> </div>
))} ))}
</div> </div>
<div className="w-full rounded-sm bg-primary-foreground p-4"> <div className="w-full rounded-sm bg-gray-400 bg-primary-foreground p-4 dark:bg-red-700">
{chunithm.map((song) => ( {chunithm.map((song) => (
<div key={song.id} className="w-full"> <div key={song.id} className="w-full">
<span className="text-center text-xl font-bold text-primary"> <span className="text-center text-xl font-bold text-primary text-white">
Rank: {getGrade(song.score ?? 0)} Rank: {getGrade(song.score ?? 0)}
</span> </span>
</div> </div>
))} ))}
</div> </div>
<div className="w-full rounded-sm bg-primary-foreground p-4"> <div className="w-full rounded-sm bg-gray-400 bg-primary-foreground p-4 dark:bg-red-700">
{chunithm.map((song) => ( {chunithm.map((song) => (
<div key={song.id} className="w-full"> <div key={song.id} className="w-full">
<div className="flex items-center justify-start"> <div className="flex items-center justify-start">
<span className="text-xl font-bold text-primary"> <span className="text-xl font-bold text-primary text-white">
{song.isFullCombo ? `FULL COMBO! ${song.maxCombo}` : ""} {song.isFullCombo ? `FULL COMBO! ${song.maxCombo}` : ""}
</span> </span>
{!song.isFullCombo && ( {!song.isFullCombo && (
<span className="text-xl font-bold text-primary"> <span className="text-xl font-bold text-primary text-white">
Max combo: {song.maxCombo} Max combo: {song.maxCombo}
</span> </span>
)} )}
@ -104,17 +104,17 @@ export default async function Share({
{chunithm.map((song) => ( {chunithm.map((song) => (
<div key={song.id} className="w-full"> <div key={song.id} className="w-full">
<div className="flex flex-col items-center justify-center"> <div className="flex flex-col items-center justify-center">
<span className="text-md w-full rounded-md bg-[#58329F] p-2 text-center font-bold text-primary shadow-[inset_0px_3px_6px_0px_#1a202c]"> <span className="text-md w-full rounded-md bg-[#58329F] p-2 text-center font-bold text-primary text-white shadow-[inset_0px_3px_6px_0px_#1a202c]">
Justice Critcal: {song.judgeCritical! + song.judgeHeaven!} Justice Critcal: {song.judgeCritical! + song.judgeHeaven!}
</span> </span>
<span className="text-md mt-5 w-full rounded-md bg-[#58329F] p-2 text-center font-bold text-primary shadow-[inset_0px_3px_6px_0px_#1a202c]"> <span className="text-md mt-5 w-full rounded-md bg-[#58329F] p-2 text-center font-bold text-primary text-white shadow-[inset_0px_3px_6px_0px_#1a202c]">
Justice: {song.judgeJustice} Justice: {song.judgeJustice}
</span> </span>
<span className="text-md mt-5 w-full rounded-md bg-[#58329F] p-2 text-center font-bold text-primary shadow-[inset_0px_3px_6px_0px_#1a202c]"> <span className="text-md mt-5 w-full rounded-md bg-[#58329F] p-2 text-center font-bold text-primary text-white shadow-[inset_0px_3px_6px_0px_#1a202c]">
Attack: {song.judgeAttack} Attack: {song.judgeAttack}
</span> </span>
<span className="text-md mt-5 w-full rounded-md bg-[#58329F] p-2 text-center font-bold text-primary shadow-[inset_0px_3px_6px_0px_#1a202c]"> <span className="text-md mt-5 w-full rounded-md bg-[#58329F] p-2 text-center font-bold text-primary text-white shadow-[inset_0px_3px_6px_0px_#1a202c]">
Miss: {song.judgeGuilty} Miss: {song.judgeGuilty}
</span> </span>
</div> </div>

View File

@ -48,22 +48,5 @@ export async function shareScore(token: string) {
}; };
} }
// Check if token has expired
// const tokenAge =
// new Date().getTime() - new Date(PublicPage.createdAt).getTime();
// const tokenAgeLimit = 1000 * 60 * 60 * 24; // 1 day in milliseconds
// if (tokenAge > tokenAgeLimit) {
// await daphnis.linkSharingToken.update({
// where: {
// token,
// },
// data: {
// tokenExpiredAt: new Date(),
// },
// });
// redirect("/");
// }
return { success: true }; return { success: true };
} }