WIP 2
This commit is contained in:
parent
43bfdaa1e3
commit
fe6c9419dd
87 changed files with 16739 additions and 2526 deletions
0
apps/metamigo-frontend/app/_actions/bots.ts
Normal file
0
apps/metamigo-frontend/app/_actions/bots.ts
Normal file
31
apps/metamigo-frontend/app/_components/DeleteDialog.tsx
Normal file
31
apps/metamigo-frontend/app/_components/DeleteDialog.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"use client";
|
||||
|
||||
import { FC } from "react";
|
||||
import { Grid, Box } from "@mui/material";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { typography } from "@/app/_styles/theme";
|
||||
|
||||
interface DeleteDialogProps {
|
||||
title: string;
|
||||
entity: string;
|
||||
children: any;
|
||||
}
|
||||
|
||||
export const DeleteDialog: FC<DeleteDialogProps> = ({ title, entity, children }) => {
|
||||
const router = useRouter();
|
||||
|
||||
const { h3 } = typography;
|
||||
|
||||
return (
|
||||
<Box sx={{ height: "100vh", backgroundColor: "#ddd", p: 3 }}>
|
||||
<Grid container direction="column">
|
||||
<Grid item>
|
||||
<Box sx={h3}>{title}</Box>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
{children}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
30
apps/metamigo-frontend/app/_components/Detail.tsx
Normal file
30
apps/metamigo-frontend/app/_components/Detail.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
"use client";
|
||||
|
||||
import { FC } from "react";
|
||||
import { Grid, Box } from "@mui/material";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { typography } from "@/app/_styles/theme";
|
||||
|
||||
interface DetailProps {
|
||||
title: string;
|
||||
entity: string;
|
||||
children: any;
|
||||
}
|
||||
|
||||
export const Detail: FC<DetailProps> = ({ title, entity, children }) => {
|
||||
const router = useRouter();
|
||||
const { h3 } = typography;
|
||||
|
||||
return (
|
||||
<Box sx={{ height: "100vh", backgroundColor: "#ddd", p: 3 }}>
|
||||
<Grid container direction="column">
|
||||
<Grid item>
|
||||
<Box sx={h3}>{title}</Box>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
{children}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
30
apps/metamigo-frontend/app/_components/Edit.tsx
Normal file
30
apps/metamigo-frontend/app/_components/Edit.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
"use client";
|
||||
|
||||
import { FC } from "react";
|
||||
import { Grid, Box } from "@mui/material";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { typography } from "@/app/_styles/theme";
|
||||
|
||||
interface EditProps {
|
||||
title: string;
|
||||
entity: string;
|
||||
children: any;
|
||||
}
|
||||
|
||||
export const Edit: FC<EditProps> = ({ title, entity, children }) => {
|
||||
const router = useRouter();
|
||||
const { h3 } = typography;
|
||||
|
||||
return (
|
||||
<Box sx={{ height: "100vh", backgroundColor: "#ddd", p: 3 }}>
|
||||
<Grid container direction="column">
|
||||
<Grid item>
|
||||
<Box sx={h3}>{title}</Box>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
{children}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
|
@ -3,19 +3,36 @@
|
|||
import { FC, PropsWithChildren, useState } from "react";
|
||||
import { Grid } from "@mui/material";
|
||||
import { Sidebar } from "./Sidebar";
|
||||
import { CssBaseline } from "@mui/material";
|
||||
import { css, Global } from "@emotion/react";
|
||||
import { fonts } from "@/app/_styles/theme";
|
||||
|
||||
type LayoutProps = PropsWithChildren<{
|
||||
docs?: any;
|
||||
}>;
|
||||
|
||||
export const InternalLayout: FC<PropsWithChildren> = ({ children }) => {
|
||||
const [open, setOpen] = useState(true);
|
||||
const { roboto } = fonts;
|
||||
const globalCSS = css`
|
||||
* {
|
||||
font-family: ${roboto.style.fontFamily};
|
||||
}
|
||||
`;
|
||||
|
||||
return (
|
||||
<Grid container direction="row">
|
||||
<Sidebar open={open} setOpen={setOpen} />
|
||||
<Grid
|
||||
item
|
||||
sx={{ ml: open ? "270px" : "100px", width: "100%", height: "100vh" }}
|
||||
>
|
||||
{children as any}
|
||||
<>
|
||||
<Global styles={globalCSS} />
|
||||
<CssBaseline />
|
||||
<Grid container direction="row">
|
||||
<Sidebar open={open} setOpen={setOpen} />
|
||||
<Grid
|
||||
item
|
||||
sx={{ ml: open ? "270px" : "100px", width: "100%", height: "100vh" }}
|
||||
>
|
||||
{children as any}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { FC } from "react";
|
|||
import { Grid, Box } from "@mui/material";
|
||||
import { DataGridPro, GridColDef } from "@mui/x-data-grid-pro";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { typography } from "@/app/_styles/theme";
|
||||
|
||||
interface ListProps {
|
||||
title: string;
|
||||
|
|
@ -14,6 +15,7 @@ interface ListProps {
|
|||
|
||||
export const List: FC<ListProps> = ({ title, entity, rows, columns }) => {
|
||||
const router = useRouter();
|
||||
const { h3 } = typography;
|
||||
|
||||
const onRowClick = (id: string) => {
|
||||
router.push(`/${entity}/${id}`);
|
||||
|
|
@ -23,7 +25,7 @@ export const List: FC<ListProps> = ({ title, entity, rows, columns }) => {
|
|||
<Box sx={{ height: "100vh", backgroundColor: "#ddd", p: 3 }}>
|
||||
<Grid container direction="column">
|
||||
<Grid item>
|
||||
<h1>{title}</h1>
|
||||
<Box sx={h3}>{title}</Box>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<Box
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@ import {
|
|||
import { usePathname } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
// import LinkLogo from "public/link-logo-small.png";
|
||||
import { fonts } from "@/app/_styles/theme";
|
||||
import LinkLogo from "@/public/link-logo-small.png";
|
||||
// import { useSession, signOut } from "next-auth/react";
|
||||
|
||||
const openWidth = 270;
|
||||
|
|
@ -113,7 +114,6 @@ const MenuItem = ({
|
|||
variant="body1"
|
||||
sx={{
|
||||
fontSize: 16,
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: "bold",
|
||||
border: 0,
|
||||
textAlign: "left",
|
||||
|
|
@ -155,6 +155,7 @@ interface SidebarProps {
|
|||
|
||||
export const Sidebar: FC<SidebarProps> = ({ open, setOpen }) => {
|
||||
const pathname = usePathname();
|
||||
const { poppins } = fonts;
|
||||
// const { data: session } = useSession();
|
||||
// const username = session?.user?.name || "User";
|
||||
|
||||
|
|
@ -215,7 +216,7 @@ export const Sidebar: FC<SidebarProps> = ({ open, setOpen }) => {
|
|||
}}
|
||||
>
|
||||
<Image
|
||||
src={"" /* LinkLogo */}
|
||||
src={LinkLogo}
|
||||
alt="Link logo"
|
||||
width={40}
|
||||
height={40}
|
||||
|
|
@ -237,7 +238,7 @@ export const Sidebar: FC<SidebarProps> = ({ open, setOpen }) => {
|
|||
fontWeight: 700,
|
||||
mt: 1,
|
||||
ml: 0.5,
|
||||
fontFamily: "Poppins",
|
||||
fontFamily: poppins.style.fontFamily,
|
||||
}}
|
||||
>
|
||||
Metamigo
|
||||
|
|
|
|||
|
|
@ -0,0 +1,82 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { Service } from "./service";
|
||||
|
||||
const getAllBots = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const getOneBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const sendMessage = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const receiveMessages = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const registerBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const resetBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const requestCode = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const unverifyBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const refreshBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const createBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const deleteBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
export const Facebook: Service = {
|
||||
getAllBots,
|
||||
getOneBot,
|
||||
sendMessage,
|
||||
receiveMessages,
|
||||
registerBot,
|
||||
resetBot,
|
||||
requestCode,
|
||||
unverifyBot,
|
||||
refreshBot,
|
||||
createBot,
|
||||
deleteBot,
|
||||
};
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { Service } from "./service";
|
||||
import { Facebook } from "./facebook";
|
||||
|
||||
const services: Record<string, Service> = {
|
||||
facebook: Facebook,
|
||||
none: NextResponse.error() as any,
|
||||
};
|
||||
|
||||
const getService = (req: NextRequest): Service => {
|
||||
const service = req.nextUrl.searchParams.get("service") ?? "none";
|
||||
return services[service];
|
||||
};
|
||||
|
||||
export const getAllBots = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.getAllBots(req);
|
||||
|
||||
export const getOneBot = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.getOneBot(req);
|
||||
|
||||
export const sendMessage = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.sendMessage(req);
|
||||
|
||||
export const receiveMessages = async (
|
||||
req: NextRequest,
|
||||
): Promise<NextResponse> => getService(req)?.receiveMessages(req);
|
||||
|
||||
export const registerBot = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.registerBot(req);
|
||||
|
||||
export const resetBot = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.resetBot(req);
|
||||
|
||||
export const requestCode = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.requestCode(req);
|
||||
|
||||
export const unverifyBot = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.unverifyBot(req);
|
||||
|
||||
export const refreshBot = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.refreshBot(req);
|
||||
|
||||
export const createBot = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.createBot(req);
|
||||
|
||||
export const deleteBot = async (req: NextRequest): Promise<NextResponse> =>
|
||||
getService(req)?.deleteBot(req);
|
||||
15
apps/metamigo-frontend/app/_lib/service.ts
Normal file
15
apps/metamigo-frontend/app/_lib/service.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
export interface Service {
|
||||
getAllBots: (req: NextRequest) => Promise<NextResponse>;
|
||||
getOneBot: (req: NextRequest) => Promise<NextResponse>;
|
||||
sendMessage: (req: NextRequest) => Promise<NextResponse>;
|
||||
receiveMessages: (req: NextRequest) => Promise<NextResponse>;
|
||||
registerBot: (req: NextRequest) => Promise<NextResponse>;
|
||||
resetBot: (req: NextRequest) => Promise<NextResponse>;
|
||||
requestCode: (req: NextRequest) => Promise<NextResponse>;
|
||||
unverifyBot: (req: NextRequest) => Promise<NextResponse>;
|
||||
refreshBot: (req: NextRequest) => Promise<NextResponse>;
|
||||
createBot: (req: NextRequest) => Promise<NextResponse>;
|
||||
deleteBot: (req: NextRequest) => Promise<NextResponse>;
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { Service } from "./service";
|
||||
|
||||
const getAllBots = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const getOneBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const sendMessage = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const receiveMessages = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const registerBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const resetBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const requestCode = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const unverifyBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const refreshBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const createBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const deleteBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
export const Signal: Service = {
|
||||
getAllBots,
|
||||
getOneBot,
|
||||
sendMessage,
|
||||
receiveMessages,
|
||||
registerBot,
|
||||
resetBot,
|
||||
requestCode,
|
||||
unverifyBot,
|
||||
refreshBot,
|
||||
createBot,
|
||||
deleteBot,
|
||||
};
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { Service } from "./service";
|
||||
|
||||
const getAllBots = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const getOneBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const sendMessage = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const receiveMessages = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const registerBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const resetBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const requestCode = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const unverifyBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const refreshBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const createBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const deleteBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
export const Voice: Service = {
|
||||
getAllBots,
|
||||
getOneBot,
|
||||
sendMessage,
|
||||
receiveMessages,
|
||||
registerBot,
|
||||
resetBot,
|
||||
requestCode,
|
||||
unverifyBot,
|
||||
refreshBot,
|
||||
createBot,
|
||||
deleteBot,
|
||||
};
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { Service } from "./service";
|
||||
|
||||
const getAllBots = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const getOneBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const sendMessage = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const receiveMessages = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const registerBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const resetBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const requestCode = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const unverifyBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const refreshBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const createBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
const deleteBot = async (req: NextRequest) => {
|
||||
console.log({ req });
|
||||
|
||||
return NextResponse.json({ response: "ok" });
|
||||
};
|
||||
|
||||
export const Whatsapp: Service = {
|
||||
getAllBots,
|
||||
getOneBot,
|
||||
sendMessage,
|
||||
receiveMessages,
|
||||
registerBot,
|
||||
resetBot,
|
||||
requestCode,
|
||||
unverifyBot,
|
||||
refreshBot,
|
||||
createBot,
|
||||
deleteBot,
|
||||
};
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
:root {
|
||||
--max-width: 1100px;
|
||||
--border-radius: 12px;
|
||||
--font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
|
||||
"Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
|
||||
"Fira Mono", "Droid Sans Mono", "Courier New", monospace;
|
||||
|
||||
--foreground-rgb: 0, 0, 0;
|
||||
--background-start-rgb: 214, 219, 220;
|
||||
--background-end-rgb: 255, 255, 255;
|
||||
|
||||
--primary-glow: conic-gradient(
|
||||
from 180deg at 50% 50%,
|
||||
#16abff33 0deg,
|
||||
#0885ff33 55deg,
|
||||
#54d6ff33 120deg,
|
||||
#0071ff33 160deg,
|
||||
transparent 360deg
|
||||
);
|
||||
--secondary-glow: radial-gradient(
|
||||
rgba(255, 255, 255, 1),
|
||||
rgba(255, 255, 255, 0)
|
||||
);
|
||||
|
||||
--tile-start-rgb: 239, 245, 249;
|
||||
--tile-end-rgb: 228, 232, 233;
|
||||
--tile-border: conic-gradient(
|
||||
#00000080,
|
||||
#00000040,
|
||||
#00000030,
|
||||
#00000020,
|
||||
#00000010,
|
||||
#00000010,
|
||||
#00000080
|
||||
);
|
||||
|
||||
--callout-rgb: 238, 240, 241;
|
||||
--callout-border-rgb: 172, 175, 176;
|
||||
--card-rgb: 180, 185, 188;
|
||||
--card-border-rgb: 131, 134, 135;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--foreground-rgb: 255, 255, 255;
|
||||
--background-start-rgb: 0, 0, 0;
|
||||
--background-end-rgb: 0, 0, 0;
|
||||
|
||||
--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
|
||||
--secondary-glow: linear-gradient(
|
||||
to bottom right,
|
||||
rgba(1, 65, 255, 0),
|
||||
rgba(1, 65, 255, 0),
|
||||
rgba(1, 65, 255, 0.3)
|
||||
);
|
||||
|
||||
--tile-start-rgb: 2, 13, 46;
|
||||
--tile-end-rgb: 2, 5, 19;
|
||||
--tile-border: conic-gradient(
|
||||
#ffffff80,
|
||||
#ffffff40,
|
||||
#ffffff30,
|
||||
#ffffff20,
|
||||
#ffffff10,
|
||||
#ffffff10,
|
||||
#ffffff80
|
||||
);
|
||||
|
||||
--callout-rgb: 20, 20, 20;
|
||||
--callout-border-rgb: 108, 108, 108;
|
||||
--card-rgb: 100, 100, 100;
|
||||
--card-border-rgb: 200, 200, 200;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
max-width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
color: rgb(var(--foreground-rgb));
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
transparent,
|
||||
rgb(var(--background-end-rgb))
|
||||
)
|
||||
rgb(var(--background-start-rgb));
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
color-scheme: dark;
|
||||
}
|
||||
}
|
||||
112
apps/metamigo-frontend/app/_styles/theme.ts
Normal file
112
apps/metamigo-frontend/app/_styles/theme.ts
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
import { Roboto, Playfair_Display, Poppins } from "next/font/google";
|
||||
|
||||
const roboto = Roboto({
|
||||
weight: ["400"],
|
||||
subsets: ["latin"],
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const playfair = Playfair_Display({
|
||||
weight: ["900"],
|
||||
subsets: ["latin"],
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const poppins = Poppins({
|
||||
weight: ["400", "700"],
|
||||
subsets: ["latin"],
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
export const fonts = {
|
||||
roboto,
|
||||
playfair,
|
||||
poppins,
|
||||
};
|
||||
|
||||
export const colors: any = {
|
||||
lightGray: "#ededf0",
|
||||
mediumGray: "#e3e5e5",
|
||||
darkGray: "#33302f",
|
||||
mediumBlue: "#4285f4",
|
||||
green: "#349d7b",
|
||||
lavender: "#a5a6f6",
|
||||
darkLavender: "#5d5fef",
|
||||
pink: "#fcddec",
|
||||
cdrLinkOrange: "#ff7115",
|
||||
coreYellow: "#fac942",
|
||||
helpYellow: "#fff4d5",
|
||||
dwcDarkBlue: "#191847",
|
||||
hazyMint: "#ecf7f8",
|
||||
leafcutterElectricBlue: "#4d6aff",
|
||||
leafcutterLightBlue: "#fafbfd",
|
||||
waterbearElectricPurple: "#332c83",
|
||||
waterbearLightSmokePurple: "#eff3f8",
|
||||
bumpedPurple: "#212058",
|
||||
mutedPurple: "#373669",
|
||||
warningPink: "#ef5da8",
|
||||
lightPink: "#fff0f7",
|
||||
lightGreen: "#f0fff3",
|
||||
lightOrange: "#fff5f0",
|
||||
beige: "#f6f2f1",
|
||||
almostBlack: "#33302f",
|
||||
white: "#ffffff",
|
||||
};
|
||||
|
||||
export const typography: any = {
|
||||
h1: {
|
||||
fontFamily: playfair.style.fontFamily,
|
||||
fontSize: 45,
|
||||
fontWeight: 700,
|
||||
lineHeight: 1.1,
|
||||
margin: 0,
|
||||
},
|
||||
h2: {
|
||||
fontFamily: poppins.style.fontFamily,
|
||||
fontSize: 35,
|
||||
fontWeight: 700,
|
||||
lineHeight: 1.1,
|
||||
margin: 0,
|
||||
},
|
||||
h3: {
|
||||
fontFamily: poppins.style.fontFamily,
|
||||
fontWeight: 400,
|
||||
fontSize: 27,
|
||||
lineHeight: 1.1,
|
||||
margin: 0,
|
||||
},
|
||||
h4: {
|
||||
fontFamily: poppins.style.fontFamily,
|
||||
fontWeight: 700,
|
||||
fontSize: 18,
|
||||
},
|
||||
h5: {
|
||||
fontFamily: roboto.style.fontFamily,
|
||||
fontWeight: 700,
|
||||
fontSize: 16,
|
||||
lineHeight: "24px",
|
||||
textTransform: "uppercase",
|
||||
textAlign: "center",
|
||||
margin: 1,
|
||||
},
|
||||
h6: {
|
||||
fontFamily: roboto.style.fontFamily,
|
||||
fontWeight: 400,
|
||||
fontSize: 14,
|
||||
textAlign: "center",
|
||||
},
|
||||
p: {
|
||||
fontFamily: roboto.style.fontFamily,
|
||||
fontSize: 17,
|
||||
lineHeight: "26.35px",
|
||||
fontWeight: 400,
|
||||
margin: 0,
|
||||
},
|
||||
small: {
|
||||
fontFamily: roboto.style.fontFamily,
|
||||
fontSize: 13,
|
||||
lineHeight: "18px",
|
||||
fontWeight: 400,
|
||||
margin: 0,
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { receiveMessages as GET } from "@/app/_lib/routing";
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { registerBot as POST } from "@/app/_lib/routing";
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { requestCode as POST } from "@/app/_lib/routing";
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { resetBot as POST } from "@/app/_lib/routing";
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { getOneBot as GET } from "@/app/_lib/routing";
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { sendMessage as POST } from "@/app/_lib/routing";
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { getAllBots as GET } from "@/app/_lib/routing";
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import { InternalLayout } from "./_components/InternalLayout";
|
||||
import "./_styles/globals.css";
|
||||
import { LicenseInfo } from "@mui/x-date-pickers-pro";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
LicenseInfo.setLicenseKey("7c9bf25d9e240f76e77cbf7d2ba58a23Tz02NjU4OCxFPTE3MTU4NjIzMzQ2ODgsUz1wcm8sTE09c3Vic2NyaXB0aW9uLEtWPTI=");
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Metamigo",
|
||||
|
|
@ -17,7 +16,7 @@ export default function RootLayout({
|
|||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={inter.className}>
|
||||
<body>
|
||||
<InternalLayout>{children}</InternalLayout>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
import { Detail } from "@/app/_components/Detail";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<Detail title="Signal Detail" entity="signal">
|
||||
<p>Cool</p>
|
||||
</Detail>
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
export default function Page() {
|
||||
return <h1>Signal new</h1>;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
export default function Page() {
|
||||
return <h1>Voice detail</h1>;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
export default function Page() {
|
||||
return <h1>Voice Home</h1>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue