switched theme
This commit is contained in:
25
app/api/user/authenticated/route.ts
Normal file
25
app/api/user/authenticated/route.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { type NextRequest, NextResponse } from "next/server"
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const { searchParams } = new URL(request.url);
|
||||
const apiUrl = "https://users.roblox.com/v1/users/authenticated";
|
||||
|
||||
const url = `${apiUrl}?${searchParams.toString()}`;
|
||||
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
headers: {
|
||||
"User-Agent": "OCbwoy3ChanAI/1.0",
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"Content-Type": "application/json;charset=UTF-8",
|
||||
"Cookie": request.headers.get("Authorization") || "",
|
||||
},
|
||||
});
|
||||
|
||||
return NextResponse.json(await response.json());
|
||||
} catch (error) {
|
||||
console.error("Error proxying request:", error);
|
||||
return NextResponse.json({ error: "Internal Server Error" });
|
||||
}
|
||||
}
|
||||
23
app/api/user/route.ts
Normal file
23
app/api/user/route.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const u = new URL(request.url);
|
||||
const apiUrl = `https://users.roblox.com/v1/users/${u.searchParams.get("id")}`;
|
||||
|
||||
try {
|
||||
const response = await fetch(apiUrl, {
|
||||
headers: {
|
||||
"User-Agent": "OCbwoy3ChanAI/1.0",
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"Content-Type": "application/json;charset=UTF-8",
|
||||
"Cookie": request.headers.get("Authorization") || "",
|
||||
},
|
||||
});
|
||||
|
||||
return NextResponse.json(await response.json());
|
||||
} catch (error) {
|
||||
console.error("Error proxying request:", error);
|
||||
return NextResponse.json({ error: "Internal Server Error" });
|
||||
}
|
||||
}
|
||||
@@ -8,31 +8,42 @@ body {
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
--foreground: 0 0% 3.9%;
|
||||
--card: 0 0% 100%;
|
||||
--card-foreground: 0 0% 3.9%;
|
||||
--popover: 0 0% 100%;
|
||||
--popover-foreground: 0 0% 3.9%;
|
||||
--primary: 0 0% 9%;
|
||||
--primary-foreground: 0 0% 98%;
|
||||
--secondary: 0 0% 96.1%;
|
||||
--secondary-foreground: 0 0% 9%;
|
||||
--muted: 0 0% 96.1%;
|
||||
--muted-foreground: 0 0% 45.1%;
|
||||
--accent: 0 0% 96.1%;
|
||||
--accent-foreground: 0 0% 9%;
|
||||
--destructive: 0 84.2% 60.2%;
|
||||
--destructive-foreground: 0 0% 98%;
|
||||
--border: 0 0% 89.8%;
|
||||
--input: 0 0% 89.8%;
|
||||
--ring: 0 0% 3.9%;
|
||||
--chart-1: 12 76% 61%;
|
||||
--chart-2: 173 58% 39%;
|
||||
--chart-3: 197 37% 24%;
|
||||
--chart-4: 43 74% 66%;
|
||||
--chart-5: 27 87% 67%;
|
||||
--background: 240 21.052631735801697% 14.901961386203766%; /* base */
|
||||
--foreground: 226 63.93442749977112% 88.03921341896057%; /* text */
|
||||
|
||||
--muted: 237 16.239316761493683% 22.94117659330368%; /* surface0 */
|
||||
--muted-foreground: 227 35.29411852359772% 80.0000011920929%; /* subtext1 */
|
||||
|
||||
--popover: 240 21.052631735801697% 14.901961386203766%; /* base */
|
||||
--popover-foreground: 226 63.93442749977112% 88.03921341896057%; /* text */
|
||||
|
||||
--card: 240 21.052631735801697% 14.901961386203766%; /* base */
|
||||
--card-foreground: 226 63.93442749977112% 88.03921341896057%; /* text */
|
||||
|
||||
--border: 234 13.20754736661911% 31.176471710205078%; /* surface1 */
|
||||
--input: 234 13.20754736661911% 31.176471710205078%; /* surface1 */
|
||||
|
||||
--primary: 217 91.86992049217224% 75.88235139846802%; /* accent - Blue */
|
||||
--primary-foreground: 240 21.052631735801697% 14.901961386203766%; /* base */
|
||||
|
||||
--secondary: 237 16.239316761493683% 22.94117659330368%; /* surface0 */
|
||||
--secondary-foreground: 226 63.93442749977112% 88.03921341896057%; /* text */
|
||||
|
||||
--accent: 237 16.239316761493683% 22.94117659330368%; /* surface0 */
|
||||
--accent-foreground: 226 63.93442749977112% 88.03921341896057%; /* text */
|
||||
|
||||
--destructive: 343 81.25% 74.90196228027344%; /* red */
|
||||
--destructive-foreground: 240 21.311475336551666% 11.96078434586525%; /* mantle */
|
||||
|
||||
--ring: 226 63.93442749977112% 88.03921341896057%; /* text */
|
||||
|
||||
--radius: 0.5rem;
|
||||
|
||||
--chart-1: 343 81.25% 74.90196228027344%; /* red */
|
||||
--chart-2: 170 57.35294222831726% 73.33333492279053%; /* teal */
|
||||
--chart-3: 217 91.86992049217224% 75.88235139846802%; /* blue */
|
||||
--chart-4: 41 86.04651093482971% 83.13725590705872%; /* yellow */
|
||||
--chart-5: 115 54.09836173057556% 76.07843279838562%; /* green */
|
||||
--sidebar-background: 0 0% 98%;
|
||||
--sidebar-foreground: 240 5.3% 26.1%;
|
||||
--sidebar-primary: 240 5.9% 10%;
|
||||
@@ -42,40 +53,6 @@ body {
|
||||
--sidebar-border: 220 13% 91%;
|
||||
--sidebar-ring: 217.2 91.2% 59.8%;
|
||||
}
|
||||
.dark {
|
||||
--background: 0 0% 3.9%;
|
||||
--foreground: 0 0% 98%;
|
||||
--card: 0 0% 3.9%;
|
||||
--card-foreground: 0 0% 98%;
|
||||
--popover: 0 0% 3.9%;
|
||||
--popover-foreground: 0 0% 98%;
|
||||
--primary: 0 0% 98%;
|
||||
--primary-foreground: 0 0% 9%;
|
||||
--secondary: 0 0% 14.9%;
|
||||
--secondary-foreground: 0 0% 98%;
|
||||
--muted: 0 0% 14.9%;
|
||||
--muted-foreground: 0 0% 63.9%;
|
||||
--accent: 0 0% 14.9%;
|
||||
--accent-foreground: 0 0% 98%;
|
||||
--destructive: 0 62.8% 30.6%;
|
||||
--destructive-foreground: 0 0% 98%;
|
||||
--border: 0 0% 14.9%;
|
||||
--input: 0 0% 14.9%;
|
||||
--ring: 0 0% 83.1%;
|
||||
--chart-1: 220 70% 50%;
|
||||
--chart-2: 160 60% 45%;
|
||||
--chart-3: 30 80% 55%;
|
||||
--chart-4: 280 65% 60%;
|
||||
--chart-5: 340 75% 55%;
|
||||
--sidebar-background: 240 5.9% 10%;
|
||||
--sidebar-foreground: 240 4.8% 95.9%;
|
||||
--sidebar-primary: 224.3 76.3% 48%;
|
||||
--sidebar-primary-foreground: 0 0% 100%;
|
||||
--sidebar-accent: 240 3.7% 15.9%;
|
||||
--sidebar-accent-foreground: 240 4.8% 95.9%;
|
||||
--sidebar-border: 240 3.7% 15.9%;
|
||||
--sidebar-ring: 217.2 91.2% 59.8%;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
|
||||
10
app/page.tsx
10
app/page.tsx
@@ -1,11 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { GameCard } from "@/components/gameCard";
|
||||
import { HomeLoggedInHeader } from "@/components/loggedInHeader";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
getOmniRecommendationsHome,
|
||||
OmniRecommendation,
|
||||
} from "@/lib/omniRecommendation";
|
||||
import { getCookie } from "@/lib/roblox";
|
||||
import { loadThumbnails, ThumbnailRequest } from "@/lib/thumbnailLoader";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
@@ -27,8 +29,8 @@ export default function Home() {
|
||||
})
|
||||
})
|
||||
});
|
||||
loadThumbnails(th).catch(a=>console.error(a))
|
||||
setRec(r);
|
||||
loadThumbnails(th).catch(a=>console.error(a))
|
||||
})();
|
||||
}, []);
|
||||
|
||||
@@ -50,9 +52,9 @@ export default function Home() {
|
||||
|
||||
return (
|
||||
<div className="overflow-scroll no-scrollbar w-screen max-h-screen h-screen">
|
||||
{"roblox x next.js when"}
|
||||
<br/>
|
||||
{"experimental (functional) roblox.com clone"}
|
||||
<HomeLoggedInHeader/>
|
||||
{"roblox in nextjs"}<br/>
|
||||
<span className="font-mono">{"require(\"@/lib/roblox\").getCookie().length = "}{getCookie().length}{";"}</span>
|
||||
<div className="p-4 space-y-8 no-scrollbar">
|
||||
{rec.sorts
|
||||
.filter((a) => SORTS_ALLOWED_IDS.includes(a.topicId))
|
||||
|
||||
Reference in New Issue
Block a user