mirror of
				https://github.com/owncast/owncast.git
				synced 2025-10-31 18:18:06 +08:00 
			
		
		
		
	 d9a0d13479
			
		
	
	d9a0d13479
	
	
	
		
			
			* Allow icon only status messages such as STATUS_PROCESSING to be displayed * Add a processing status state for the EditSocialLinks component * Log warning for the outbound apub channel being full * Buffer the outbound apub channel so some API requests are less likely to get blocked during handling * Make the apub outbound request trace-log always occur after being queued. * Linting fix
		
			
				
	
	
		
			25 lines
		
	
	
		
			697 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			697 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import React, { FC } from 'react';
 | |
| import classNames from 'classnames';
 | |
| 
 | |
| import { StatusState } from '../../utils/input-statuses';
 | |
| 
 | |
| export type FormStatusIndicatorProps = {
 | |
|   status: StatusState;
 | |
| };
 | |
| 
 | |
| export const FormStatusIndicator: FC<FormStatusIndicatorProps> = ({ status }) => {
 | |
|   const { type, icon, message } = status || {};
 | |
|   const classes = classNames({
 | |
|     'status-container': true,
 | |
|     [`status-${type}`]: type,
 | |
|     empty: !message && !icon,
 | |
|   });
 | |
|   return (
 | |
|     <span className={classes}>
 | |
|       {icon ? <span className="status-icon">{icon}</span> : null}
 | |
|       {message ? <span className="status-message">{message}</span> : null}
 | |
|     </span>
 | |
|   );
 | |
| };
 | |
| export default FormStatusIndicator;
 |