mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 14:22:25 -05:00 
			
		
		
		
	[frontend] Basic user moderation actions (#1728)
* remove info banner * update swagger definition for AccountAction * basic user view, suspend action * clean up suspended user display * basic user searching * rename User -> Account for clarity * refactor error boundary component to give better info * appease the linter
This commit is contained in:
		
					parent
					
						
							
								b47661f033
							
						
					
				
			
			
				commit
				
					
						89dcbd5a20
					
				
			
		
					 16 changed files with 419 additions and 37 deletions
				
			
		|  | @ -165,7 +165,7 @@ function ReportedToot({ toot }) { | |||
| 				} | ||||
| 			</section> | ||||
| 			<aside className="info"> | ||||
| 				<time datetime={toot.created_at}>{new Date(toot.created_at).toLocaleString()}</time> | ||||
| 				<time dateTime={toot.created_at}>{new Date(toot.created_at).toLocaleString()}</time> | ||||
| 			</aside> | ||||
| 		</article> | ||||
| 	); | ||||
|  |  | |||
|  | @ -48,13 +48,6 @@ function ReportOverview({ }) { | |||
| 		<> | ||||
| 			<h1>Reports</h1> | ||||
| 			<div> | ||||
| 				<div className="info"> | ||||
| 					<i className="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> | ||||
| 					<p> | ||||
| 						<b>This interface is currently very limited</b>, only providing a basic overview. <br /> | ||||
| 						Work is in progress on a more full-fledged moderation experience. | ||||
| 					</p> | ||||
| 				</div> | ||||
| 				<p> | ||||
| 					Here you can view and resolve reports made to your instance, originating from local and remote users. | ||||
| 				</p> | ||||
|  |  | |||
|  | @ -20,6 +20,7 @@ | |||
| "use strict"; | ||||
| 
 | ||||
| const React = require("react"); | ||||
| const { Link } = require("wouter"); | ||||
| 
 | ||||
| module.exports = function Username({ user, link = true }) { | ||||
| 	let className = "user"; | ||||
|  | @ -41,12 +42,12 @@ module.exports = function Username({ user, link = true }) { | |||
| 	let href = null; | ||||
| 
 | ||||
| 	if (link) { | ||||
| 		Element = "a"; | ||||
| 		href = user.account.url; | ||||
| 		Element = Link; | ||||
| 		href = `/settings/admin/accounts/${user.id}`; | ||||
| 	} | ||||
| 
 | ||||
| 	return ( | ||||
| 		<Element className={className} href={href} target="_blank" rel="noreferrer" > | ||||
| 		<Element className={className} to={href}> | ||||
| 			<span className="acct">@{user.account.acct}</span> | ||||
| 			<i className={`fa fa-fw ${icon.fa}`} aria-hidden="true" title={icon.info} /> | ||||
| 			<span className="sr-only">{icon.info}</span> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue