rm chat disable btn from server settings page (#260)
This commit is contained in:
@@ -4,7 +4,6 @@ import { CopyOutlined, RedoOutlined } from '@ant-design/icons';
|
|||||||
|
|
||||||
import { TEXTFIELD_TYPE_NUMBER, TEXTFIELD_TYPE_PASSWORD } from './form-textfield';
|
import { TEXTFIELD_TYPE_NUMBER, TEXTFIELD_TYPE_PASSWORD } from './form-textfield';
|
||||||
import TextFieldWithSubmit from './form-textfield-with-submit';
|
import TextFieldWithSubmit from './form-textfield-with-submit';
|
||||||
import ToggleSwitch from './form-toggleswitch';
|
|
||||||
|
|
||||||
import { ServerStatusContext } from '../../utils/server-status-context';
|
import { ServerStatusContext } from '../../utils/server-status-context';
|
||||||
import { AlertMessageContext } from '../../utils/alert-message-context';
|
import { AlertMessageContext } from '../../utils/alert-message-context';
|
||||||
@@ -14,7 +13,6 @@ import {
|
|||||||
TEXTFIELD_PROPS_RTMP_PORT,
|
TEXTFIELD_PROPS_RTMP_PORT,
|
||||||
TEXTFIELD_PROPS_STREAM_KEY,
|
TEXTFIELD_PROPS_STREAM_KEY,
|
||||||
TEXTFIELD_PROPS_WEB_PORT,
|
TEXTFIELD_PROPS_WEB_PORT,
|
||||||
FIELD_PROPS_DISABLE_CHAT,
|
|
||||||
} from '../../utils/config-constants';
|
} from '../../utils/config-constants';
|
||||||
|
|
||||||
import { UpdateArgs } from '../../types/config-section';
|
import { UpdateArgs } from '../../types/config-section';
|
||||||
@@ -29,7 +27,7 @@ export default function EditInstanceDetails() {
|
|||||||
|
|
||||||
const { serverConfig } = serverStatusData || {};
|
const { serverConfig } = serverStatusData || {};
|
||||||
|
|
||||||
const { chatDisabled, streamKey, ffmpegPath, rtmpServerPort, webServerPort, yp } = serverConfig;
|
const { streamKey, ffmpegPath, rtmpServerPort, webServerPort, yp } = serverConfig;
|
||||||
|
|
||||||
const [copyIsVisible, setCopyVisible] = useState(false);
|
const [copyIsVisible, setCopyVisible] = useState(false);
|
||||||
|
|
||||||
@@ -41,7 +39,6 @@ export default function EditInstanceDetails() {
|
|||||||
ffmpegPath,
|
ffmpegPath,
|
||||||
rtmpServerPort,
|
rtmpServerPort,
|
||||||
webServerPort,
|
webServerPort,
|
||||||
chatDisabled,
|
|
||||||
});
|
});
|
||||||
}, [serverConfig]);
|
}, [serverConfig]);
|
||||||
|
|
||||||
@@ -88,10 +85,6 @@ export default function EditInstanceDetails() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleChatDisableChange(disabled: boolean) {
|
|
||||||
handleFieldChange({ fieldName: 'chatDisabled', value: disabled });
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="edit-server-details-container">
|
<div className="edit-server-details-container">
|
||||||
<div className="field-container field-streamkey-container">
|
<div className="field-container field-streamkey-container">
|
||||||
@@ -145,13 +138,6 @@ export default function EditInstanceDetails() {
|
|||||||
onChange={handleFieldChange}
|
onChange={handleFieldChange}
|
||||||
onSubmit={showConfigurationRestartMessage}
|
onSubmit={showConfigurationRestartMessage}
|
||||||
/>
|
/>
|
||||||
<ToggleSwitch
|
|
||||||
fieldName="chatDisabled"
|
|
||||||
{...FIELD_PROPS_DISABLE_CHAT}
|
|
||||||
checked={formDataValues.chatDisabled}
|
|
||||||
onChange={handleChatDisableChange}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{yp.enabled && (
|
{yp.enabled && (
|
||||||
<Collapse className="advanced-settings">
|
<Collapse className="advanced-settings">
|
||||||
<Panel header="Advanced Settings" key="1">
|
<Panel header="Advanced Settings" key="1">
|
||||||
|
|||||||
Reference in New Issue
Block a user