forked from administration/panel
chore: populate pages
parent
45bce9d5fb
commit
7ef4a1ed4a
|
@ -0,0 +1,3 @@
|
||||||
|
export default function Trends() {
|
||||||
|
return <div className="flex flex-col gap-2"></div>;
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
export default function AuditLog() {
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col gap-2">
|
||||||
|
chronological event log for all actions
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
export default function Discover() {
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col gap-2">
|
||||||
|
list discover submissions with accept / deny
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
export default function Grafana() {
|
|
||||||
return (
|
|
||||||
<iframe src="https://monitor.revolt.chat/d/fb0383b2-86c8-4c9c-b401-0af8ce9869af/global-stats?orgId=1&kiosk" />
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
export default function Search() {
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col gap-2">
|
||||||
|
Find user by username, find account by email, find bot by token
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -50,13 +50,13 @@ export function NavigationLinks() {
|
||||||
>
|
>
|
||||||
<ScrollText className="h-4 w-4" />
|
<ScrollText className="h-4 w-4" />
|
||||||
</Link>
|
</Link>
|
||||||
<a
|
<Link
|
||||||
target="_blank"
|
|
||||||
className={buttonVariants({ variant: "outline", size: "icon" })}
|
className={buttonVariants({ variant: "outline", size: "icon" })}
|
||||||
href="https://monitor.revolt.chat/d/fb0383b2-86c8-4c9c-b401-0af8ce9869af/global-stats?orgId=1"
|
href="/panel/activity"
|
||||||
|
// href="https://monitor.revolt.chat/d/fb0383b2-86c8-4c9c-b401-0af8ce9869af/global-stats?orgId=1"
|
||||||
>
|
>
|
||||||
<TrendingUp className="h-4 w-4" />
|
<TrendingUp className="h-4 w-4" />
|
||||||
</a>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
className={buttonVariants({ variant: "outline", size: "icon" })}
|
className={buttonVariants({ variant: "outline", size: "icon" })}
|
||||||
href="/panel/sparkle"
|
href="/panel/sparkle"
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "node server.js",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "NODE_ENV=production node server.js",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
const { createServer } = require("http");
|
||||||
|
const { parse } = require("url");
|
||||||
|
const next = require("next");
|
||||||
|
|
||||||
|
const dev = process.env.NODE_ENV !== "production";
|
||||||
|
const hostname = "localhost";
|
||||||
|
const port = 3000;
|
||||||
|
// when using middleware `hostname` and `port` must be provided below
|
||||||
|
const app = next({ dev, hostname, port });
|
||||||
|
const handle = app.getRequestHandler();
|
||||||
|
|
||||||
|
app.prepare().then(() => {
|
||||||
|
createServer(async (req, res) => {
|
||||||
|
try {
|
||||||
|
// Be sure to pass `true` as the second argument to `url.parse`.
|
||||||
|
// This tells it to parse the query portion of the URL.
|
||||||
|
const parsedUrl = parse(req.url, true);
|
||||||
|
const { pathname, query } = parsedUrl;
|
||||||
|
|
||||||
|
if (pathname === "/a") {
|
||||||
|
await app.render(req, res, "/a", query);
|
||||||
|
} else if (pathname === "/b") {
|
||||||
|
await app.render(req, res, "/b", query);
|
||||||
|
} else {
|
||||||
|
await handle(req, res, parsedUrl);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error("Error occurred handling", req.url, err);
|
||||||
|
res.statusCode = 500;
|
||||||
|
res.end("internal server error");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.once("error", (err) => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
})
|
||||||
|
.listen(port, () => {
|
||||||
|
console.log(`> Ready on http://${hostname}:${port}`);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue