implement custom welcome message (#65)
This commit is contained in:
parent
d8b5ce40d8
commit
b1256bcd08
@ -12,6 +12,7 @@ import {
|
||||
TEXTFIELD_PROPS_INSTANCE_URL,
|
||||
TEXTFIELD_PROPS_SERVER_NAME,
|
||||
TEXTFIELD_PROPS_SERVER_SUMMARY,
|
||||
TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE,
|
||||
TEXTFIELD_PROPS_LOGO,
|
||||
API_YP_SWITCH,
|
||||
FIELD_PROPS_YP,
|
||||
@ -97,6 +98,14 @@ export default function EditInstanceDetails() {
|
||||
initialValue={instanceDetails.summary}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
<TextFieldWithSubmit
|
||||
fieldName="welcomeMessage"
|
||||
{...TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE}
|
||||
type={TEXTFIELD_TYPE_TEXTAREA}
|
||||
value={formDataValues.welcomeMessage}
|
||||
initialValue={instanceDetails.welcomeMessage}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
<TextFieldWithSubmit
|
||||
fieldName="logo"
|
||||
{...TEXTFIELD_PROPS_LOGO}
|
||||
|
@ -35,6 +35,7 @@ export interface ConfigInstanceDetailsFields {
|
||||
socialHandles: SocialHandle[];
|
||||
streamTitle: string;
|
||||
summary: string;
|
||||
welcomeMessage: string;
|
||||
tags: string[];
|
||||
title: string;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ export const API_NSFW_SWITCH = '/nsfw';
|
||||
export const API_RTMP_PORT = '/rtmpserverport';
|
||||
export const API_S3_INFO = '/s3';
|
||||
export const API_SERVER_SUMMARY = '/serversummary';
|
||||
export const API_SERVER_WELCOME_MESSAGE = '/welcomemessage';
|
||||
export const API_SERVER_NAME = '/name';
|
||||
export const API_SOCIAL_HANDLES = '/socialhandles';
|
||||
export const API_STREAM_KEY = '/key';
|
||||
@ -63,6 +64,14 @@ export const TEXTFIELD_PROPS_SERVER_SUMMARY = {
|
||||
label: 'About',
|
||||
tip: 'A brief blurb about you, your server, or what your stream is about.',
|
||||
};
|
||||
export const TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE = {
|
||||
apiPath: API_SERVER_WELCOME_MESSAGE,
|
||||
maxLength: 500,
|
||||
placeholder: '',
|
||||
label: 'Welcome Message',
|
||||
tip:
|
||||
'A system chat message sent to viewers when they first connect to chat. Leave blank to disable.',
|
||||
};
|
||||
export const TEXTFIELD_PROPS_LOGO = {
|
||||
apiPath: API_LOGO,
|
||||
maxLength: 255,
|
||||
|
@ -17,6 +17,7 @@ export const initialServerConfigState: ConfigDetails = {
|
||||
socialHandles: [],
|
||||
streamTitle: '',
|
||||
summary: '',
|
||||
welcomeMessage: '',
|
||||
tags: [],
|
||||
title: '',
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user