fixxxxxxxx
This commit is contained in:
@@ -16,7 +16,6 @@ import { useFriendsPresence } from "@/hooks/roblox/usePresence";
|
||||
|
||||
async function updateOutfit(outfit: { id: number }, acc: { id: number }) {
|
||||
try {
|
||||
// ocbwoy3 stupid idiot for using v3 api
|
||||
const details = (await (
|
||||
await proxyFetch(
|
||||
`https://avatar.roblox.com/v1/outfits/${outfit.id}/details`
|
||||
@@ -24,18 +23,7 @@ async function updateOutfit(outfit: { id: number }, acc: { id: number }) {
|
||||
).json()) as {
|
||||
id: number;
|
||||
name: string;
|
||||
bodyColors: Record<string, string>;
|
||||
scale: Record<string, number>;
|
||||
};
|
||||
|
||||
const detailsV3 = (await (
|
||||
await proxyFetch(
|
||||
`https://avatar.roblox.com/v3/outfits/${outfit.id}/details`
|
||||
)
|
||||
).json()) as {
|
||||
id: number;
|
||||
name: string;
|
||||
assets: any[];
|
||||
assets: Array<{ id: number; meta?: Record<string, unknown> }>;
|
||||
bodyColors: Record<string, string>;
|
||||
scale: Record<string, number>;
|
||||
playerAvatarType: "R6" | "R15";
|
||||
@@ -58,26 +46,44 @@ async function updateOutfit(outfit: { id: number }, acc: { id: number }) {
|
||||
|
||||
// u cant set avatar item scaling/rotation cuz roblox can't make good web apis
|
||||
await proxyFetch(
|
||||
`https://avatar.roblox.com/v1/avatar/set-wearing-assets`,
|
||||
`https://avatar.roblox.com/v2/avatar/set-wearing-assets`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
assetIds: detailsV3.assets.map((a) => a.id).filter(Boolean)
|
||||
assets: details.assets
|
||||
.map((asset) => ({
|
||||
id: asset.id,
|
||||
meta: asset.meta
|
||||
}))
|
||||
.filter((asset) => Boolean(asset.id))
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
await proxyFetch(
|
||||
`https://avatar.roblox.com/v1/avatar/set-player-avatar-type`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
playerAvatarType: detailsV3.playerAvatarType
|
||||
})
|
||||
}
|
||||
);
|
||||
const avatarType =
|
||||
details.playerAvatarType === "R15"
|
||||
? 3
|
||||
: details.playerAvatarType === "R6"
|
||||
? 1
|
||||
: null;
|
||||
|
||||
if (avatarType !== null) {
|
||||
await proxyFetch(
|
||||
`https://avatar.roblox.com/v1/avatar/set-player-avatar-type`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
playerAvatarType: avatarType
|
||||
})
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
await proxyFetch(`https://avatar.roblox.com/v1/avatar/redraw-thumbnail`, {
|
||||
method: "POST"
|
||||
});
|
||||
|
||||
loadThumbnails([
|
||||
{
|
||||
@@ -112,15 +118,15 @@ export const QuickTopUI = React.memo(function () {
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
<div className="z-50 fixed top-4 right-4 p-4 flex gap-2 items-center text-blue/75">
|
||||
<div className="z-50 fixed top-4 right-4 flex gap-2 items-center text-text">
|
||||
<StupidHoverThing text="Change Outfit">
|
||||
<button
|
||||
className="rounded-full bg-crust/50 flex items-center p-2"
|
||||
className="rounded-full bg-surface0/70 ring-1 ring-surface1/60 flex items-center justify-center h-10 w-10 text-text shadow-sm transition hover:bg-surface1/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue/60"
|
||||
onClick={() => {
|
||||
setIsOutfitSelectorVisible((a) => !a);
|
||||
}}
|
||||
>
|
||||
<ShirtIcon />
|
||||
<ShirtIcon className="h-5 w-5" />
|
||||
</button>
|
||||
</StupidHoverThing>
|
||||
|
||||
@@ -131,15 +137,11 @@ export const QuickTopUI = React.memo(function () {
|
||||
: `You have ${robux.toLocaleString()} Robux`
|
||||
}
|
||||
>
|
||||
<div className="rounded-full bg-crust/50 flex items-center p-2">
|
||||
<RobuxIcon className="w-6 h-6" />
|
||||
{robux ? (
|
||||
<p className="pl-1">
|
||||
{robux ? robux.toLocaleString() : "???"}
|
||||
</p>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
<div className="rounded-full bg-surface0/70 ring-1 ring-surface1/60 flex items-center h-10 px-3 gap-2 text-text shadow-sm">
|
||||
<RobuxIcon className="w-5 h-5 text-green" />
|
||||
<p className="text-sm font-super-mono tabular-nums">
|
||||
{robux ? robux.toLocaleString() : "..."}
|
||||
</p>
|
||||
</div>
|
||||
</StupidHoverThing>
|
||||
</div>
|
||||
@@ -149,12 +151,15 @@ export const QuickTopUI = React.memo(function () {
|
||||
|
||||
export const QuickTopUILogoPart = React.memo(function () {
|
||||
return (
|
||||
<div className="z-[15] relative top-4 left-4 p-4 flex gap-4 items-center text-blue">
|
||||
<Link href="/" className="-m-1 w-8 h-8">
|
||||
<img src="/icon-512.webp" className="w-8 h-8" alt="" />
|
||||
<div className="z-15 relative top-4 left-4 flex gap-3 items-center rounded-full">
|
||||
<Link
|
||||
href="/"
|
||||
className="flex h-8 w-8 items-center justify-center rounded-full"
|
||||
>
|
||||
<img src="/roblox.png" className="w-6 h-6" alt="" />
|
||||
</Link>
|
||||
<Link href="/" className="mt-2 gap-2 flex items-center">
|
||||
<p>{"ocbwoy3-chan's roblox"}</p>
|
||||
<Link href="/" className="gap-2 flex items-center text-sm font-medium">
|
||||
<p>{"Roblox"}</p>
|
||||
{/* <p className="text-surface2 line-clamp-1">
|
||||
{process.env.NODE_ENV} {process.env.NEXT_PUBLIC_CWD}{" "}
|
||||
{process.env.NEXT_PUBLIC_ARGV0}
|
||||
|
||||
Reference in New Issue
Block a user