mirror of
				https://github.com/owncast/owncast.git
				synced 2025-11-01 02:44:31 +08:00 
			
		
		
		
	 b10ba1dcc2
			
		
	
	b10ba1dcc2
	
	
	
		
			
			* First pass at displaying user data in admin * Hide chat blurb on home page if chat is disabled * Hide sidebar chat section if chat is disabled * Block/unblock user interface for https://github.com/owncast/owncast/issues/1096 * Simplify past display name handling * Updates to reflect the api access token change * Update paths * Clean up the new access token page * Fix linter * Update linter workflow action * Cleanup * Fix exception rendering table row * Commit next-env file that seems to be required with next 11 * chat refactor - admin adjustments (#250) * add useragent parser; clean up some html; * some ui changes - use modal instead of popover to confirm block/unblock user - update styles, table styles for consistency - rename some user/chat labels in nav and content * format user info modal a bit * add some sort of mild treatment and delay while processing ban of users * rename button to 'ban' * add some notes * Prettified Code! * fix disableChat toggle for nav bar * Support sorting the disabled user list * Fix linter error around table sorting * No longer restoring messages on unban so change message prompt * Standardize on forbiddenUsername terminology * The linter broke the webhooks page. Fixed it. Linter is probably pissed. * Move chat welcome message to chat config * Other submenus don't have icons so remove these ones Co-authored-by: gingervitis <omqmail@gmail.com> Co-authored-by: gabek <gabek@users.noreply.github.com>
		
			
				
	
	
		
			106 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			106 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| // TS types for elements on the Config pages
 | |
| 
 | |
| // for dropdown
 | |
| export interface SocialHandleDropdownItem {
 | |
|   icon: string;
 | |
|   platform: string;
 | |
|   key: string;
 | |
| }
 | |
| 
 | |
| export type FieldUpdaterFunc = (args: UpdateArgs) => void;
 | |
| 
 | |
| export interface UpdateArgs {
 | |
|   value: any;
 | |
|   fieldName?: string;
 | |
|   path?: string;
 | |
| }
 | |
| 
 | |
| export interface ApiPostArgs {
 | |
|   apiPath: string;
 | |
|   data: object;
 | |
|   onSuccess?: (arg: any) => void;
 | |
|   onError?: (arg: any) => void;
 | |
| }
 | |
| 
 | |
| export interface ConfigDirectoryFields {
 | |
|   enabled: boolean;
 | |
|   instanceUrl: string;
 | |
| }
 | |
| 
 | |
| export interface ConfigInstanceDetailsFields {
 | |
|   customStyles: string;
 | |
|   extraPageContent: string;
 | |
|   logo: string;
 | |
|   name: string;
 | |
|   nsfw: boolean;
 | |
|   socialHandles: SocialHandle[];
 | |
|   streamTitle: string;
 | |
|   summary: string;
 | |
|   tags: string[];
 | |
|   title: string;
 | |
|   welcomeMessage: string;
 | |
| }
 | |
| 
 | |
| export type CpuUsageLevel = 1 | 2 | 3 | 4 | 5;
 | |
| 
 | |
| // from data
 | |
| export interface SocialHandle {
 | |
|   platform: string;
 | |
|   url: string;
 | |
| }
 | |
| 
 | |
| export interface VideoVariant {
 | |
|   key?: number; // unique identifier generated on client side just for ant table rendering
 | |
|   cpuUsageLevel: CpuUsageLevel;
 | |
|   framerate: number;
 | |
| 
 | |
|   audioPassthrough: boolean;
 | |
|   audioBitrate: number;
 | |
|   videoPassthrough: boolean;
 | |
|   videoBitrate: number;
 | |
| 
 | |
|   scaledWidth: number;
 | |
|   scaledHeight: number;
 | |
| 
 | |
|   name: string;
 | |
| }
 | |
| export interface VideoSettingsFields {
 | |
|   latencyLevel: number;
 | |
|   videoQualityVariants: VideoVariant[];
 | |
|   cpuUsageLevel: CpuUsageLevel;
 | |
| }
 | |
| 
 | |
| export interface S3Field {
 | |
|   acl?: string;
 | |
|   accessKey: string;
 | |
|   bucket: string;
 | |
|   enabled: boolean;
 | |
|   endpoint: string;
 | |
|   region: string;
 | |
|   secret: string;
 | |
|   servingEndpoint?: string;
 | |
| }
 | |
| 
 | |
| export interface ExternalAction {
 | |
|   title: string;
 | |
|   description: string;
 | |
|   url: string;
 | |
|   openExternally: boolean;
 | |
| }
 | |
| 
 | |
| export interface ConfigDetails {
 | |
|   externalActions: ExternalAction[];
 | |
|   ffmpegPath: string;
 | |
|   instanceDetails: ConfigInstanceDetailsFields;
 | |
|   rtmpServerPort: string;
 | |
|   s3: S3Field;
 | |
|   streamKey: string;
 | |
|   videoSettings: VideoSettingsFields;
 | |
|   webServerPort: string;
 | |
|   yp: ConfigDirectoryFields;
 | |
|   supportedCodecs: string[];
 | |
|   videoCodec: string;
 | |
|   forbiddenUsernames: string[];
 | |
|   chatDisabled: boolean;
 | |
| }
 |