Updates to the admin to reflect new stream keys and admin password split

This commit is contained in:
Gabe Kangas
2022-11-28 20:22:26 -08:00
parent c4dc802941
commit d503c8a2e0
8 changed files with 205 additions and 17 deletions

View File

@@ -173,6 +173,10 @@ export const MainLayout: FC<MainLayoutProps> = ({ children }) => {
label: <Link href="/admin/config-server-details">Server Setup</Link>,
key: 'config-server-details',
},
{
label: <Link href="/admin/config/streamkeys/">Server Setup</Link>,
key: 'config-streamkeys',
},
{
label: <Link href="/admin/config-video">Video</Link>,
key: 'config-video',

View File

@@ -26,7 +26,7 @@ export const Offline: FC<OfflineProps> = ({ logs = [], config }) => {
const serverStatusData = useContext(ServerStatusContext);
const { serverConfig } = serverStatusData || {};
const { streamKey, rtmpServerPort } = serverConfig;
const { rtmpServerPort } = serverConfig;
const instanceUrl = global.window?.location.hostname || '';
let rtmpURL;
@@ -58,11 +58,11 @@ export const Offline: FC<OfflineProps> = ({ logs = [], config }) => {
</Paragraph>
)}
<Text strong className="stream-info-label">
Stream Key:
Streaming Keys:
</Text>
<Text strong className="stream-info-box">
<Link href="/admin/config/streamkeys"> View </Link>
</Text>
<Paragraph className="stream-info-box" copyable={{ text: streamKey }}>
*********************
</Paragraph>
</div>
</div>
),

View File

@@ -9,7 +9,7 @@ import {
TEXTFIELD_PROPS_FFMPEG,
TEXTFIELD_PROPS_RTMP_PORT,
TEXTFIELD_PROPS_SOCKET_HOST_OVERRIDE,
TEXTFIELD_PROPS_STREAM_KEY,
TEXTFIELD_PROPS_ADMIN_PASSWORD,
TEXTFIELD_PROPS_WEB_PORT,
} from '../../utils/config-constants';
import { UpdateArgs } from '../../types/config-section';
@@ -24,7 +24,7 @@ export const EditInstanceDetails = () => {
const { serverConfig } = serverStatusData || {};
const { streamKey, ffmpegPath, rtmpServerPort, webServerPort, yp, socketHostOverride } =
const { adminPassword, ffmpegPath, rtmpServerPort, webServerPort, yp, socketHostOverride } =
serverConfig;
const [copyIsVisible, setCopyVisible] = useState(false);
@@ -33,7 +33,7 @@ export const EditInstanceDetails = () => {
useEffect(() => {
setFormDataValues({
streamKey,
adminPassword,
ffmpegPath,
rtmpServerPort,
webServerPort,
@@ -89,10 +89,10 @@ export const EditInstanceDetails = () => {
<div className="field-container field-streamkey-container">
<div className="left-side">
<TextFieldWithSubmit
fieldName="streamKey"
{...TEXTFIELD_PROPS_STREAM_KEY}
value={formDataValues.streamKey}
initialValue={streamKey}
fieldName="adminPassword"
{...TEXTFIELD_PROPS_ADMIN_PASSWORD}
value={formDataValues.adminPassword}
initialValue={adminPassword}
type={TEXTFIELD_TYPE_PASSWORD}
onChange={handleFieldChange}
onSubmit={showStreamKeyChangeMessage}