Continue to add doc links, update copy, and tweak alert messages

This commit is contained in:
Gabe Kangas 2021-02-04 12:41:35 -08:00
parent 5dd4d49118
commit 5c99b124aa
9 changed files with 49 additions and 38 deletions

View File

@ -106,8 +106,8 @@ export const TEXTFIELD_PROPS_WEB_PORT = {
configPath: '', configPath: '',
maxLength: 6, maxLength: 6,
placeholder: '8080', placeholder: '8080',
label: 'Owncast Server port', label: 'Owncast port',
tip: 'What port are you serving Owncast from? Default is :8080', tip: 'What port is your Owncast web server listening? Default is 8080',
required: true, required: true,
}; };
export const TEXTFIELD_PROPS_RTMP_PORT = { export const TEXTFIELD_PROPS_RTMP_PORT = {
@ -116,7 +116,7 @@ export const TEXTFIELD_PROPS_RTMP_PORT = {
maxLength: 6, maxLength: 6,
placeholder: '1935', placeholder: '1935',
label: 'RTMP port', label: 'RTMP port',
tip: 'What port are you receiving RTMP?', tip: 'What port should accept inbound broadcasts? Default is 1935',
required: true, required: true,
}; };
export const TEXTFIELD_PROPS_INSTANCE_URL = { export const TEXTFIELD_PROPS_INSTANCE_URL = {

View File

@ -54,6 +54,16 @@ export default function EditInstanceDetails() {
setMessage('Updating server settings requires a restart of your Owncast server.'); setMessage('Updating server settings requires a restart of your Owncast server.');
}; };
const showStreamKeyChangeMessage = () => {
setMessage('Changing your stream key will log you out of the admin and block you from streaming until you change the key in your broadcasting software.');
};
const showFfmpegChangeMessage = () => {
if (serverStatusData.online) {
setMessage('The updated ffmpeg path will be used when starting your next live stream.');
}
};
function generateStreamKey() { function generateStreamKey() {
let key = ''; let key = '';
for (let i = 0; i < 3; i += 1) { for (let i = 0; i < 3; i += 1) {
@ -81,6 +91,7 @@ export default function EditInstanceDetails() {
initialValue={streamKey} initialValue={streamKey}
type={TEXTFIELD_TYPE_PASSWORD} type={TEXTFIELD_TYPE_PASSWORD}
onChange={handleFieldChange} onChange={handleFieldChange}
onSubmit={showStreamKeyChangeMessage}
/> />
<div className="streamkey-actions"> <div className="streamkey-actions">
<Tooltip title="Generate a stream key"> <Tooltip title="Generate a stream key">
@ -102,6 +113,7 @@ export default function EditInstanceDetails() {
value={formDataValues.ffmpegPath} value={formDataValues.ffmpegPath}
initialValue={ffmpegPath} initialValue={ffmpegPath}
onChange={handleFieldChange} onChange={handleFieldChange}
onSubmit={showFfmpegChangeMessage}
/> />
<TextFieldWithSubmit <TextFieldWithSubmit
fieldName="webServerPort" fieldName="webServerPort"

View File

@ -1,6 +1,7 @@
import React, { useContext, useState, useEffect } from 'react'; import React, { useContext, useState, useEffect } from 'react';
import { Typography, Slider } from 'antd'; import { Typography, Slider } from 'antd';
import { ServerStatusContext } from '../../../utils/server-status-context'; import { ServerStatusContext } from '../../../utils/server-status-context';
import { AlertMessageContext } from '../../../utils/alert-message-context';
import { API_VIDEO_SEGMENTS, RESET_TIMEOUT, postConfigUpdateToAPI } from './constants'; import { API_VIDEO_SEGMENTS, RESET_TIMEOUT, postConfigUpdateToAPI } from './constants';
import { import {
createInputStatus, createInputStatus,
@ -47,6 +48,7 @@ export default function VideoLatency() {
const [selectedOption, setSelectedOption] = useState(null); const [selectedOption, setSelectedOption] = useState(null);
const serverStatusData = useContext(ServerStatusContext); const serverStatusData = useContext(ServerStatusContext);
const { setMessage } = useContext(AlertMessageContext);
const { serverConfig, setFieldInConfigState } = serverStatusData || {}; const { serverConfig, setFieldInConfigState } = serverStatusData || {};
const { videoSettings } = serverConfig || {}; const { videoSettings } = serverConfig || {};
@ -80,11 +82,14 @@ export default function VideoLatency() {
value: postValue, value: postValue,
path: 'videoSettings', path: 'videoSettings',
}); });
setSubmitStatus(createInputStatus(STATUS_SUCCESS, 'Variants updated.')); setSubmitStatus(createInputStatus(STATUS_SUCCESS, 'Latency buffer level updated.'));
// setSubmitStatus('success'); // setSubmitStatus('success');
// setSubmitStatusMessage('Variants updated.'); // setSubmitStatusMessage('Variants updated.');
resetTimer = setTimeout(resetStates, RESET_TIMEOUT); resetTimer = setTimeout(resetStates, RESET_TIMEOUT);
if (serverStatusData.online) {
setMessage('Your latency buffer setting will take effect the next time you begin a live stream.')
}
}, },
onError: (message: string) => { onError: (message: string) => {
setSubmitStatus(createInputStatus(STATUS_ERROR, message)); setSubmitStatus(createInputStatus(STATUS_ERROR, message));
@ -104,11 +109,8 @@ export default function VideoLatency() {
<div className="config-video-segements-conatiner"> <div className="config-video-segements-conatiner">
<Title level={3}>Latency Buffer</Title> <Title level={3}>Latency Buffer</Title>
<p> <p>
There are trade-offs when cosidering video latency and reliability. Blah blah .. better While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability in some environments the lower you go.
wording here needed.
</p> </p>
<br />
<br />
<div className="segment-slider-container"> <div className="segment-slider-container">
<Slider <Slider
tipFormatter={value => <SegmentToolTip value={SLIDER_COMMENTS[value]} />} tipFormatter={value => <SegmentToolTip value={SLIDER_COMMENTS[value]} />}

View File

@ -83,9 +83,11 @@ export default function CurrentVariantsTable() {
setSubmitStatusMessage('Variants updated.'); setSubmitStatusMessage('Variants updated.');
resetTimer = setTimeout(resetStates, RESET_TIMEOUT); resetTimer = setTimeout(resetStates, RESET_TIMEOUT);
if (serverStatusData.online) {
setMessage( setMessage(
'Updating your video configuration will take effect the next time you begin a new stream.', 'Updating your video configuration will take effect the next time you begin a new stream.',
); );
}
}, },
onError: (message: string) => { onError: (message: string) => {
setSubmitStatus('error'); setSubmitStatus('error');
@ -187,7 +189,7 @@ export default function CurrentVariantsTable() {
return ( return (
<> <>
<Title level={3}>Current Variants</Title> <Title level={3}>Stream output</Title>
{statusMessage} {statusMessage}

View File

@ -84,11 +84,10 @@ export default function PageContentEditor() {
return ( return (
<div className="config-page-content-form"> <div className="config-page-content-form">
<Title level={2}>Edit custom content</Title> <Title level={2}>Page Content</Title>
<p> <p>
Add some content about your site with the Markdown editor below. This content shows up at Edit the content of your page by using simple <a href="https://www.markdownguide.org/basic-syntax/">Markdown syntax</a>.
the bottom half of your Owncast page.
</p> </p>
<MdEditor <MdEditor
@ -101,6 +100,7 @@ export default function PageContentEditor() {
markdownClass: 'markdown-editor-pane', markdownClass: 'markdown-editor-pane',
}} }}
/> />
<div className="page-content-actions"> <div className="page-content-actions">
{hasChanged ? ( {hasChanged ? (
<Button type="primary" onClick={handleSave}> <Button type="primary" onClick={handleSave}>

View File

@ -11,8 +11,10 @@ const { Title } = Typography;
export default function PublicFacingDetails() { export default function PublicFacingDetails() {
return ( return (
<> <>
<Title level={2}>Edit your public facing instance details</Title> <Title level={2}>General Settings</Title>
<p>
The following are displayed on your site to describe your stream and its content. <a href="https://owncast.online/docs/website/">Learn more.</a>
</p>
<div className="edit-public-details-container"> <div className="edit-public-details-container">
<EditInstanceDetails /> <EditInstanceDetails />
<EditInstanceTags /> <EditInstanceTags />

View File

@ -7,8 +7,10 @@ const { Title } = Typography;
export default function ConfigServerDetails() { export default function ConfigServerDetails() {
return ( return (
<div className="config-server-details-form"> <div className="config-server-details-form">
<Title level={2}>Edit your Server&apos;s details</Title> <Title level={2}>Server Settings</Title>
<p>
You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.
</p>
<div className="config-server-details-container"> <div className="config-server-details-container">
<EditServerDetails /> <EditServerDetails />
</div> </div>

View File

@ -11,14 +11,14 @@ export default function ConfigVideoSettings() {
<div className="config-video-variants"> <div className="config-video-variants">
<Title level={2}>Video configuration</Title> <Title level={2}>Video configuration</Title>
<p> <p>
Learn more about configuring Owncast{' '} Before changing your video configuration <a href="https://owncast.online/docs/encoding">visit the video documentation</a>{' '}
<a href="https://owncast.online/docs/configuration">by visiting the documentation.</a> to learn how it impacts your stream performance.
</p> </p>
<p> <p>
<VideoVariantsTable /> <VideoVariantsTable />
</p> </p>
<br/><hr/><br/>
<p> <p>
<VideoLatency /> <VideoLatency />
</p> </p>

View File

@ -89,7 +89,7 @@ export default function Help(props: Props) {
title: 'I want to offload my video to an external storage provider', title: 'I want to offload my video to an external storage provider',
content: ( content: (
<div> <div>
<a href="https://owncast.online/docs/s3/" target="_blank" rel="noopener noreferrer"> <a href="https://owncast.online/docs/storage/" target="_blank" rel="noopener noreferrer">
<LinkOutlined /> Learn more <LinkOutlined /> Learn more
</a> </a>
</div> </div>
@ -131,22 +131,13 @@ export default function Help(props: Props) {
}, },
{ {
icon: <ApiTwoTone style={{ fontSize: '24px' }} />, icon: <ApiTwoTone style={{ fontSize: '24px' }} />,
title: 'I want to use the API', title: 'I want to build add-ons for my Owncast server',
content: ( content: (
<div> <div>
You can view the API documentation for either the You can build your own bots, overlays, tools and add-ons with our
<a href="https://owncast.online/api/latest" target="_blank" rel="noopener noreferrer"> <a href="https://owncast.online/thirdparty" target="_blank" rel="noopener noreferrer">
&nbsp;latest&nbsp; &nbsp;developer APIs.&nbsp;
</a> </a>
or
<a
href="https://owncast.online/api/development"
target="_blank"
rel="noopener noreferrer"
>
&nbsp;development&nbsp;
</a>
release.
</div> </div>
), ),
}, },
@ -166,7 +157,7 @@ export default function Help(props: Props) {
icon={<LinkOutlined />} icon={<LinkOutlined />}
type="primary" type="primary"
> >
Read Troubleshoting Fix your problems
</Button> </Button>
</Col> </Col>
<Col xs={24} lg={12} style={{ textAlign: 'center' }}> <Col xs={24} lg={12} style={{ textAlign: 'center' }}>
@ -175,7 +166,7 @@ export default function Help(props: Props) {
<Button <Button
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
href="https://owncast.online/" href="https://owncast.online/docs"
icon={<LinkOutlined />} icon={<LinkOutlined />}
type="primary" type="primary"
> >