Fix: schema, move favicon and config page
This commit is contained in:
parent
712affc83d
commit
2a1cf8114e
5 changed files with 69 additions and 66 deletions
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
@ -12,23 +12,22 @@ import {
|
|||
} from "drizzle-orm/pg-core";
|
||||
|
||||
export const users = pgTable("user", {
|
||||
id: text("id").primaryKey(),
|
||||
id: text("id").notNull().primaryKey(),
|
||||
name: text("name"),
|
||||
email: text("email").notNull(),
|
||||
emailVerified: timestamp("email_verified", { mode: "date" }),
|
||||
emailVerified: timestamp("emailVerified", { mode: "date" }),
|
||||
image: text("image"),
|
||||
createdAt: timestamp("created_at").defaultNow(),
|
||||
});
|
||||
|
||||
export const accounts = pgTable(
|
||||
"account",
|
||||
{
|
||||
userId: text("user_id")
|
||||
userId: text("userId")
|
||||
.notNull()
|
||||
.references(() => users.id, { onDelete: "cascade" }),
|
||||
type: text("type").$type<AdapterAccount["type"]>().notNull(),
|
||||
provider: text("provider").notNull(),
|
||||
providerAccountId: text("provider_account_id").notNull(),
|
||||
providerAccountId: text("providerAccountId").notNull(),
|
||||
refresh_token: text("refresh_token"),
|
||||
access_token: text("access_token"),
|
||||
expires_at: integer("expires_at"),
|
||||
|
@ -45,15 +44,15 @@ export const accounts = pgTable(
|
|||
);
|
||||
|
||||
export const sessions = pgTable("session", {
|
||||
sessionToken: text("session_token").primaryKey(),
|
||||
userId: text("user_id")
|
||||
sessionToken: text("sessionToken").notNull().primaryKey(),
|
||||
userId: text("userId")
|
||||
.notNull()
|
||||
.references(() => users.id, { onDelete: "cascade" }),
|
||||
expires: timestamp("expires", { mode: "date" }).notNull(),
|
||||
});
|
||||
|
||||
export const verificationTokens = pgTable(
|
||||
"verification_token",
|
||||
"verificationToken",
|
||||
{
|
||||
identifier: text("identifier").notNull(),
|
||||
token: text("token").notNull(),
|
||||
|
|
|
@ -7,7 +7,7 @@ export default createHandler(() => (
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/assets/favicon.ico" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
{assets}
|
||||
</head>
|
||||
<body id="app">
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
import "../styles/pages/config.scss";
|
||||
|
||||
function config() {
|
||||
return (
|
||||
<div>
|
||||
<h3 class={"centered"}>Configure li'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;
|
61
src/routes/config/[guildId].tsx
Normal file
61
src/routes/config/[guildId].tsx
Normal file
|
@ -0,0 +1,61 @@
|
|||
import "../styles/pages/config.scss";
|
||||
|
||||
function config() {
|
||||
return (
|
||||
<div>
|
||||
<h3 class={"centered"}>Configure li'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;
|
Loading…
Reference in a new issue