Skip to content

Commit 4e2790e

Browse files
committed
Add title / bracket URL
1 parent c74a67f commit 4e2790e

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

controller/src/tabs/meta/Meta.tsx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ import Store from "../../store"
66
import Scoreboard from "../../model/Scoreboard"
77

88
import * as fa from "@fortawesome/free-solid-svg-icons"
9-
import { Row, Col} from "react-bootstrap"
9+
import { Row, Col, Form} from "react-bootstrap"
1010
import Commentator from "../../model/Commentator"
1111
import SetComponent from "./SetComponent"
1212

13+
import {useStore} from "laco-react"
14+
1315
export default function Meta() {
16+
const scoreboard: Scoreboard = useStore(Store)
1417

1518
const switchAll = () => {
1619
Store.set((state: Scoreboard) => {
@@ -42,6 +45,20 @@ export default function Meta() {
4245
})
4346
}
4447

48+
const changeTitle = ({target}) => {
49+
Store.set((state: Scoreboard) => {
50+
state.title = target.value
51+
return state
52+
})
53+
}
54+
55+
const changeBracketURL = ({target}) => {
56+
Store.set((state: Scoreboard) => {
57+
state.bracketURL = target.value
58+
return state
59+
})
60+
}
61+
4562
return (
4663
<Fragment>
4764
<Row>
@@ -71,6 +88,20 @@ export default function Meta() {
7188
<Col>
7289
<CommentatorInfo slot={1}/>
7390
</Col>
91+
<Col xs={3}>
92+
<Form.Control
93+
size="sm"
94+
placeholder="Stream Title"
95+
value={scoreboard.title}
96+
onChange={changeTitle}
97+
/>
98+
<Form.Control
99+
size="sm"
100+
placeholder="Bracket URL"
101+
value={scoreboard.bracketURL}
102+
onChange={changeBracketURL}
103+
/>
104+
</Col>
74105
</Row>
75106
</Fragment>
76107
)

0 commit comments

Comments
 (0)