mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Remove username as a property. Simplify field names
This commit is contained in:
parent
7de0e452a8
commit
7cc194bb2a
@ -54,19 +54,11 @@ export async function postConfigUpdateToAPI(args: ApiPostArgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Some default props to help build out a TextField
|
// Some default props to help build out a TextField
|
||||||
export const TEXTFIELD_PROPS_USERNAME = {
|
|
||||||
apiPath: API_USERNAME,
|
|
||||||
configPath: 'instanceDetails',
|
|
||||||
maxLength: TEXT_MAXLENGTH,
|
|
||||||
placeholder: 'username',
|
|
||||||
label: 'User name',
|
|
||||||
tip: 'Who are you? What name do you want viewers to know you?',
|
|
||||||
};
|
|
||||||
export const TEXTFIELD_PROPS_SERVER_TITLE = {
|
export const TEXTFIELD_PROPS_SERVER_TITLE = {
|
||||||
apiPath: API_SERVER_TITLE,
|
apiPath: API_SERVER_TITLE,
|
||||||
maxLength: TEXT_MAXLENGTH,
|
maxLength: TEXT_MAXLENGTH,
|
||||||
placeholder: 'Owncast site name', // like "gothland"
|
placeholder: 'Owncast site name', // like "gothland"
|
||||||
label: 'Server Name',
|
label: 'Name',
|
||||||
tip: 'The name of your Owncast server',
|
tip: 'The name of your Owncast server',
|
||||||
};
|
};
|
||||||
export const TEXTFIELD_PROPS_STREAM_TITLE = {
|
export const TEXTFIELD_PROPS_STREAM_TITLE = {
|
||||||
@ -79,9 +71,9 @@ export const TEXTFIELD_PROPS_STREAM_TITLE = {
|
|||||||
export const TEXTFIELD_PROPS_SERVER_SUMMARY = {
|
export const TEXTFIELD_PROPS_SERVER_SUMMARY = {
|
||||||
apiPath: API_SERVER_SUMMARY,
|
apiPath: API_SERVER_SUMMARY,
|
||||||
maxLength: 500,
|
maxLength: 500,
|
||||||
placeholder: 'Summary',
|
placeholder: '',
|
||||||
label: 'Summary',
|
label: 'About',
|
||||||
tip: 'A brief blurb about what your stream is about.',
|
tip: 'A brief blurb about you, your server, or what your stream is about.',
|
||||||
};
|
};
|
||||||
export const TEXTFIELD_PROPS_LOGO = {
|
export const TEXTFIELD_PROPS_LOGO = {
|
||||||
apiPath: API_LOGO,
|
apiPath: API_LOGO,
|
||||||
@ -133,7 +125,7 @@ export const TEXTFIELD_PROPS_INSTANCE_URL = {
|
|||||||
maxLength: 255,
|
maxLength: 255,
|
||||||
placeholder: 'https://owncast.mysite.com',
|
placeholder: 'https://owncast.mysite.com',
|
||||||
label: 'Instance URL',
|
label: 'Instance URL',
|
||||||
tip: 'Please provide the url to your Owncast site if you enable this Directory setting.',
|
tip: 'The full url to your Owncast server.',
|
||||||
};
|
};
|
||||||
// MISC FIELDS
|
// MISC FIELDS
|
||||||
export const FIELD_PROPS_TAGS = {
|
export const FIELD_PROPS_TAGS = {
|
||||||
|
|||||||
@ -7,10 +7,8 @@ import TextFieldWithSubmit, {
|
|||||||
import { ServerStatusContext } from '../../../utils/server-status-context';
|
import { ServerStatusContext } from '../../../utils/server-status-context';
|
||||||
import {
|
import {
|
||||||
postConfigUpdateToAPI,
|
postConfigUpdateToAPI,
|
||||||
TEXTFIELD_PROPS_USERNAME,
|
|
||||||
TEXTFIELD_PROPS_INSTANCE_URL,
|
TEXTFIELD_PROPS_INSTANCE_URL,
|
||||||
TEXTFIELD_PROPS_SERVER_TITLE,
|
TEXTFIELD_PROPS_SERVER_TITLE,
|
||||||
TEXTFIELD_PROPS_STREAM_TITLE,
|
|
||||||
TEXTFIELD_PROPS_SERVER_SUMMARY,
|
TEXTFIELD_PROPS_SERVER_SUMMARY,
|
||||||
TEXTFIELD_PROPS_LOGO,
|
TEXTFIELD_PROPS_LOGO,
|
||||||
API_YP_SWITCH,
|
API_YP_SWITCH,
|
||||||
@ -75,20 +73,6 @@ export default function EditInstanceDetails() {
|
|||||||
initialValue={instanceDetails.title}
|
initialValue={instanceDetails.title}
|
||||||
onChange={handleFieldChange}
|
onChange={handleFieldChange}
|
||||||
/>
|
/>
|
||||||
<TextFieldWithSubmit
|
|
||||||
fieldName="streamTitle"
|
|
||||||
{...TEXTFIELD_PROPS_STREAM_TITLE}
|
|
||||||
value={formDataValues.streamTitle}
|
|
||||||
initialValue={instanceDetails.streamTitle}
|
|
||||||
onChange={handleFieldChange}
|
|
||||||
/>
|
|
||||||
<TextFieldWithSubmit
|
|
||||||
fieldName="name"
|
|
||||||
{...TEXTFIELD_PROPS_USERNAME}
|
|
||||||
value={formDataValues.name}
|
|
||||||
initialValue={instanceDetails.name}
|
|
||||||
onChange={handleFieldChange}
|
|
||||||
/>
|
|
||||||
<TextFieldWithSubmit
|
<TextFieldWithSubmit
|
||||||
fieldName="summary"
|
fieldName="summary"
|
||||||
{...TEXTFIELD_PROPS_SERVER_SUMMARY}
|
{...TEXTFIELD_PROPS_SERVER_SUMMARY}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user