Skip to content

Commit

Permalink
dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gempir committed Apr 20, 2024
1 parent 873579e commit 95bb8eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions web/src/components/Overlay/OverlaysPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
import { Button, Table, TextInput, Tooltip, useMantineTheme, CopyButton } from "@mantine/core";
import Link from "next/link";
import { useOverlays } from "../../hooks/useOverlays";
import { useUserConfig } from "../../hooks/useUserConfig";

export function OverlaysPage() {
const [overlays, addOverlay, deleteOverlay, errorMessage, loading] = useOverlays();
const [user] = useUserConfig();

const theme = useMantineTheme();

return <div className="relative w-full h-[100vh] p-4">
Expand All @@ -22,14 +19,16 @@ export function OverlaysPage() {
<Table.Tr>
<Table.Th>Id</Table.Th>
<Table.Th>Overlay Link</Table.Th>
<Table.Th>Symbol</Table.Th>
<Table.Th>Action</Table.Th>
</Table.Tr>
</Table.Thead>
<Table.Tbody>
{overlays.map(overlay => <Table.Tr key={overlay.ID}>
<Table.Td>{overlay.ID}</Table.Td>
<Table.Td className="flex gap-3 min-w-[350px]">
<TextInput style={{ maxWidth: 300 }} value={`${window?.location?.href}/${overlay.RoomID}`} readOnly />
<TextInput
variant="filled"
style={{ maxWidth: 300 }} value={`${window?.location?.href}/${overlay.RoomID}`} readOnly />
<CopyButton value={`${window?.location?.href}/${overlay.RoomID}`}>
{({ copied, copy }) => (
<Button color={copied ? 'teal' : 'blue'} onClick={copy}>
Expand Down
3 changes: 1 addition & 2 deletions web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ dayjs.extend(localizedFormat);


const theme = createTheme({
/** Put your mantine theme override here */
});

export default function App({ Component, pageProps }: { Component: any; pageProps: any }) {
Expand All @@ -41,7 +40,7 @@ export default function App({ Component, pageProps }: { Component: any; pageProp
color: rgba(209, 213, 219, var(--tw-text-opacity));
}
`}</style>
<MantineProvider theme={theme}>
<MantineProvider theme={theme} forceColorScheme="dark">
{renderFullLayout && <>
<main>
<div className="flex" style={{ scrollbarGutter: "stable" }}>
Expand Down

0 comments on commit 95bb8eb

Please sign in to comment.