Commit changes

This commit is contained in:
I-Have-An-Issue 2022-10-13 17:36:24 -04:00
parent 0b048a40be
commit 201d64a3fe
No known key found for this signature in database
GPG Key ID: E55435DEA0825091
21 changed files with 35 additions and 75 deletions

View File

@ -14,3 +14,7 @@ export const RANKS = {
4: "Developer",
5: "NO_ACCESS_MAX_PERMISSIONS"
};
export const GAME_VERSIONS = {
0: "2013",
1: "2015"
};

View File

@ -57,7 +57,7 @@ export async function createUser(username, password, lastip) {
rank: 1,
activity: 1,
pendingFriendRequests: [],
bio: ""
bio: "This is my Rowblox profile!"
};
const avatar = {

View File

@ -19,13 +19,13 @@
</a>
<a class="mr-7" href="/games">Games</a>
<a class="mr-7" href="/catalog">Catalog</a>
<a class="mr-7" href="/forums">Forums</a>
<a class="mr-7" href="https://discord.gg/3wRpA5bzU9">Discord</a>
<input class="rounded px-2 border-2 border-grey-300 text-black flex-grow mr-10" type="text" name="search" id="search" placeholder="Search" />
<a class="mr-1 px-2 py-1 flex items-center rounded bg-gradient-to-tr from-blue-700 to-blue-600 outline outline-blue-800 outline-1 shadow-md hover:shadow-xl" href="/my/money">
<img class="h-6 mr-1.5" src="/img/rowbux.png" alt="" />
100
</a>
<div class="border-l-2 border-blue-500 pl-1.5 ml-1 relative inline-block dropdown">
<div class="pl-1.5 ml-1 relative inline-block dropdown">
<button class="hover:text-zinc-200 truncate" href="/my/profile"
>{data.user?.username}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-4 h-4 inline-block">

View File

@ -13,22 +13,12 @@
<p class="mx-2 font-bold text-3xl">Hello, {$page.data.user?.username}!</p>
</div>
<div class="my-2">
<div class="my-2 min-h-[11rem]">
<div class="flex items-center mb-2">
<p class="font-bold text-2xl my-1">Friends</p>
<span class="flex-grow" />
<a class="text-lg px-3 py-0.5 rounded border-2 border-blue-500 shadow-lg cursor-pointer hover:bg-blue-200 text-blue-500" href="/my/friends">View All</a>
</div>
<Friend />
<Friend />
<Friend />
<Friend />
<Friend />
<Friend />
<Friend />
<Friend />
<Friend />
<Friend />
</div>
<div class="my-2">
@ -37,12 +27,4 @@
<span class="flex-grow" />
<a class="text-lg px-3 py-0.5 rounded border-2 border-blue-500 shadow-lg cursor-pointer hover:bg-blue-200 text-blue-500" href="/games">View All</a>
</div>
<Game />
<Game />
<Game />
<Game />
<Game />
<Game />
<Game />
<Game />
</div>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Credits - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Privacy - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Rules - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Terms of Service - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Catalog - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Forums - Rowblox</title>
</svelte:head>

View File

@ -13,13 +13,3 @@
<button class="text-lg px-3 py-0.5 rounded border-2 border-blue-500 shadow-lg cursor-pointer hover:bg-blue-200 text-blue-500 mr-2">Search</button>
<a class="text-lg px-3 py-0.5 rounded border-2 border-blue-500 shadow-lg cursor-pointer hover:bg-blue-200 text-blue-500" href="/games/create">Create Game</a>
</div>
<Game />
<Game />
<Game />
<Game />
<Game />
<Game />
<Game />
<Game />
<Game />

View File

@ -0,0 +1,6 @@
import { error } from "@sveltejs/kit";
/** @type {import('./$types').PageServerLoad} */
export async function load({ params }) {
throw error(404, "That game doesn't exist");
}

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Groups - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Avatar - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Friends - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Money - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Profile - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Settings - Rowblox</title>
</svelte:head>

View File

@ -1,3 +0,0 @@
<svelte:head>
<title>Users - Rowblox</title>
</svelte:head>

View File

@ -0,0 +1,10 @@
import { error } from "@sveltejs/kit";
import { getUser } from "$lib/database";
/** @type {import('./$types').PageServerLoad} */
export async function load({ params }) {
const user = await getUser({ _id: Number(params.id) }, { username: true, currency: true, joinDate: true, lastOnline: true, rank: true, activity: true, bio: true });
if (!user) throw error(404, "That user doesn't exist");
return { profile: user };
}

View File

@ -1,7 +1,14 @@
<script>
export let data;
const joinDate = new Date(data.profile?.joinDate);
const lastOnline = new Date(data.profile?.lastOnline);
</script>
<div class="mx-auto rounded-lg flex shadow border border-gray-300 px-2 py-1.5">
<img class="rounded-full border-2 border-grey-600 h-28 shadow-lg mr-2" src="/img/headshot.png" alt="" />
<div class="flex flex-col place-content-between pt-2 pb-1.5">
<p class="text-3xl font-bold">Only16Characters</p>
<p class="text-3xl font-bold">{data.profile?.username}</p>
<div class="flex text-lg">
<p class="mr-4"><a class="font-bold" href="/users/id/friends">0</a> Friends</p>
<p class="mr-4"><a class="font-bold" href="/users/id/followers">0</a> Followers</p>
@ -20,15 +27,15 @@
<p class="text-2xl font-bold">About</p>
<div class="divide-y">
<img class="mx-auto w-96" src="/img/bodyshot.png" alt="" />
<p class="text-center py-2">bio</p>
<p class="text-center py-2">{data.profile?.bio}</p>
<div class="flex flex-row text-center pt-2">
<div class="flex flex-col mx-auto">
<p class="font-bold text-zinc-400">Join Date</p>
<p>a</p>
<p>{joinDate.getMonth() + 1}/{joinDate.getDate()}/{joinDate.getFullYear()}</p>
</div>
<div class="flex flex-col mx-auto">
<p class="font-bold text-zinc-400">Last Online</p>
<p>b</p>
<p>{lastOnline.getMonth() + 1}/{lastOnline.getDate()}/{lastOnline.getFullYear()}</p>
</div>
</div>
</div>