Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

make basic form field wit no submit, so a submit text field can compose it

gingervitis579a0a883857
diff --git a/web/pages/components/config/edit-tags.tsx b/web/pages/components/config/edit-tags.tsx
index c496c624ec..7b05347b95 100644
--- a/web/pages/components/config/edit-tags.tsx
+++ b/web/pages/components/config/edit-tags.tsx
@@ -4,6 +4,8 @@ import { Typography, Tag, Input } from 'antd';
import { ServerStatusContext } from '../../../utils/server-status-context';
import { FIELD_PROPS_TAGS, RESET_TIMEOUT, SUCCESS_STATES, postConfigUpdateToAPI } from './constants';
+import TextField from './form-textfield-nosubmit';
+import { UpdateArgs } from '../../../types/config-section';
const { Title } = Typography;
@@ -59,11 +61,11 @@ export default function EditInstanceTags() {
});
};
- const handleInputChange = e => {
+ const handleInputChange = ({ value }: UpdateArgs) => {
if (submitStatusMessage !== '') {
setSubmitStatusMessage('');
}
- setNewTagInput(e.target.value);
+ setNewTagInput(value);
};
// send to api and do stuff
@@ -115,7 +117,18 @@ export default function EditInstanceTags() {
{newStatusIcon} {newStatusMessage} {submitStatusMessage}
</div>
<div className="add-new-tag-section">
- <Input
+ <TextField
+ fieldName="tag-input"
+ value={newTagInput}
+ className="new-tag-input"
+ onChange={handleInputChange}
+ onPressEnter={handleSubmitNewTag}
+ maxLength={maxLength}
+ placeholder={placeholder}
+
+ message={`${newStatusIcon} ${newStatusMessage} ${submitStatusMessage}`}
+ />
+ {/* <Input
type="text"
className="new-tag-input"
value={newTagInput}
@@ -124,7 +137,7 @@ export default function EditInstanceTags() {
maxLength={maxLength}
placeholder={placeholder}
allowClear
- />
+ /> */}
</div>
</div>
);
diff --git a/web/pages/index.tsx b/web/pages/index.tsx
index 13adcd505f..c8ab68adba 100644
--- a/web/pages/index.tsx
+++ b/web/pages/index.tsx
@@ -16,7 +16,7 @@ import StatisticItem from "./components/statistic"
import LogTable from "./components/log-table";
import Offline from './offline-notice';
import TextField from './components/config/form-textfield';
-import { API_STREAM_TITLE, postConfigUpdateToAPI, TEXTFIELD_PROPS_STREAM_TITLE } from './components/config/constants';
+import { TEXTFIELD_PROPS_STREAM_TITLE } from './components/config/constants';
import {
LOGS_WARN,