Compare commits
4 Commits
0ca9bc1164
...
d5203e236a
| Author | SHA1 | Date | |
|---|---|---|---|
|
d5203e236a
|
|||
|
71f56769c1
|
|||
|
61c75df368
|
|||
|
91fa274df8
|
@@ -27,6 +27,9 @@ jobs:
|
|||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm ci --include=dev
|
run: npm ci --include=dev
|
||||||
|
|
||||||
|
- name: Generate Prisma Types
|
||||||
|
run: npx prisma generate
|
||||||
|
|
||||||
- name: Check Formatting
|
- name: Check Formatting
|
||||||
run: npm run check-format
|
run: npm run check-format
|
||||||
|
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -37,3 +37,5 @@ public/build
|
|||||||
|
|
||||||
# Wrangler data
|
# Wrangler data
|
||||||
.wrangler
|
.wrangler
|
||||||
|
|
||||||
|
/generated/prisma
|
||||||
|
|||||||
42
app/root.tsx
42
app/root.tsx
@@ -2,8 +2,10 @@ import {
|
|||||||
ChakraProvider,
|
ChakraProvider,
|
||||||
Container,
|
Container,
|
||||||
cookieStorageManagerSSR,
|
cookieStorageManagerSSR,
|
||||||
|
Flex,
|
||||||
Heading,
|
Heading,
|
||||||
Link,
|
Link,
|
||||||
|
Spacer,
|
||||||
Text,
|
Text,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { ClientStyleContext, ServerStyleContext } from "./context.js";
|
import { ClientStyleContext, ServerStyleContext } from "./context.js";
|
||||||
@@ -59,6 +61,42 @@ export function ErrorBoundary() {
|
|||||||
const { status } = error;
|
const { status } = error;
|
||||||
const loaderData = useRouteLoaderData<typeof loader>("root") || {};
|
const loaderData = useRouteLoaderData<typeof loader>("root") || {};
|
||||||
|
|
||||||
|
if (loaderData.mx)
|
||||||
|
return (
|
||||||
|
<DocumentWrapper loaderData={{ ...loaderData, hide: true }}>
|
||||||
|
<Container
|
||||||
|
left="50%"
|
||||||
|
maxW="container.md"
|
||||||
|
pos="absolute"
|
||||||
|
top="50%"
|
||||||
|
transform="translate(-50%, -50%)"
|
||||||
|
>
|
||||||
|
<Flex>
|
||||||
|
<Spacer />
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="128"
|
||||||
|
height="128"
|
||||||
|
fill="currentColor"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
>
|
||||||
|
<path d="M12.496 8a4.5 4.5 0 0 1-1.703 3.526L9.497 8.5l2.959-1.11q.04.3.04.61" />
|
||||||
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-1 0a7 7 0 1 0-13.202 3.249l1.988-1.657a4.5 4.5 0 0 1 7.537-4.623L7.497 6.5l1 2.5 1.333 3.11c-.56.251-1.18.39-1.833.39a4.5 4.5 0 0 1-1.592-.29L4.747 14.2A7 7 0 0 0 15 8m-8.295.139a.25.25 0 0 0-.288-.376l-1.5.5.159.474.808-.27-.595.894a.25.25 0 0 0 .287.376l.808-.27-.595.894a.25.25 0 0 0 .287.376l1.5-.5-.159-.474-.808.27.596-.894a.25.25 0 0 0-.288-.376l-.808.27z" />
|
||||||
|
</svg>
|
||||||
|
<Spacer />
|
||||||
|
</Flex>
|
||||||
|
<br />
|
||||||
|
<Heading textAlign="center">
|
||||||
|
The engineers are breaking stuff again
|
||||||
|
</Heading>
|
||||||
|
<br />
|
||||||
|
<Text textAlign="center">
|
||||||
|
Someday they will finish, come back later.
|
||||||
|
</Text>
|
||||||
|
</Container>
|
||||||
|
</DocumentWrapper>
|
||||||
|
);
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 303:
|
case 303:
|
||||||
return "";
|
return "";
|
||||||
@@ -136,6 +174,10 @@ export async function loader({
|
|||||||
if (context.data.nonce) data.nonce = context.data.nonce;
|
if (context.data.nonce) data.nonce = context.data.nonce;
|
||||||
if (context.data.theme) data.theme = context.data.theme;
|
if (context.data.theme) data.theme = context.data.theme;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (await context.env.DATA.get("mx")) data.mx = "1";
|
||||||
|
} catch {}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
8
index.d.ts
vendored
8
index.d.ts
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
import { type PrismaClient } from "./generated/prisma/client.js";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
module "*.css";
|
module "*.css";
|
||||||
|
|
||||||
@@ -17,7 +19,11 @@ declare global {
|
|||||||
token: string;
|
token: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type RequestContext = EventContext<Env, string, { [k: string]: any }>;
|
type RequestContext = EventContext<
|
||||||
|
Env,
|
||||||
|
string,
|
||||||
|
{ prisma: PrismaClient; [k: string]: any }
|
||||||
|
>;
|
||||||
|
|
||||||
interface AppealCardProps {
|
interface AppealCardProps {
|
||||||
approved: number | null;
|
approved: number | null;
|
||||||
|
|||||||
1145
package-lock.json
generated
1145
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,8 @@
|
|||||||
"@emotion/react": "^11.14.0",
|
"@emotion/react": "^11.14.0",
|
||||||
"@emotion/styled": "^11.14.1",
|
"@emotion/styled": "^11.14.1",
|
||||||
"@fontsource-variable/plus-jakarta-sans": "^5.2.8",
|
"@fontsource-variable/plus-jakarta-sans": "^5.2.8",
|
||||||
|
"@prisma/adapter-d1": "^7.7.0",
|
||||||
|
"@prisma/client": "^7.7.0",
|
||||||
"@remix-run/cloudflare": "^2.17.4",
|
"@remix-run/cloudflare": "^2.17.4",
|
||||||
"@remix-run/cloudflare-pages": "^2.17.4",
|
"@remix-run/cloudflare-pages": "^2.17.4",
|
||||||
"@remix-run/react": "^2.17.4",
|
"@remix-run/react": "^2.17.4",
|
||||||
@@ -34,6 +36,7 @@
|
|||||||
"@types/react-dom": "^18.3.7",
|
"@types/react-dom": "^18.3.7",
|
||||||
"dotenv": "^17.3.1",
|
"dotenv": "^17.3.1",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
|
"prisma": "^7.7.0",
|
||||||
"typescript": "^5.9.3"
|
"typescript": "^5.9.3"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|||||||
12
prisma.config.ts
Normal file
12
prisma.config.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import "dotenv/config";
|
||||||
|
import { defineConfig } from "prisma/config";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
schema: "prisma/schema.prisma",
|
||||||
|
migrations: {
|
||||||
|
path: "prisma/migrations",
|
||||||
|
},
|
||||||
|
datasource: {
|
||||||
|
url: process.env["DATABASE_URL"],
|
||||||
|
},
|
||||||
|
});
|
||||||
155
prisma/schema.prisma
Normal file
155
prisma/schema.prisma
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
generator client {
|
||||||
|
provider = "prisma-client"
|
||||||
|
output = "../generated/prisma"
|
||||||
|
}
|
||||||
|
|
||||||
|
datasource db {
|
||||||
|
provider = "sqlite"
|
||||||
|
}
|
||||||
|
|
||||||
|
model Appeal {
|
||||||
|
approved Boolean?
|
||||||
|
ban_reason String
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
id String @id @unique
|
||||||
|
learned String
|
||||||
|
reason_for_unban String
|
||||||
|
user Json
|
||||||
|
|
||||||
|
@@index([approved, created_at], name: "idx_appeals_approved_created_at")
|
||||||
|
@@map("appeals")
|
||||||
|
}
|
||||||
|
|
||||||
|
model AppealBan {
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
created_by String
|
||||||
|
user String @id @unique
|
||||||
|
|
||||||
|
@@map("appeal_bans")
|
||||||
|
}
|
||||||
|
|
||||||
|
model EtMember {
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
created_by String
|
||||||
|
id String @id @unique
|
||||||
|
is_management Boolean @default(false)
|
||||||
|
name String
|
||||||
|
points Int @default(0)
|
||||||
|
roblox_id Int?
|
||||||
|
|
||||||
|
@@index([id, name], name: "idx_et_members_id_name")
|
||||||
|
@@map("et_members")
|
||||||
|
}
|
||||||
|
|
||||||
|
model EtStrike {
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
created_by String
|
||||||
|
id String @id @unique
|
||||||
|
reason String
|
||||||
|
user String
|
||||||
|
|
||||||
|
@@map("et_strikes")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Event {
|
||||||
|
answer String?
|
||||||
|
answered_at DateTime?
|
||||||
|
approved Boolean @default(false)
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
created_by String
|
||||||
|
day Int
|
||||||
|
details String
|
||||||
|
id String @id @unique
|
||||||
|
month Int
|
||||||
|
pending Boolean @default(true)
|
||||||
|
performed_at DateTime?
|
||||||
|
reached_minimum_player_count Boolean @default(false)
|
||||||
|
type String
|
||||||
|
year Int
|
||||||
|
|
||||||
|
@@index([month, year], name: "idx_events_month_year")
|
||||||
|
@@map("events")
|
||||||
|
}
|
||||||
|
|
||||||
|
model GameAppeal {
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
id String @id @unique
|
||||||
|
reason_for_unban String
|
||||||
|
roblox_id Int
|
||||||
|
roblox_username String
|
||||||
|
type String
|
||||||
|
what_happened String
|
||||||
|
|
||||||
|
@@index([created_at], name: "idx_game_appeals_created_at")
|
||||||
|
@@map("game_appeals")
|
||||||
|
}
|
||||||
|
|
||||||
|
model GameModLog {
|
||||||
|
action String
|
||||||
|
evidence String
|
||||||
|
executed_at DateTime @default(now())
|
||||||
|
executor String
|
||||||
|
id String @id @unique
|
||||||
|
target Int
|
||||||
|
|
||||||
|
@@index([target], name: "idx_game_mod_logs_target")
|
||||||
|
@@map("game_mod_logs")
|
||||||
|
}
|
||||||
|
|
||||||
|
model GameModNote {
|
||||||
|
content String
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
created_by String
|
||||||
|
id String @id @unique
|
||||||
|
target Int
|
||||||
|
|
||||||
|
@@index([target], name: "idx_game_mod_notes_target")
|
||||||
|
@@map("game_mod_notes")
|
||||||
|
}
|
||||||
|
|
||||||
|
model InactivityNotice {
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
decisions Json
|
||||||
|
departments Json @default("[]")
|
||||||
|
end String
|
||||||
|
hiatus Boolean @default(false)
|
||||||
|
id String @id @unique
|
||||||
|
reason String
|
||||||
|
start String
|
||||||
|
user Json
|
||||||
|
|
||||||
|
@@index([end, start], name: "idx_inactivity_notices_end_start")
|
||||||
|
@@map("inactivity_notices")
|
||||||
|
}
|
||||||
|
|
||||||
|
model PushNotification {
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
event_id String @unique
|
||||||
|
event_type String
|
||||||
|
token String
|
||||||
|
|
||||||
|
@@map("push_notifications")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Report {
|
||||||
|
attachments Json @default("[]")
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
id String @id @unique
|
||||||
|
open Boolean @default(true)
|
||||||
|
target_ids Json @default("[]")
|
||||||
|
target_usernames Json @default("[]")
|
||||||
|
type String @default("exploit")
|
||||||
|
user Json?
|
||||||
|
|
||||||
|
@@index([created_at, open], name: "idx_reports_created_at_open")
|
||||||
|
@@map("reports")
|
||||||
|
}
|
||||||
|
|
||||||
|
model ShortLink {
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
destination String
|
||||||
|
path String @unique
|
||||||
|
user String
|
||||||
|
|
||||||
|
@@map("short_links")
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user