Fix: schema, move favicon and config page

This commit is contained in:
Aron Malcher 2024-01-11 11:41:37 +01:00
parent 712affc83d
commit 2a1cf8114e
Signed by: aronmal
GPG key ID: 816B7707426FC612
5 changed files with 69 additions and 66 deletions

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -12,23 +12,22 @@ import {
} from "drizzle-orm/pg-core"; } from "drizzle-orm/pg-core";
export const users = pgTable("user", { export const users = pgTable("user", {
id: text("id").primaryKey(), id: text("id").notNull().primaryKey(),
name: text("name"), name: text("name"),
email: text("email").notNull(), email: text("email").notNull(),
emailVerified: timestamp("email_verified", { mode: "date" }), emailVerified: timestamp("emailVerified", { mode: "date" }),
image: text("image"), image: text("image"),
createdAt: timestamp("created_at").defaultNow(),
}); });
export const accounts = pgTable( export const accounts = pgTable(
"account", "account",
{ {
userId: text("user_id") userId: text("userId")
.notNull() .notNull()
.references(() => users.id, { onDelete: "cascade" }), .references(() => users.id, { onDelete: "cascade" }),
type: text("type").$type<AdapterAccount["type"]>().notNull(), type: text("type").$type<AdapterAccount["type"]>().notNull(),
provider: text("provider").notNull(), provider: text("provider").notNull(),
providerAccountId: text("provider_account_id").notNull(), providerAccountId: text("providerAccountId").notNull(),
refresh_token: text("refresh_token"), refresh_token: text("refresh_token"),
access_token: text("access_token"), access_token: text("access_token"),
expires_at: integer("expires_at"), expires_at: integer("expires_at"),
@ -45,15 +44,15 @@ export const accounts = pgTable(
); );
export const sessions = pgTable("session", { export const sessions = pgTable("session", {
sessionToken: text("session_token").primaryKey(), sessionToken: text("sessionToken").notNull().primaryKey(),
userId: text("user_id") userId: text("userId")
.notNull() .notNull()
.references(() => users.id, { onDelete: "cascade" }), .references(() => users.id, { onDelete: "cascade" }),
expires: timestamp("expires", { mode: "date" }).notNull(), expires: timestamp("expires", { mode: "date" }).notNull(),
}); });
export const verificationTokens = pgTable( export const verificationTokens = pgTable(
"verification_token", "verificationToken",
{ {
identifier: text("identifier").notNull(), identifier: text("identifier").notNull(),
token: text("token").notNull(), token: text("token").notNull(),

View file

@ -7,7 +7,7 @@ export default createHandler(() => (
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/assets/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
{assets} {assets}
</head> </head>
<body id="app"> <body id="app">

View file

@ -1,57 +0,0 @@
import "../styles/pages/config.scss";
function config() {
return (
<div>
<h3 class={"centered"}>Configure li&apos;l Judd in</h3>
<div class={"config"}>
<div>
<div class={"horizontal centered"}>
<img class={"guildpfp"} src="https://cdn.discordapp.com/icons/1040502664506646548/bb5a51c4659cf47bdd942bb11e974da7.webp?size=240" alt="Server pfp" />
<h1>li'l Judds home base</h1>
</div>
</div>
<article>
<h2>Timezone</h2>
<p>Set the timezone for your server.</p>
<label>
<select>
<option value="-1">UTC-1:00</option>
<option value="0">UTC+0:00</option>
<option value="1">UTC+1:00</option>
</select>
</label>
</article>
<section>
<div class={"centered"}>
<h2>Features</h2>
<p>Configure the features of the bot</p>
</div>
<article>
<div class={"horizontal"}>
<h3>Time Planning</h3>
<input type="checkbox" id="time planning" />
</div>
<label class={"horizontal"}>
<p class={"marg_right_5px"}>Target channel:</p>
<select>
<option value="id">Channel 1</option>
<option value="id">Channel 2</option>
<option value="id">Channel 3</option>
<option value="id">Channel 4</option>
</select>
</label>
<div class={"horizontal"}>
<h4>Enable pingable Roles</h4>
<input type="checkbox" id="pingableroles" />
</div>
</article>
</section>
<button>Apply</button>
</div>
</div>
);
}
export default config;

View file

@ -0,0 +1,61 @@
import "../styles/pages/config.scss";
function config() {
return (
<div>
<h3 class={"centered"}>Configure li&apos;l Judd in</h3>
<div class={"config"}>
<div>
<div class={"horizontal centered"}>
<img
class={"guildpfp"}
src="https://cdn.discordapp.com/icons/1040502664506646548/bb5a51c4659cf47bdd942bb11e974da7.webp?size=240"
alt="Server pfp"
/>
<h1>li'l Judds home base</h1>
</div>
</div>
<article>
<h2>Timezone</h2>
<p>Set the timezone for your server.</p>
<label>
<select>
<option value="-1">UTC-1:00</option>
<option value="0">UTC+0:00</option>
<option value="1">UTC+1:00</option>
</select>
</label>
</article>
<section>
<div class={"centered"}>
<h2>Features</h2>
<p>Configure the features of the bot</p>
</div>
<article>
<div class={"horizontal"}>
<h3>Time Planning</h3>
<input type="checkbox" id="time planning" />
</div>
<label class={"horizontal"}>
<p class={"marg_right_5px"}>Target channel:</p>
<select>
<option value="id">Channel 1</option>
<option value="id">Channel 2</option>
<option value="id">Channel 3</option>
<option value="id">Channel 4</option>
</select>
</label>
<div class={"horizontal"}>
<h4>Enable pingable Roles</h4>
<input type="checkbox" id="pingableroles" />
</div>
</article>
</section>
<button>Apply</button>
</div>
</div>
);
}
export default config;