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