X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Ftournament%2FSettingsDialog.js;h=af4d664efe0d2f60c435e169c9a000a395b39bd6;hb=f446d5bcf3b87bd9443a060e27e9c0601c96fbb9;hp=995c07b8250ee4388a267b26bac67c0b0880ad62;hpb=d566d913c251fbb05e6bd314cc51f8b5ca49fe57;p=alttp.git diff --git a/resources/js/components/tournament/SettingsDialog.js b/resources/js/components/tournament/SettingsDialog.js index 995c07b..af4d664 100644 --- a/resources/js/components/tournament/SettingsDialog.js +++ b/resources/js/components/tournament/SettingsDialog.js @@ -1,10 +1,11 @@ import axios from 'axios'; import PropTypes from 'prop-types'; import React from 'react'; -import { Button, Modal } from 'react-bootstrap'; +import { Button, Col, Modal, Row } from 'react-bootstrap'; import { withTranslation } from 'react-i18next'; import toastr from 'toastr'; +import DiscordForm from './DiscordForm'; import DiscordSelect from '../common/DiscordSelect'; import Icon from '../common/Icon'; import ToggleSwitch from '../common/ToggleSwitch'; @@ -55,52 +56,72 @@ const setDiscord = async (tournament, guild_id) => { } }; +const inviteUrl = 'https://discordapp.com/oauth2/authorize?client_id=951113702839549982&scope=bot'; + const SettingsDialog = ({ onHide, show, tournament, }) => - + {i18n.t('tournaments.settings')} -
- {i18n.t('tournaments.open')} - value ? open(tournament) : close(tournament)} - value={tournament.accept_applications} - /> -
-
- {i18n.t('tournaments.locked')} - value ? lock(tournament) : unlock(tournament)} - value={tournament.locked} - /> -
-
-
-

{i18n.t('tournaments.discord')}

-
- + + +
+ {i18n.t('tournaments.open')} + value + ? open(tournament) : close(tournament)} + value={tournament.accept_applications} + /> +
+
+ {i18n.t('tournaments.locked')} + value + ? lock(tournament) : unlock(tournament)} + value={tournament.locked} + /> +
+
+
+

{i18n.t('tournaments.discord')}

+ {!tournament.discord ? +
+ +
+ : null} +
+ setDiscord(tournament, value)} + value={tournament.discord} + />
-
- setDiscord(tournament, value)} - value={tournament.discord} - /> -
+ + {tournament.discord ? + + + + : null} +