diff --git a/app/reports/page-content.tsx b/app/reports/page-content.tsx index 346557a..0c7c408 100644 --- a/app/reports/page-content.tsx +++ b/app/reports/page-content.tsx @@ -342,6 +342,7 @@ function useModerationQueueQuery() { collections, minAccountSuspendCount, minReportedRecordsCount, + minTakendownRecordsCount, }, ], queryFn: async ({ pageParam }) => { diff --git a/components/reports/useQueueFilter.tsx b/components/reports/useQueueFilter.tsx index f167078..1909724 100644 --- a/components/reports/useQueueFilter.tsx +++ b/components/reports/useQueueFilter.tsx @@ -137,7 +137,6 @@ export const useQueueFilter = () => { return { queueFilters, - updateFilters, updateTagExclusions, addTags, toggleCollection, diff --git a/components/repositories/AccountView.tsx b/components/repositories/AccountView.tsx index 8befa06..628c65f 100644 --- a/components/repositories/AccountView.tsx +++ b/components/repositories/AccountView.tsx @@ -61,6 +61,7 @@ import { DidHistory } from './DidHistory' import { InviteCodeGenerationStatus } from './InviteCodeGenerationStatus' import { MuteReporting } from './MuteReporting' import { ProfileAvatar } from './ProfileAvatar' +import { obscureIp, parseThreatSigs } from './helpers' enum Views { Details, @@ -528,8 +529,14 @@ function Details({ ? dateFormatter.format(new Date(repo.deactivatedAt)) : '' - const { registrationIp, lastSigninIp, lastSigninTime, hcapDetail } = - parseThreatSigs(repo.threatSignatures) + const { + registrationIp, + lastSigninIp, + lastSigninTime, + hcapDetail, + ipCountry, + lastSigninCountry, + } = parseThreatSigs(repo.threatSignatures) return (
@@ -557,6 +564,13 @@ function Details({ > + {ipCountry && ( + + {ipCountry} + + )} )} {lastSigninIp && ( @@ -569,6 +583,15 @@ function Details({ > + {lastSigninCountry && ( + + {lastSigninCountry} + + )} {lastSigninTime && (
{new Date(lastSigninTime).toLocaleString()} @@ -932,28 +955,3 @@ const EmailView = (props: ComponentProps) => {
) } - -function obscureIp(ip: string) { - const parts = ip.split('.') - if (parts.length !== 4) return '***.***.***.***' - return `${parts[0]}.${parts[1]}.***.***` -} - -function parseThreatSigs(sigs?: ComAtprotoAdminDefs.ThreatSignature[]) { - const registrationIp = sigs?.find( - (sig) => sig.property === 'registrationIp', - )?.value - const lastSigninIp = sigs?.find( - (sig) => sig.property === 'lastSigninIp', - )?.value - const lastSigninTime = sigs?.find( - (sig) => sig.property === 'lastSigninTime', - )?.value - const hcapDetail = sigs?.filter( - (sig) => - !['registrationIp', 'lastSigninIp', 'lastSigninTime'].includes( - sig.property, - ), - ) - return { registrationIp, lastSigninIp, lastSigninTime, hcapDetail } -} diff --git a/components/repositories/RepositoriesTable.tsx b/components/repositories/RepositoriesTable.tsx index 3fc0b53..256a642 100644 --- a/components/repositories/RepositoriesTable.tsx +++ b/components/repositories/RepositoriesTable.tsx @@ -6,6 +6,11 @@ import { LoadMoreButton } from '../common/LoadMoreButton' import { ReviewStateIcon } from '@/subject/ReviewStateMarker' import { SubjectOverview } from '@/reports/SubjectOverview' import { Loading } from '@/common/Loader' +import { obscureIp, parseThreatSigs } from './helpers' +import Link from 'next/link' +import { MagnifyingGlassIcon } from '@heroicons/react/24/solid' +import { LabelChip } from '@/common/labels' +import { SubjectSummaryColumn } from '@/subject/table' export function RepositoriesTable(props: { repos: Repo[] @@ -71,6 +76,9 @@ function RepoRow(props: { repo: Repo; showEmail: boolean }) { const { repo, showEmail, ...others } = props const profile = repo.relatedRecords.find(AppBskyActorProfile.isRecord) const displayName = profile?.displayName + + const { registrationIp, lastSigninIp, ipCountry, lastSigninCountry } = + parseThreatSigs(repo.threatSignatures) const indexedAt = new Date(repo.indexedAt) const { subjectStatus } = repo.moderation return ( @@ -89,6 +97,29 @@ function RepoRow(props: { repo: Repo; showEmail: boolean }) { /> )}
+ {lastSigninCountry && ( +
+ Last: + + {obscureIp(lastSigninIp)}{' '} + + + {lastSigninCountry && ( + + {lastSigninCountry} + + )} +
+ )} {subjectStatus?.comment && (

Note: {subjectStatus.comment} @@ -99,7 +130,6 @@ function RepoRow(props: { repo: Repo; showEmail: boolean }) {

{displayName}
-
Type
{showEmail && ( @@ -108,12 +138,37 @@ function RepoRow(props: { repo: Repo; showEmail: boolean }) { )} - {displayName} + {displayName}{' '} + {registrationIp && ( +
+ Reg: + + {obscureIp(registrationIp)}{' '} + + + {ipCountry && ( + + {ipCountry} + + )} +
+ )} {formatDistanceToNow(indexedAt, { addSuffix: true })} + ) @@ -140,7 +195,7 @@ function RepoRowHead({ showEmail = false }) { scope="col" className="hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-200 lg:table-cell" > - Name + Name/Details