X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Ftournament%2FSettingsDialog.js;h=46fbfd87ecae299ec5aef94bddebbf71c691af9b;hb=ac6921da72ff4b0beab9e5f1308788a55aae3ad9;hp=362cd6fbab36595da9754e1784eb4325911984d9;hpb=537b998e8059c56e3a20ee2a89d42c3bbfbb80b8;p=alttp.git diff --git a/resources/js/components/tournament/SettingsDialog.js b/resources/js/components/tournament/SettingsDialog.js index 362cd6f..46fbfd8 100644 --- a/resources/js/components/tournament/SettingsDialog.js +++ b/resources/js/components/tournament/SettingsDialog.js @@ -57,6 +57,15 @@ const setDiscord = async (tournament, guild_id) => { } }; +const settings = async (tournament, params) => { + try { + await axios.post(`/api/tournaments/${tournament.id}/settings`, params); + toastr.success(i18n.t('tournaments.settingsSuccess')); + } catch (e) { + toastr.error(i18n.t('tournaments.settingsError')); + } +}; + const inviteUrl = 'https://discordapp.com/oauth2/authorize?client_id=951113702839549982&scope=bot'; const SettingsDialog = ({ @@ -96,6 +105,14 @@ const SettingsDialog = ({ value={tournament.locked} /> +
{i18n.t('tournaments.discord')}
@@ -140,6 +157,7 @@ SettingsDialog.propTypes = { accept_applications: PropTypes.bool, discord: PropTypes.string, locked: PropTypes.bool, + show_numbers: PropTypes.bool, }), };