-
Notifications
You must be signed in to change notification settings - Fork 13.9k
feat: Introduce User Report Section on Moderation Console #30554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
3e0d4eb
add method to fetch reported users
Dnouv d612b0f
revamp the date filter and revert back the leftover change on the mdo…
Dnouv ab39e74
add the tabs on main console
Dnouv 790423f
add hide user reports endpoint
Dnouv cdaaa36
complete the user reports context bar display
Dnouv 21d6068
fix ts error & improve the count
Dnouv 0e499b6
add refresh avatar for user section & i18n
Dnouv 23f02f7
add tests & rename api endpoint (moderation.user.reports <-> moderati…
Dnouv 0089077
Merge branch 'develop' into new/MCreptUser
Dnouv 87a72f9
componentize the mod filter & use userouter
Dnouv 5bd4bfd
abstract & improve
Dnouv 4a5f9f3
Merge branch 'develop' into new/MCreptUser
Dnouv a4d1a05
remove re-render key
Dnouv ca91e40
remove & resolve comments, fix sort, and a few cleanup
Dnouv 24ee102
add changeset
Dnouv 3758269
reset the default tab to Messages
Dnouv 4d54a1a
Merge branch 'develop' into new/MCreptUser
casalsgh a288c85
define methods for API calls
Dnouv 22da12d
Merge branch 'develop' into new/MCreptUser
casalsgh a9e8c62
Merge branch 'develop' into new/MCreptUser
casalsgh 47bee49
Merge branch 'develop' into new/MCreptUser
debdutdeb f9dd713
Merge branch 'develop' into new/MCreptUser
debdutdeb 4429340
remove userprofile;
Dnouv 28ac3b6
type guard, method name rename, file rename, log error, remove usecal…
Dnouv 7a23526
optimize indexes
Dnouv a3f5c5d
reduce no. of iteration
Dnouv a361985
keep seperate api functions on hold
Dnouv 11134ca
ui changes
Dnouv 78b3b85
return react element for table header
Dnouv 9c83d0c
fix: flash of stale content
Dnouv ff9681b
add separate links for main tabs, wrap the ContextContent, improve de…
Dnouv 53f5315
Merge branch 'develop' into new/MCreptUser
Dnouv 33fa587
Merge branch 'develop' into new/MCreptUser
Dnouv ad82d9a
remove title from button
Dnouv 9624fee
Add Serialized type to UserReport and IUser
Dnouv 2a126af
add spacing
Dnouv 613f02d
Merge branch 'develop' into new/MCreptUser
Dnouv 6e39a12
Merge branch 'develop' into new/MCreptUser
Dnouv 5df540a
chore: review tweaks
dougfabris 9d1031a
Merge branch 'develop' into new/MCreptUser
Dnouv 036a5ac
Merge branch 'develop' into new/MCreptUser
Dnouv 35be92a
change query keys
Dnouv fd21f45
remove boolean prop
Dnouv 3f387d2
remove Box
Dnouv d0969e5
add a generic api func
Dnouv 9e2272a
Merge branch 'develop' into new/MCreptUser
Dnouv 290cbb1
remove sub-function
Dnouv 2c0cbaf
Merge branch 'develop' into new/MCreptUser
Dnouv 952a6fb
Merge branch 'develop' into new/MCreptUser
casalsgh afa4b38
Merge branch 'develop' into new/MCreptUser
casalsgh 7790c36
update indexes
Dnouv 434b937
Merge branch 'develop' into new/MCreptUser
casalsgh aef780a
use agg for count
Dnouv 339039d
Merge branch 'develop' into new/MCreptUser
Dnouv 4a8b316
Merge develop
Dnouv 6187d71
fix TS
Dnouv 1727f05
Update apps/meteor/server/models/raw/ModerationReports.ts
Dnouv 96233f0
change api name & remove try...catch
Dnouv e0ad38a
change changeset
Dnouv 9e48dfc
revert api name
Dnouv 4690b20
Merge branch 'develop' into new/MCreptUser
casalsgh 0868710
Merge branch 'develop' into new/MCreptUser
kodiakhq[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,8 @@ | ||
| --- | ||
| '@rocket.chat/model-typings': minor | ||
| '@rocket.chat/rest-typings': minor | ||
| '@rocket.chat/i18n': minor | ||
| '@rocket.chat/meteor': minor | ||
| --- | ||
|
|
||
| **Added ‘Reported Users’ Tab to Moderation Console:** Enhances user monitoring by displaying reported users. |
This file contains hidden or 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
|
dougfabris marked this conversation as resolved.
|
This file contains hidden or 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 hidden or 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
43 changes: 43 additions & 0 deletions
43
apps/meteor/client/views/admin/moderation/ModConsoleReportDetails.tsx
This file contains hidden or 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,43 @@ | ||
| import type { IUser } from '@rocket.chat/core-typings'; | ||
| import { Tabs, TabsItem, ContextualbarHeader, ContextualbarTitle } from '@rocket.chat/fuselage'; | ||
| import { useTranslation, useRouter, useRouteParameter } from '@rocket.chat/ui-contexts'; | ||
| import React, { useState } from 'react'; | ||
|
|
||
| import { Contextualbar, ContextualbarClose } from '../../../components/Contextualbar'; | ||
| import UserMessages from './UserMessages'; | ||
| import UserReportInfo from './UserReports/UserReportInfo'; | ||
|
|
||
| type ModConsoleReportDetailsProps = { | ||
| userId: IUser['_id']; | ||
| default: string; | ||
| onRedirect: (mid: string) => void; | ||
| }; | ||
|
|
||
| const ModConsoleReportDetails = ({ userId, default: defaultTab, onRedirect }: ModConsoleReportDetailsProps) => { | ||
| const t = useTranslation(); | ||
| const [tab, setTab] = useState<string>(defaultTab); | ||
| const moderationRoute = useRouter(); | ||
|
|
||
| const activeTab = useRouteParameter('tab'); | ||
|
|
||
| return ( | ||
| <Contextualbar> | ||
| <ContextualbarHeader> | ||
| <ContextualbarTitle>{t('Reports')}</ContextualbarTitle> | ||
| <ContextualbarClose onClick={() => moderationRoute.navigate(`/admin/moderation/${activeTab}`, { replace: true })} /> | ||
| </ContextualbarHeader> | ||
| <Tabs paddingBlockStart={8}> | ||
| <TabsItem selected={tab === 'messages'} onClick={() => setTab('messages')}> | ||
| {t('Messages')} | ||
| </TabsItem> | ||
| <TabsItem selected={tab === 'users'} onClick={() => setTab('users')}> | ||
| {t('User')} | ||
| </TabsItem> | ||
| </Tabs> | ||
| {tab === 'messages' && <UserMessages userId={userId} onRedirect={onRedirect} />} | ||
| {tab === 'users' && <UserReportInfo userId={userId} />} | ||
| </Contextualbar> | ||
| ); | ||
| }; | ||
|
|
||
| export default ModConsoleReportDetails; |
55 changes: 40 additions & 15 deletions
55
apps/meteor/client/views/admin/moderation/ModerationConsolePage.tsx
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.