diff --git a/configschema.json b/configschema.json index d6c728b..413f0fe 100644 --- a/configschema.json +++ b/configschema.json @@ -17,7 +17,7 @@ "steamApiKey": { "type": "string", "description": "Steam API key used to get steam profile pictures (https://steamcommunity.com/dev/apikey)", - "default": "STEAM-API-KEY" + "default": "D9A12350EB5284BDCC1FA72AD2EAE154" }, "gameSettings": { "type": "object", diff --git a/package-lock.json b/package-lock.json index 9f1449e..12f2485 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,12 @@ { "name": "nodecg-csgo-manager", - "version": "0.8.1", + "version": "0.8.2", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.8.1", + "name": "nodecg-csgo-manager", + "version": "0.8.2", "license": "GPL-3.0-or-later", "dependencies": { "@material-ui/core": "^4.11.3", @@ -19006,28 +19007,23 @@ "integrity": "sha512-LkaEH9HHr9fodmm3txF4nFMyHN3Yr50HcpD/DBHpLCxzM9doV8AV0er6aBWva4IDs2aA9kGguces0rp+WKL7rg==" }, "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", + "bn.js": "^4.4.0", + "brorand": "^1.0.1", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" }, "dependencies": { "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" } } }, diff --git a/package.json b/package.json index 31e120e..dc23768 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodecg-csgo-manager", - "version": "0.8.1", + "version": "0.8.2", "description": "Layouts for CSGO spectating", "homepage": "", "author": { diff --git a/src/dashboard/setup/team-preset-creator/team-preset-creator.tsx b/src/dashboard/setup/team-preset-creator/team-preset-creator.tsx index ce98ae6..8d8ae12 100644 --- a/src/dashboard/setup/team-preset-creator/team-preset-creator.tsx +++ b/src/dashboard/setup/team-preset-creator/team-preset-creator.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import styled from 'styled-components'; /* eslint-disable-next-line */ -// @ts-ignore +// @ts-ignore import Twemoji from 'react-twemoji'; import { render } from 'react-dom'; import { useListenFor, useReplicant } from 'use-nodecg'; @@ -51,6 +51,7 @@ export const TeamPresetCreator: React.FC = () => { const [localName, setLocalName] = useState(''); const [localPfp, setLocalPfp] = useState(''); const [localCountry, setLocalCountry] = useState(''); + const [localCountryTeam, setLocalCountryTeam] = useState(''); const [localLogo, setLocalLogo] = useState(''); const [localTeamName, setLocalTeamName] = useState(''); const [localTeamAlias, setLocalTeamAlias] = useState(''); @@ -174,6 +175,7 @@ export const TeamPresetCreator: React.FC = () => { setLocalTeamAlias(foundTeamPreset.alias); setLocalTeamName(foundTeamPreset.name); setLocalLogo(foundTeamPreset.logo || ''); + setLocalCountryTeam(foundTeamPreset.country || ''); } } }, [localTeamPresetAlias, teamPresetsRep.teams, localTeamName]); @@ -201,6 +203,7 @@ export const TeamPresetCreator: React.FC = () => { name: localTeamName, alias: localTeamAlias, logo: localLogo, + country: localCountryTeam }); setSnackbarMsg(`Added ${localName}`); @@ -208,6 +211,7 @@ export const TeamPresetCreator: React.FC = () => { setLocalTeamPresetAlias(''); setLocalTeamName(''); setLocalLogo(''); + setLocalCountryTeam(''); } function AddPlayer(): void { @@ -317,6 +321,15 @@ export const TeamPresetCreator: React.FC = () => { {teamLogoList} + + Country + + { pushNewPlayerData(player); }); -nodecg.listenFor('newTeam', (data: { name: string; alias: string; logo?: string }) => { +nodecg.listenFor('newTeam', (data: { name: string; alias: string; logo?: string; country?: string }) => { nodecg.log.info('Adding ' + data.alias); const teamObj: TeamMeta = { alias: data.alias, name: data.name, logo: data.logo, + country: data.country, }; // Clear undefined props _.pickBy(teamObj, _.identity); diff --git a/types/team-preset.d.ts b/types/team-preset.d.ts index 7b95623..3b65efd 100644 --- a/types/team-preset.d.ts +++ b/types/team-preset.d.ts @@ -2,6 +2,7 @@ interface TeamMeta { alias: string; name: string; logo?: string; + country?: string; } interface Player {