-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19a590f
commit 6e68f5a
Showing
4 changed files
with
120 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { USER_BADGES, addBit, hasBit, removeBit } from "@/chat-api/Bitwise"; | ||
import { | ||
ModerationUser, | ||
getTickets, | ||
getUser, | ||
getUsersWithSameIPAddress, | ||
updateUser, | ||
} from "@/chat-api/services/ModerationService"; | ||
import { createUpdatedSignal } from "@/common/createUpdatedSignal"; | ||
import { useWindowProperties } from "@/common/useWindowProperties"; | ||
import { A, useParams } from "@solidjs/router"; | ||
import { For, Show, createEffect, createSignal, on, onMount } from "solid-js"; | ||
import { css, styled } from "solid-styled-components"; | ||
import { FlexColumn, FlexRow } from "../ui/Flexbox"; | ||
import { Banner } from "../ui/Banner"; | ||
import Avatar from "../ui/Avatar"; | ||
import RouterEndpoints from "@/common/RouterEndpoints"; | ||
import { bannerUrl } from "@/chat-api/store/useUsers"; | ||
import Breadcrumb, { BreadcrumbItem } from "../ui/Breadcrumb"; | ||
import SettingsBlock from "../ui/settings-block/SettingsBlock"; | ||
import Input from "../ui/input/Input"; | ||
import Checkbox from "../ui/Checkbox"; | ||
import { formatTimestamp } from "@/common/date"; | ||
import UnsuspendUsersModal from "./UnsuspendUsersModal"; | ||
import SuspendUsersModal from "./SuspendUsersModal"; | ||
import { useCustomPortal } from "../ui/custom-portal/CustomPortal"; | ||
import Button from "../ui/Button"; | ||
import env from "@/common/env"; | ||
import Text from "../ui/Text"; | ||
import { RawServer, RawTicket, RawUser } from "@/chat-api/RawData"; | ||
import { Server, User } from "./ModerationPane"; | ||
import { t } from "i18next"; | ||
import { TicketItem } from "../tickets/TicketsPage"; | ||
|
||
const PageContainer = styled(FlexColumn)` | ||
height: 100%; | ||
width: 100%; | ||
max-width: 900px; | ||
align-self: center; | ||
margin-top: 80px; | ||
`; | ||
|
||
const TicketListContainer = styled(FlexColumn)` | ||
padding: 10px; | ||
gap: 8px; | ||
`; | ||
|
||
export default function TicketsPage() { | ||
const [tickets, setTickets] = createSignal<RawTicket[]>([]); | ||
|
||
onMount(async () => { | ||
const tickets = await getTickets({ limit: 30 }); | ||
setTickets(tickets); | ||
}); | ||
|
||
return ( | ||
<PageContainer> | ||
<div class={css`margin-left: 10px; margin-right: 10px;`}> | ||
<Breadcrumb> | ||
<BreadcrumbItem href={"../"} icon='home' title="Moderation" /> | ||
<BreadcrumbItem title={t("settings.drawer.tickets")!} /> | ||
</Breadcrumb> | ||
</div> | ||
<TicketListContainer> | ||
<For each={tickets()}> | ||
{(ticket) => <TicketItem as="mod" ticket={ticket} />} | ||
</For> | ||
</TicketListContainer> | ||
</PageContainer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters