]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/twitch-bot/Controls.js
add simple guessing game browser source
[alttp.git] / resources / js / components / twitch-bot / Controls.js
index 84742d8aed9bf6fedeaf5b4860d66fcd661392cc..54f4decd1722f0bcb6488e7f3bb68e05cf1da8e1 100644 (file)
@@ -232,19 +232,34 @@ const Controls = () => {
                                <Col className="mt-5" md={12}>
                                        <div className="d-flex align-items-end justify-content-between">
                                                <h3>{t('twitchBot.guessingGame.settings')}</h3>
-                                               <Button
-                                                       onClick={() => {
-                                                               window.open(
-                                                                       '/guessing-game/controls',
-                                                                       '',
-                                                                       'width=640,height=800,titlebar=0,menubar=0,toolbar=0',
-                                                               );
-                                                       }}
-                                                       title={t('twitchBot.guessingGame.popoutControls')}
-                                                       variant="outline-secondary"
-                                               >
-                                                       <Icon.OPEN title="" />
-                                               </Button>
+                                               <div className="button-bar">
+                                                       {channel.access_key ?
+                                                               <Button
+                                                                       onClick={() => {
+                                                                               window.open(
+                                                                                       `/guessing-game/monitor/${channel.access_key}`,
+                                                                               );
+                                                                       }}
+                                                                       title={t('button.browserSource')}
+                                                                       variant="outline-secondary"
+                                                               >
+                                                                       <Icon.BROWSER_SOURCE title="" />
+                                                               </Button>
+                                                       : null}
+                                                       <Button
+                                                               onClick={() => {
+                                                                       window.open(
+                                                                               '/guessing-game/controls',
+                                                                               '',
+                                                                               'width=640,height=800,titlebar=0,menubar=0,toolbar=0',
+                                                                       );
+                                                               }}
+                                                               title={t('twitchBot.guessingGame.popoutControls')}
+                                                               variant="outline-secondary"
+                                                       >
+                                                               <Icon.OPEN title="" />
+                                                       </Button>
+                                               </div>
                                        </div>
                                        <GuessingSettingsForm
                                                name="gtbk"