mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-24 03:55:49 -05:00
new profile settings
This commit is contained in:
@@ -8,7 +8,7 @@ const userSchema = new mongoose.Schema({
|
||||
twitter_name: String,
|
||||
country: String,
|
||||
sens: {
|
||||
sticks: { type: Number, min: -5, max: 5 },
|
||||
stick: { type: Number, min: -5, max: 5 },
|
||||
motion: { type: Number, min: -5, max: 5 },
|
||||
},
|
||||
weapons: [String],
|
||||
|
||||
1842
package-lock.json
generated
1842
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -16,19 +16,19 @@
|
||||
"apollo-server-express": "^2.9.12",
|
||||
"axios": "^0.19.0",
|
||||
"btoa": "^1.2.1",
|
||||
"connect-mongo": "^3.1.2",
|
||||
"connect-mongo": "^3.2.0",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^8.2.0",
|
||||
"express-session": "^1.17.0",
|
||||
"graphql": "^14.5.8",
|
||||
"lodash": "^4.17.15",
|
||||
"mongoose": "^5.7.12",
|
||||
"mongoose": "^5.7.13",
|
||||
"mongoose-unique-validator": "^2.0.3",
|
||||
"node-fetch": "^2.6.0",
|
||||
"passport": "^0.4.0",
|
||||
"passport-discord": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^1.19.4"
|
||||
"nodemon": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ const WeaponDropdown = ({
|
||||
onChange,
|
||||
multiple = false,
|
||||
showImages = true,
|
||||
nonMultiplePlaceholder = "Choose a weapon"
|
||||
nonMultiplePlaceholder = "Choose a weapon",
|
||||
style = {},
|
||||
}) => {
|
||||
return (
|
||||
<Dropdown
|
||||
@@ -21,16 +22,16 @@ const WeaponDropdown = ({
|
||||
multiple={multiple}
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
style={{ width: "270px" }}
|
||||
style={{ width: "270px", ...style }}
|
||||
options={weapons.map(w => ({
|
||||
key: w,
|
||||
text: w,
|
||||
value: w,
|
||||
image: showImages
|
||||
? {
|
||||
src: wpnSmall[weaponDict[w]]
|
||||
src: wpnSmall[weaponDict[w]],
|
||||
}
|
||||
: null
|
||||
: null,
|
||||
}))}
|
||||
/>
|
||||
)
|
||||
|
||||
4
react-ui/src/components/common/WpnImage.js
vendored
4
react-ui/src/components/common/WpnImage.js
vendored
@@ -4,9 +4,9 @@ import english_internal from "../../utils/english_internal.json"
|
||||
import { wpnSmall, wpnMedium } from "../../assets/imageImports"
|
||||
import { Image } from "semantic-ui-react"
|
||||
|
||||
const WpnImage = ({ weapon, size = "MEDIUM" }) => {
|
||||
const WpnImage = ({ weapon, size = "MEDIUM", style = {} }) => {
|
||||
const dictToUse = size === "MEDIUM" ? wpnMedium : wpnSmall
|
||||
return <Image src={dictToUse[english_internal[weapon]]} />
|
||||
return <Image style={style} src={dictToUse[english_internal[weapon]]} />
|
||||
}
|
||||
|
||||
export default WpnImage
|
||||
|
||||
2
react-ui/src/components/plans/MapPlanner.js
vendored
2
react-ui/src/components/plans/MapPlanner.js
vendored
@@ -303,7 +303,7 @@ const MapPlanner = () => {
|
||||
value={controlledValue}
|
||||
onChange={onSketchChange}
|
||||
tool={tool}
|
||||
style={{ position: "relative", left: "-20px" }}
|
||||
style={{ position: "relative", left: "-27px" }}
|
||||
/>
|
||||
<div style={{ marginTop: "1em" }}>
|
||||
<Button primary icon disabled={!canUndo} onClick={() => undo()}>
|
||||
|
||||
22
react-ui/src/components/user/AddBuildForm.js
vendored
22
react-ui/src/components/user/AddBuildForm.js
vendored
@@ -11,7 +11,7 @@ const AddBuildForm = ({
|
||||
setSuccessMsg,
|
||||
existingBuild,
|
||||
setShowEdit,
|
||||
editBuildFunction
|
||||
editBuildFunction,
|
||||
}) => {
|
||||
const scrollRef = useRef(null)
|
||||
const [weapon, setWeapon] = useState(
|
||||
@@ -28,9 +28,13 @@ const AddBuildForm = ({
|
||||
? [
|
||||
[...existingBuild.headgear],
|
||||
[...existingBuild.clothing],
|
||||
[...existingBuild.shoes]
|
||||
[...existingBuild.shoes],
|
||||
]
|
||||
: [
|
||||
["", "", "", ""],
|
||||
["", "", "", ""],
|
||||
["", "", "", ""],
|
||||
]
|
||||
: [["", "", "", ""], ["", "", "", ""], ["", "", "", ""]]
|
||||
)
|
||||
const [headgearItem, setHeadgear] = useState(
|
||||
existingBuild && existingBuild.headgearItem
|
||||
@@ -56,7 +60,7 @@ const AddBuildForm = ({
|
||||
shoes: abilities[2],
|
||||
headgearItem,
|
||||
clothingItem,
|
||||
shoesItem
|
||||
shoesItem,
|
||||
}
|
||||
|
||||
const submit = async e => {
|
||||
@@ -70,17 +74,21 @@ const AddBuildForm = ({
|
||||
if (buildToAdd.shoesItem === "") delete buildToAdd.shoesItem
|
||||
|
||||
await addBuild({
|
||||
variables: { ...buildToAdd }
|
||||
variables: { ...buildToAdd },
|
||||
})
|
||||
|
||||
setWeapon("")
|
||||
setTitle("")
|
||||
setDescription("")
|
||||
setAbilities([["", "", "", ""], ["", "", "", ""], ["", "", "", ""]])
|
||||
setAbilities([
|
||||
["", "", "", ""],
|
||||
["", "", "", ""],
|
||||
["", "", "", ""],
|
||||
])
|
||||
setHeadgear("")
|
||||
setClothing("")
|
||||
setShoes("")
|
||||
setSuccessMsg("New build succesfully added!")
|
||||
setSuccessMsg("New build successfully added!")
|
||||
setTimeout(() => {
|
||||
setSuccessMsg(null)
|
||||
}, 10000)
|
||||
|
||||
2
react-ui/src/components/user/BuildTab.js
vendored
2
react-ui/src/components/user/BuildTab.js
vendored
@@ -76,7 +76,7 @@ const BuildTab = ({ user, userViewed }) => {
|
||||
variables: { ...build },
|
||||
})
|
||||
|
||||
setSuccessMsg("Build successfully edited")
|
||||
setSuccessMsg("Build successfully updated!")
|
||||
window.scrollTo(0, 0)
|
||||
setTimeout(() => {
|
||||
setSuccessMsg(null)
|
||||
|
||||
26
react-ui/src/components/user/CountryDropdown.js
vendored
Normal file
26
react-ui/src/components/user/CountryDropdown.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from "react"
|
||||
import { Dropdown } from "semantic-ui-react"
|
||||
import { countries } from "../../utils/lists"
|
||||
|
||||
const CountryDropdown = ({ value, onChange }) => {
|
||||
return (
|
||||
<Dropdown
|
||||
style={{ maxWidth: "270px" }}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
placeholder="Select Country"
|
||||
fluid
|
||||
search
|
||||
selection
|
||||
clearable
|
||||
options={countries.map(country => ({
|
||||
key: country.code,
|
||||
value: country.code,
|
||||
flag: country.code,
|
||||
text: country.name,
|
||||
}))}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default CountryDropdown
|
||||
82
react-ui/src/components/user/ProfileLists.js
vendored
Normal file
82
react-ui/src/components/user/ProfileLists.js
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
import React from "react"
|
||||
import { List, Flag, Grid } from "semantic-ui-react"
|
||||
import WpnImage from "../common/WpnImage"
|
||||
|
||||
const SensListItem = ({ sens }) => {
|
||||
const stickSensString = sens.stick
|
||||
? `${sens.stick > 0 ? "+" : ""}${sens.stick} Stick`
|
||||
: ""
|
||||
const motionSensString = sens.motion
|
||||
? ` ${sens.motion > 0 ? "+" : ""}${sens.motion} Motion`
|
||||
: ""
|
||||
return (
|
||||
<List.Item>
|
||||
<List.Content>
|
||||
{stickSensString}
|
||||
{motionSensString}
|
||||
</List.Content>
|
||||
</List.Item>
|
||||
)
|
||||
}
|
||||
|
||||
const ProfileLists = ({ user }) => {
|
||||
return (
|
||||
<>
|
||||
<Grid.Column>
|
||||
<List>
|
||||
<List.Item>
|
||||
<List.Icon name="discord" size="large" />
|
||||
<List.Content>{`${user.username}#${user.discriminator}`}</List.Content>
|
||||
</List.Item>
|
||||
{user.twitter_name && (
|
||||
<List.Item>
|
||||
<List.Icon name="twitter" size="large" />
|
||||
<List.Content>
|
||||
<a href={`https://twitter.com/${user.twitter_name}`}>
|
||||
{user.twitter_name}
|
||||
</a>
|
||||
</List.Content>
|
||||
</List.Item>
|
||||
)}
|
||||
{user.twitch_name && (
|
||||
<List.Item>
|
||||
<List.Icon name="twitch" size="large" />
|
||||
<List.Content>
|
||||
<a href={`https://www.twitch.tv/${user.twitch_name}`}>
|
||||
{user.twitch_name}
|
||||
</a>
|
||||
</List.Content>
|
||||
</List.Item>
|
||||
)}
|
||||
</List>
|
||||
</Grid.Column>
|
||||
<Grid.Column>
|
||||
<List>
|
||||
{user.country && (
|
||||
<List.Item>
|
||||
<List.Content>
|
||||
<Flag name={user.country} />
|
||||
Finland
|
||||
</List.Content>
|
||||
</List.Item>
|
||||
)}
|
||||
{user.weapons && (
|
||||
<List.Item>
|
||||
{user.weapons.map(wpn => (
|
||||
<WpnImage
|
||||
key={wpn}
|
||||
weapon={wpn}
|
||||
size="SMALL"
|
||||
style={{ float: "left" }}
|
||||
/>
|
||||
))}
|
||||
</List.Item>
|
||||
)}
|
||||
{user.sens && <SensListItem sens={user.sens} />}
|
||||
</List>
|
||||
</Grid.Column>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default ProfileLists
|
||||
144
react-ui/src/components/user/Settings.js
vendored
Normal file
144
react-ui/src/components/user/Settings.js
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
import React, { useState, useEffect } from "react"
|
||||
import { Header, Form, Select, Button } from "semantic-ui-react"
|
||||
import CountryDropdown from "./CountryDropdown"
|
||||
import WeaponDropdown from "../common/WeaponDropdown"
|
||||
import { updateUser } from "../../graphql/mutations/updateUser"
|
||||
import { searchForUser } from "../../graphql/queries/searchForUser"
|
||||
import { useMutation } from "@apollo/react-hooks"
|
||||
|
||||
const sensOptions = [
|
||||
-5,
|
||||
-4.5,
|
||||
-4,
|
||||
-3.5,
|
||||
-3,
|
||||
-2.5,
|
||||
-2,
|
||||
-1.5,
|
||||
-1,
|
||||
-0.5,
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1.5,
|
||||
2,
|
||||
2.5,
|
||||
3,
|
||||
3.5,
|
||||
4,
|
||||
4.5,
|
||||
5,
|
||||
]
|
||||
|
||||
const Settings = ({ user, closeSettings, handleSuccess, handleError }) => {
|
||||
const [forms, setForms] = useState(user)
|
||||
const [submitDisabled, setSubmitDisabled] = useState(true)
|
||||
|
||||
useEffect(() => {
|
||||
if (JSON.stringify(user) === JSON.stringify(forms)) setSubmitDisabled(true)
|
||||
else if (forms.motion_sens && !forms.stick_sens) setSubmitDisabled(true)
|
||||
else setSubmitDisabled(false)
|
||||
}, [forms, user])
|
||||
|
||||
const [editUserMutation] = useMutation(updateUser, {
|
||||
onCompleted: handleSuccess,
|
||||
onError: handleError,
|
||||
refetchQueries: [
|
||||
{
|
||||
query: searchForUser,
|
||||
variables: { discord_id: user.discord_id },
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
const handleProfileUpdate = async e => {
|
||||
const newProfile = { ...forms }
|
||||
if (newProfile.country === "") newProfile.country = null
|
||||
if (newProfile.stick_sens === "") newProfile.stick_sens = null
|
||||
if (newProfile.motion_sens === "") newProfile.motion_sens = null
|
||||
|
||||
await editUserMutation({
|
||||
variables: { ...newProfile },
|
||||
})
|
||||
}
|
||||
|
||||
const handleWeaponDropdownChange = (e, { value }) => {
|
||||
if (value.length <= 5) {
|
||||
setForms({ ...forms, weapons: value })
|
||||
}
|
||||
}
|
||||
|
||||
const handleCountryDropdownChange = (e, { value }) => {
|
||||
setForms({ ...forms, country: value })
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header>Update profile</Header>
|
||||
<Header size="small">Profile picture</Header>
|
||||
To add a profile picture you need to verify your Twitter on Discord and
|
||||
log back in to sendou.ink
|
||||
<Form style={{ marginTop: "2em" }}>
|
||||
<Form.Field>
|
||||
<label>Country</label>
|
||||
<CountryDropdown
|
||||
value={forms.country}
|
||||
onChange={handleCountryDropdownChange}
|
||||
/>
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<label>Stick sensitivity</label>
|
||||
<Select
|
||||
value={forms.stick_sens}
|
||||
onChange={(e, { value }) =>
|
||||
setForms({ ...forms, stick_sens: value })
|
||||
}
|
||||
placeholder="Stick sensitivity"
|
||||
options={sensOptions.map(sens => ({
|
||||
key: sens,
|
||||
value: sens,
|
||||
text: sens > 0 ? `+${sens}` : sens,
|
||||
}))}
|
||||
style={{ maxWidth: "270px" }}
|
||||
/>
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<label>Motion sensitivity</label>
|
||||
<Select
|
||||
value={forms.motion_sens}
|
||||
onChange={(e, { value }) =>
|
||||
setForms({ ...forms, motion_sens: value })
|
||||
}
|
||||
placeholder="Motion sensitivity"
|
||||
options={sensOptions.map(sens => ({
|
||||
key: sens,
|
||||
value: sens,
|
||||
text: sens > 0 ? `+${sens}` : sens,
|
||||
}))}
|
||||
style={{ maxWidth: "270px" }}
|
||||
/>
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<label>Weapon pool</label>
|
||||
<WeaponDropdown
|
||||
value={forms.weapons}
|
||||
onChange={handleWeaponDropdownChange}
|
||||
multiple
|
||||
/>
|
||||
</Form.Field>
|
||||
</Form>
|
||||
<div style={{ marginTop: "1.5em" }}>
|
||||
<Button onClick={() => handleProfileUpdate()} disabled={submitDisabled}>
|
||||
Save
|
||||
</Button>
|
||||
<span style={{ marginLeft: "0.3em" }}>
|
||||
<Button negative onClick={closeSettings}>
|
||||
Cancel
|
||||
</Button>
|
||||
</span>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Settings
|
||||
116
react-ui/src/components/user/UserPage.js
vendored
116
react-ui/src/components/user/UserPage.js
vendored
@@ -1,5 +1,5 @@
|
||||
import React, { useState, useEffect } from "react"
|
||||
import { Tab, Image, List, Grid } from "semantic-ui-react"
|
||||
import { Tab, Image, Grid, Button, Message } from "semantic-ui-react"
|
||||
import { Redirect } from "react-router-dom"
|
||||
import { useQuery } from "@apollo/react-hooks"
|
||||
import { useParams } from "react-router-dom"
|
||||
@@ -10,6 +10,8 @@ import BuildTab from "./BuildTab"
|
||||
import Loading from "../common/Loading"
|
||||
import Error from "../common/Error"
|
||||
import { useQueryParam, NumberParam } from "use-query-params"
|
||||
import Settings from "./Settings"
|
||||
import ProfileLists from "./ProfileLists"
|
||||
|
||||
const UserPage = () => {
|
||||
const { id } = useParams()
|
||||
@@ -20,6 +22,25 @@ const UserPage = () => {
|
||||
const userLeanQuery = useQuery(userLean)
|
||||
|
||||
const [activeIndex, setActiveIndex] = useState(tab ? tab : 0)
|
||||
const [showSettings, setShowSettings] = useState(false)
|
||||
const [successMsg, setSuccessMsg] = useState(null)
|
||||
const [errorMsg, setErrorMsg] = useState(null)
|
||||
|
||||
const handleError = error => {
|
||||
console.error(error)
|
||||
setErrorMsg(error.message)
|
||||
setTimeout(() => {
|
||||
setErrorMsg(null)
|
||||
}, 10000)
|
||||
}
|
||||
|
||||
const handleSuccess = () => {
|
||||
setShowSettings(false)
|
||||
setSuccessMsg("Profile successfully updated!")
|
||||
setTimeout(() => {
|
||||
setSuccessMsg(null)
|
||||
}, 10000)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (loading || !data || !data.searchForUser) return
|
||||
@@ -36,53 +57,6 @@ const UserPage = () => {
|
||||
const userData = data.searchForUser
|
||||
if (!userData) return <Redirect to="/404" />
|
||||
|
||||
const twitterDiscord = () => {
|
||||
if (userData.twitch_name && userData.twitter_name) {
|
||||
return (
|
||||
<>
|
||||
<List.Item>
|
||||
<List.Icon name="twitter" size="large" />
|
||||
<List.Content>
|
||||
<a href={`https://twitter.com/${userData.twitter_name}`}>
|
||||
{userData.twitter_name}
|
||||
</a>
|
||||
</List.Content>
|
||||
</List.Item>
|
||||
<List.Item>
|
||||
<List.Icon name="twitch" size="large" />
|
||||
<List.Content>
|
||||
<a href={`https://www.twitch.tv/${userData.twitch_name}`}>
|
||||
{userData.twitch_name}
|
||||
</a>
|
||||
</List.Content>
|
||||
</List.Item>
|
||||
</>
|
||||
)
|
||||
} else if (userData.twitch_name) {
|
||||
return (
|
||||
<List.Item>
|
||||
<List.Icon name="twitch" size="large" />
|
||||
<List.Content>
|
||||
<a href={`https://www.twitch.tv/${userData.twitch_name}`}>
|
||||
{userData.twitch_name}
|
||||
</a>
|
||||
</List.Content>
|
||||
</List.Item>
|
||||
)
|
||||
} else if (userData.twitter_name) {
|
||||
return (
|
||||
<List.Item>
|
||||
<List.Icon name="twitter" size="large" />
|
||||
<List.Content>
|
||||
<a href={`https://twitter.com/${userData.twitter_name}`}>
|
||||
{userData.twitter_name}
|
||||
</a>
|
||||
</List.Content>
|
||||
</List.Item>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const panes = [
|
||||
{
|
||||
menuItem: "Builds",
|
||||
@@ -110,7 +84,7 @@ const UserPage = () => {
|
||||
return (
|
||||
<>
|
||||
<>
|
||||
<Grid stackable>
|
||||
<Grid stackable columns={4}>
|
||||
<Grid.Column width={3}>
|
||||
{userData.twitter_name && (
|
||||
<Image
|
||||
@@ -124,23 +98,43 @@ const UserPage = () => {
|
||||
/>
|
||||
)}
|
||||
</Grid.Column>
|
||||
<ProfileLists user={userData} />
|
||||
<Grid.Column>
|
||||
<List>
|
||||
<List.Item>
|
||||
<List.Icon name="discord" size="large" />
|
||||
<List.Content>{`${userData.username}#${userData.discriminator}`}</List.Content>
|
||||
</List.Item>
|
||||
{twitterDiscord()}
|
||||
</List>
|
||||
{!showSettings && userData.id === userLeanQuery.data.user.id && (
|
||||
<Button onClick={() => setShowSettings(!showSettings)}>
|
||||
Profile settings
|
||||
</Button>
|
||||
)}
|
||||
</Grid.Column>
|
||||
</Grid>
|
||||
{successMsg && <Message positive>{successMsg}</Message>}
|
||||
{errorMsg && <Message negative>{errorMsg}</Message>}
|
||||
</>
|
||||
<div style={{ paddingTop: "1.5em" }}>
|
||||
<Tab
|
||||
panes={panes}
|
||||
activeIndex={activeIndex}
|
||||
onTabChange={handleTabChange}
|
||||
/>
|
||||
{showSettings ? (
|
||||
<Settings
|
||||
user={{
|
||||
country: "",
|
||||
motion_sens:
|
||||
userData.sens && userData.sens.motion
|
||||
? userData.sens.motion
|
||||
: "",
|
||||
stick_sens:
|
||||
userData.sens && userData.sens.stick ? userData.sens.stick : "",
|
||||
weapons: [],
|
||||
...userData,
|
||||
}}
|
||||
closeSettings={() => setShowSettings(false)}
|
||||
handleSuccess={() => handleSuccess()}
|
||||
handleError={() => handleError()}
|
||||
/>
|
||||
) : (
|
||||
<Tab
|
||||
panes={panes}
|
||||
activeIndex={activeIndex}
|
||||
onTabChange={handleTabChange}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
17
react-ui/src/graphql/mutations/updateUser.js
vendored
Normal file
17
react-ui/src/graphql/mutations/updateUser.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { gql } from "apollo-boost"
|
||||
|
||||
export const updateUser = gql`
|
||||
mutation updateUser(
|
||||
$country: String
|
||||
$motion_sens: Float
|
||||
$stick_sens: Float
|
||||
$weapons: [String]
|
||||
) {
|
||||
updateUser(
|
||||
country: $country
|
||||
motion_sens: $motion_sens
|
||||
stick_sens: $stick_sens
|
||||
weapons: $weapons
|
||||
)
|
||||
}
|
||||
`
|
||||
@@ -9,6 +9,12 @@ export const searchForUser = gql`
|
||||
discord_id
|
||||
twitch_name
|
||||
twitter_name
|
||||
country
|
||||
weapons
|
||||
sens {
|
||||
stick
|
||||
motion
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
444
react-ui/src/utils/lists.js
vendored
444
react-ui/src/utils/lists.js
vendored
@@ -1,10 +1,252 @@
|
||||
export const countries = [
|
||||
{ code: "af", name: "Afghanistan" },
|
||||
{ code: "ax", name: "Åland Islands" },
|
||||
{ code: "al", name: "Albania" },
|
||||
{ code: "dz", name: "Algeria" },
|
||||
{ code: "as", name: "American Samoa" },
|
||||
{ code: "ad", name: "Andorra" },
|
||||
{ code: "ao", name: "Angola" },
|
||||
{ code: "ai", name: "Anguilla" },
|
||||
{ code: "ag", name: "Antigua and Barbuda" },
|
||||
{ code: "ar", name: "Argentina" },
|
||||
{ code: "am", name: "Armenia" },
|
||||
{ code: "aw", name: "Aruba" },
|
||||
{ code: "au", name: "Australia" },
|
||||
{ code: "at", name: "Austria" },
|
||||
{ code: "az", name: "Azerbaijan" },
|
||||
{ code: "bs", name: "Bahamas" },
|
||||
{ code: "bh", name: "Bahrain" },
|
||||
{ code: "bd", name: "Bangladesh" },
|
||||
{ code: "bb", name: "Barbados" },
|
||||
{ code: "by", name: "Belarus" },
|
||||
{ code: "be", name: "Belgium" },
|
||||
{ code: "bz", name: "Belize" },
|
||||
{ code: "bj", name: "Benin" },
|
||||
{ code: "bm", name: "Bermuda" },
|
||||
{ code: "bt", name: "Bhutan" },
|
||||
{ code: "bo", name: "Bolivia, Plurinational State of" },
|
||||
{ code: "ba", name: "Bosnia and Herzegovina" },
|
||||
{ code: "bw", name: "Botswana" },
|
||||
{ code: "bv", name: "Bouvet Island" },
|
||||
{ code: "br", name: "Brazil" },
|
||||
{ code: "io", name: "BritishIndian Ocean Territory" },
|
||||
{ code: "bn", name: "Brunei Darussalam" },
|
||||
{ code: "bg", name: "Bulgaria" },
|
||||
{ code: "bf", name: "Burkina Faso" },
|
||||
{ code: "bi", name: "Burundi" },
|
||||
{ code: "kh", name: "Cambodia" },
|
||||
{ code: "cm", name: "Cameroon" },
|
||||
{ code: "ca", name: "Canada" },
|
||||
{ code: "cv", name: "Cape Verde" },
|
||||
{ code: "ky", name: "Cayman Islands" },
|
||||
{ code: "cf", name: "Central African Republic" },
|
||||
{ code: "td", name: "Chad" },
|
||||
{ code: "cl", name: "Chile" },
|
||||
{ code: "cn", name: "China" },
|
||||
{ code: "cx", name: "Christmas Island" },
|
||||
{ code: "cc", name: "Cocos (Keeling) Islands" },
|
||||
{ code: "co", name: "Colombia" },
|
||||
{ code: "km", name: "Comoros" },
|
||||
{ code: "cg", name: "Congo" },
|
||||
{ code: "cd", name: "Congo, the Democratic Republic of the" },
|
||||
{ code: "ck", name: "Cook Islands" },
|
||||
{ code: "cr", name: "Costa Rica" },
|
||||
{ code: "ci", name: "Côte d'Ivoire" },
|
||||
{ code: "hr", name: "Croatia" },
|
||||
{ code: "cu", name: "Cuba" },
|
||||
{ code: "cy", name: "Cyprus" },
|
||||
{ code: "cz", name: "Czech Republic" },
|
||||
{ code: "dk", name: "Denmark" },
|
||||
{ code: "dj", name: "Djibouti" },
|
||||
{ code: "dm", name: "Dominica" },
|
||||
{ code: "do", name: "Dominican Republic" },
|
||||
{ code: "ec", name: "Ecuador" },
|
||||
{ code: "eg", name: "Egypt" },
|
||||
{ code: "sv", name: "El Salvador" },
|
||||
{ code: "gq", name: "Equatorial Guinea" },
|
||||
{ code: "er", name: "Eritrea" },
|
||||
{ code: "ee", name: "Estonia" },
|
||||
{ code: "et", name: "Ethiopia" },
|
||||
{ code: "fk", name: "Falkland Islands (Malvinas)" },
|
||||
{ code: "fo", name: "FaroeIslands" },
|
||||
{ code: "fj", name: "Fiji" },
|
||||
{ code: "fi", name: "Finland" },
|
||||
{ code: "fr", name: "France" },
|
||||
{ code: "gf", name: "French Guiana" },
|
||||
{ code: "pf", name: "French Polynesia" },
|
||||
{ code: "tf", name: "French Southern Territories" },
|
||||
{ code: "ga", name: "Gabon" },
|
||||
{ code: "gm", name: "Gambia" },
|
||||
{ code: "ge", name: "Georgia" },
|
||||
{ code: "de", name: "Germany" },
|
||||
{ code: "gh", name: "Ghana" },
|
||||
{ code: "gi", name: "Gibraltar" },
|
||||
{ code: "gr", name: "Greece" },
|
||||
{ code: "gl", name: "Greenland" },
|
||||
{ code: "gd", name: "Grenada" },
|
||||
{ code: "gp", name: "Guadeloupe" },
|
||||
{ code: "gu", name: "Guam" },
|
||||
{ code: "gt", name: "Guatemala" },
|
||||
{ code: "gn", name: "Guinea" },
|
||||
{ code: "gw", name: "Guinea-Bissau" },
|
||||
{ code: "gy", name: "Guyana" },
|
||||
{ code: "ht", name: "Haiti" },
|
||||
{ code: "hm", name: "Heard Island and McDonald Islands" },
|
||||
{ code: "va", name: "Holy See (Vatican City State)" },
|
||||
{ code: "hn", name: "Honduras" },
|
||||
{ code: "hk", name: "Hong Kong" },
|
||||
{ code: "hu", name: "Hungary" },
|
||||
{ code: "is", name: "Iceland" },
|
||||
{ code: "in", name: "India" },
|
||||
{ code: "id", name: "Indonesia" },
|
||||
{ code: "ir", name: "Iran, Islamic Republic of" },
|
||||
{ code: "iq", name: "Iraq" },
|
||||
{ code: "ie", name: "Ireland" },
|
||||
{ code: "il", name: "Israel" },
|
||||
{ code: "it", name: "Italy" },
|
||||
{ code: "jm", name: "Jamaica" },
|
||||
{ code: "jp", name: "Japan" },
|
||||
{ code: "jo", name: "Jordan" },
|
||||
{ code: "kz", name: "Kazakhstan" },
|
||||
{ code: "ke", name: "Kenya" },
|
||||
{ code: "ki", name: "Kiribati" },
|
||||
{ code: "kp", name: "Korea, Democratic People'sRepublic of" },
|
||||
{ code: "kr", name: "Korea, Republic of" },
|
||||
{ code: "kw", name: "Kuwait" },
|
||||
{ code: "kg", name: "Kyrgyzstan" },
|
||||
{ code: "la", name: "Lao People's Democratic Republic" },
|
||||
{ code: "lv", name: "Latvia" },
|
||||
{ code: "lb", name: "Lebanon" },
|
||||
{ code: "ls", name: "Lesotho" },
|
||||
{ code: "lr", name: "Liberia" },
|
||||
{ code: "ly", name: "Libya" },
|
||||
{ code: "li", name: "Liechtenstein" },
|
||||
{ code: "lt", name: "Lithuania" },
|
||||
{ code: "lu", name: "Luxembourg" },
|
||||
{ code: "mo", name: "Macao" },
|
||||
{ code: "mk", name: "Macedonia, the Former Yugoslav Republic of" },
|
||||
{ code: "mg", name: "Madagascar" },
|
||||
{ code: "mw", name: "Malawi" },
|
||||
{ code: "my", name: "Malaysia" },
|
||||
{ code: "mv", name: "Maldives" },
|
||||
{ code: "ml", name: "Mali" },
|
||||
{ code: "mt", name: "Malta" },
|
||||
{ code: "mh", name: "Marshall Islands" },
|
||||
{ code: "mq", name: "Martinique" },
|
||||
{ code: "mr", name: "Mauritania" },
|
||||
{ code: "mu", name: "Mauritius" },
|
||||
{ code: "yt", name: "Mayotte" },
|
||||
{ code: "mx", name: "Mexico" },
|
||||
{ code: "fm", name: "Micronesia, Federated States of" },
|
||||
{ code: "md", name: "Moldova, Republic of" },
|
||||
{ code: "mc", name: "Monaco" },
|
||||
{ code: "mn", name: "Mongolia" },
|
||||
{ code: "me", name: "Montenegro" },
|
||||
{ code: "ms", name: "Montserrat" },
|
||||
{ code: "ma", name: "Morocco" },
|
||||
{ code: "mz", name: "Mozambique" },
|
||||
{ code: "mm", name: "Myanmar" },
|
||||
{ code: "na", name: "Namibia" },
|
||||
{ code: "nr", name: "Nauru" },
|
||||
{ code: "np", name: "Nepal" },
|
||||
{ code: "nl", name: "Netherlands" },
|
||||
{ code: "nc", name: "New Caledonia" },
|
||||
{ code: "nz", name: "New Zealand" },
|
||||
{ code: "ni", name: "Nicaragua" },
|
||||
{ code: "ne", name: "Niger" },
|
||||
{ code: "ng", name: "Nigeria" },
|
||||
{ code: "nu", name: "Niue" },
|
||||
{ code: "nf", name: "Norfolk Island" },
|
||||
{ code: "mp", name: "Northern Mariana Islands" },
|
||||
{ code: "no", name: "Norway" },
|
||||
{ code: "om", name: "Oman" },
|
||||
{ code: "pk", name: "Pakistan" },
|
||||
{ code: "pw", name: "Palau" },
|
||||
{ code: "ps", name: "Palestine, State of" },
|
||||
{ code: "pa", name: "Panama" },
|
||||
{ code: "pg", name: "Papua New Guinea" },
|
||||
{ code: "py", name: "Paraguay" },
|
||||
{ code: "pe", name: "Peru" },
|
||||
{ code: "ph", name: "Philippines" },
|
||||
{ code: "pn", name: "Pitcairn" },
|
||||
{ code: "pl", name: "Poland" },
|
||||
{ code: "pt", name: "Portugal" },
|
||||
{ code: "pr", name: "Puerto Rico" },
|
||||
{ code: "qa", name: "Qatar" },
|
||||
{ code: "re", name: "Réunion" },
|
||||
{ code: "ro", name: "Romania" },
|
||||
{ code: "ru", name: "Russian Federation" },
|
||||
{ code: "rw", name: "Rwanda" },
|
||||
{ code: "sh", name: "Saint Helena, Ascension and Tristan da Cunha" },
|
||||
{ code: "kn", name: "Saint Kitts and Nevis" },
|
||||
{ code: "lc", name: "Saint Lucia" },
|
||||
{ code: "pm", name: "Saint Pierre and Miquelon" },
|
||||
{ code: "vc", name: "Saint Vincent and the Grenadines" },
|
||||
{ code: "ws", name: "Samoa" },
|
||||
{ code: "sm", name: "San Marino" },
|
||||
{ code: "st", name: "Sao Tome and Principe" },
|
||||
{ code: "sa", name: "Saudi Arabia" },
|
||||
{ code: "sn", name: "Senegal" },
|
||||
{ code: "rs", name: "Serbia" },
|
||||
{ code: "sc", name: "Seychelles" },
|
||||
{ code: "sl", name: "Sierra Leone" },
|
||||
{ code: "sg", name: "Singapore" },
|
||||
{ code: "sk", name: "Slovakia" },
|
||||
{ code: "si", name: "Slovenia" },
|
||||
{ code: "sb", name: "Solomon Islands" },
|
||||
{ code: "so", name: "Somalia" },
|
||||
{ code: "za", name: "South Africa" },
|
||||
{ code: "gs", name: "South Georgia and the South Sandwich Islands" },
|
||||
{ code: "es", name: "Spain" },
|
||||
{ code: "lk", name: "Sri Lanka" },
|
||||
{ code: "sd", name: "Sudan" },
|
||||
{ code: "sr", name: "Suriname" },
|
||||
{ code: "sj", name: "Svalbard and Jan Mayen" },
|
||||
{ code: "sz", name: "Swaziland" },
|
||||
{ code: "se", name: "Sweden" },
|
||||
{ code: "ch", name: "Switzerland" },
|
||||
{ code: "sy", name: "Syrian Arab Republic" },
|
||||
{ code: "tw", name: "Taiwan, Province of China" },
|
||||
{ code: "tj", name: "Tajikistan" },
|
||||
{ code: "tz", name: "Tanzania, United Republic of" },
|
||||
{ code: "th", name: "Thailand" },
|
||||
{ code: "tl", name: "Timor-Leste" },
|
||||
{ code: "tg", name: "Togo" },
|
||||
{ code: "tk", name: "Tokelau" },
|
||||
{ code: "to", name: "Tonga" },
|
||||
{ code: "tt", name: "Trinidad and Tobago" },
|
||||
{ code: "tn", name: "Tunisia" },
|
||||
{ code: "tr", name: "Turkey" },
|
||||
{ code: "tm", name: "Turkmenistan" },
|
||||
{ code: "tc", name: "Turks and Caicos Islands" },
|
||||
{ code: "tv", name: "Tuvalu" },
|
||||
{ code: "ug", name: "Uganda" },
|
||||
{ code: "ua", name: "Ukraine" },
|
||||
{ code: "ae", name: "United Arab Emirates" },
|
||||
{ code: "gb", name: "United Kingdom" },
|
||||
{ code: "us", name: "United States" },
|
||||
{ code: "um", name: "United States Minor Outlying Islands" },
|
||||
{ code: "uy", name: "Uruguay" },
|
||||
{ code: "uz", name: "Uzbekistan" },
|
||||
{ code: "vu", name: "Vanuatu" },
|
||||
{ code: "ve", name: "Venezuela, Bolivarian Republic of" },
|
||||
{ code: "vn", name: "Viet Nam" },
|
||||
{ code: "vg", name: "Virgin Islands, British" },
|
||||
{ code: "vi", name: "Virgin Islands, U.S." },
|
||||
{ code: "wf", name: "Wallis and Futuna" },
|
||||
{ code: "eh", name: "Western Sahara" },
|
||||
{ code: "ye", name: "Yemen" },
|
||||
{ code: "zm", name: "Zambia" },
|
||||
{ code: "zw", name: "Zimbabwe" },
|
||||
]
|
||||
|
||||
export const modes = [
|
||||
"",
|
||||
"Splat Zones",
|
||||
"Tower Control",
|
||||
"Rainmaker",
|
||||
"Clam Blitz"
|
||||
];
|
||||
"Clam Blitz",
|
||||
]
|
||||
|
||||
export const months = [
|
||||
"",
|
||||
@@ -19,8 +261,8 @@ export const months = [
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December"
|
||||
];
|
||||
"December",
|
||||
]
|
||||
|
||||
export const weapons = [
|
||||
"Sploosh-o-matic",
|
||||
@@ -151,8 +393,8 @@ export const weapons = [
|
||||
"Tenta Camo Brella",
|
||||
"Undercover Brella",
|
||||
"Undercover Sorella Brella",
|
||||
"Kensa Undercover Brella"
|
||||
];
|
||||
"Kensa Undercover Brella",
|
||||
]
|
||||
|
||||
export const shooters = [
|
||||
"Sploosh-o-matic",
|
||||
@@ -181,8 +423,8 @@ export const shooters = [
|
||||
".96 Gal",
|
||||
".96 Gal Deco",
|
||||
"Jet Squelcher",
|
||||
"Custom Jet Squelcher"
|
||||
];
|
||||
"Custom Jet Squelcher",
|
||||
]
|
||||
|
||||
export const semiauto = [
|
||||
"L-3 Nozzlenose",
|
||||
@@ -192,8 +434,8 @@ export const semiauto = [
|
||||
"H-3 Nozzlenose D",
|
||||
"Cherry H-3 Nozzlenose",
|
||||
"Squeezer",
|
||||
"Foil Squeezer"
|
||||
];
|
||||
"Foil Squeezer",
|
||||
]
|
||||
|
||||
export const blasters = [
|
||||
"Luna Blaster",
|
||||
@@ -210,8 +452,8 @@ export const blasters = [
|
||||
"Rapid Blaster Pro",
|
||||
"Rapid Blaster Pro Deco",
|
||||
"Clash Blaster",
|
||||
"Clash Blaster Neo"
|
||||
];
|
||||
"Clash Blaster Neo",
|
||||
]
|
||||
|
||||
export const rollers = [
|
||||
"Carbon Roller",
|
||||
@@ -223,8 +465,8 @@ export const rollers = [
|
||||
"Gold Dynamo Roller",
|
||||
"Kensa Dynamo Roller",
|
||||
"Flingza Roller",
|
||||
"Foil Flingza Roller"
|
||||
];
|
||||
"Foil Flingza Roller",
|
||||
]
|
||||
|
||||
export const brushes = [
|
||||
"Inkbrush",
|
||||
@@ -232,8 +474,8 @@ export const brushes = [
|
||||
"Permanent Inkbrush",
|
||||
"Octobrush",
|
||||
"Octobrush Nouveau",
|
||||
"Kensa Octobrush"
|
||||
];
|
||||
"Kensa Octobrush",
|
||||
]
|
||||
|
||||
export const chargers = [
|
||||
"Classic Squiffer",
|
||||
@@ -253,8 +495,8 @@ export const chargers = [
|
||||
"Bamboozler 14 Mk II",
|
||||
"Bamboozler 14 Mk III",
|
||||
"Goo Tuber",
|
||||
"Custom Goo Tuber"
|
||||
];
|
||||
"Custom Goo Tuber",
|
||||
]
|
||||
|
||||
export const sloshers = [
|
||||
"Slosher",
|
||||
@@ -268,8 +510,8 @@ export const sloshers = [
|
||||
"Bloblobber",
|
||||
"Bloblobber Deco",
|
||||
"Explosher",
|
||||
"Custom Explosher"
|
||||
];
|
||||
"Custom Explosher",
|
||||
]
|
||||
|
||||
export const splatlings = [
|
||||
"Mini Splatling",
|
||||
@@ -283,8 +525,8 @@ export const splatlings = [
|
||||
"Ballpoint Splatling",
|
||||
"Ballpoint Splatling Nouveau",
|
||||
"Nautilus 47",
|
||||
"Nautilus 79"
|
||||
];
|
||||
"Nautilus 79",
|
||||
]
|
||||
|
||||
export const dualies = [
|
||||
"Dapple Dualies",
|
||||
@@ -299,8 +541,8 @@ export const dualies = [
|
||||
"Dualie Squelchers",
|
||||
"Custom Dualie Squelchers",
|
||||
"Dark Tetra Dualies",
|
||||
"Light Tetra Dualies"
|
||||
];
|
||||
"Light Tetra Dualies",
|
||||
]
|
||||
|
||||
export const brellas = [
|
||||
"Splat Brella",
|
||||
@@ -310,8 +552,8 @@ export const brellas = [
|
||||
"Tenta Camo Brella",
|
||||
"Undercover Brella",
|
||||
"Undercover Sorella Brella",
|
||||
"Kensa Undercover Brella"
|
||||
];
|
||||
"Kensa Undercover Brella",
|
||||
]
|
||||
|
||||
export const weaponsByCategory = {
|
||||
Shooters: shooters,
|
||||
@@ -323,8 +565,8 @@ export const weaponsByCategory = {
|
||||
Sloshers: sloshers,
|
||||
Splatlings: splatlings,
|
||||
Dualies: dualies,
|
||||
Brellas: brellas
|
||||
};
|
||||
Brellas: brellas,
|
||||
}
|
||||
|
||||
export const categoryKeys = [
|
||||
"Shooters",
|
||||
@@ -336,8 +578,8 @@ export const categoryKeys = [
|
||||
"Sloshers",
|
||||
"Splatlings",
|
||||
"Dualies",
|
||||
"Brellas"
|
||||
];
|
||||
"Brellas",
|
||||
]
|
||||
|
||||
export const gearEnglish = [
|
||||
{
|
||||
@@ -353,7 +595,7 @@ export const gearEnglish = [
|
||||
"School Cardigan",
|
||||
"School Uniform",
|
||||
"Squinja Suit",
|
||||
"Steel Platemail"
|
||||
"Steel Platemail",
|
||||
],
|
||||
head: [
|
||||
"Enchanted Hat",
|
||||
@@ -366,7 +608,7 @@ export const gearEnglish = [
|
||||
"Squid Clip-Ons",
|
||||
"Squid Hairclip",
|
||||
"Squinja Mask",
|
||||
"Steel Helm"
|
||||
"Steel Helm",
|
||||
],
|
||||
shoes: [
|
||||
"Enchanted Boots",
|
||||
@@ -379,8 +621,8 @@ export const gearEnglish = [
|
||||
"Samurai Shoes",
|
||||
"School Shoes",
|
||||
"Squinja Boots",
|
||||
"Steel Greaves"
|
||||
]
|
||||
"Steel Greaves",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Annaki",
|
||||
@@ -396,10 +638,10 @@ export const gearEnglish = [
|
||||
"Hula Punk Shirt",
|
||||
"Prune Parashooter",
|
||||
"Red Hula Punk with Tie",
|
||||
"Rockin' Leather Jacket"
|
||||
"Rockin' Leather Jacket",
|
||||
],
|
||||
head: ["Annaki Beret", "Annaki Beret & Glasses", "Annaki Mask"],
|
||||
shoes: ["Annaki Arachno Boots", "Annaki Habaneros", "Annaki Tigers"]
|
||||
shoes: ["Annaki Arachno Boots", "Annaki Habaneros", "Annaki Tigers"],
|
||||
},
|
||||
{
|
||||
brand: "Cuttlegear",
|
||||
@@ -416,7 +658,7 @@ export const gearEnglish = [
|
||||
"Octo Tee",
|
||||
"Old-Timey Clothes",
|
||||
"Red Cuttlegear LS",
|
||||
"Sennyu Suit"
|
||||
"Sennyu Suit",
|
||||
],
|
||||
head: [
|
||||
"Armor Helmet Replica",
|
||||
@@ -427,7 +669,7 @@ export const gearEnglish = [
|
||||
"Null Visor Replica",
|
||||
"Octoling Shades",
|
||||
"Old-Timey Hat",
|
||||
"Studio Octophones"
|
||||
"Studio Octophones",
|
||||
],
|
||||
shoes: [
|
||||
"Armor Boot Replicas",
|
||||
@@ -435,8 +677,8 @@ export const gearEnglish = [
|
||||
"Hero Snowboots Replicas",
|
||||
"Neo Octoling Boots",
|
||||
"Null Boots Replica",
|
||||
"Old-Timey Shoes"
|
||||
]
|
||||
"Old-Timey Shoes",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Enperry",
|
||||
@@ -451,13 +693,13 @@ export const gearEnglish = [
|
||||
"Navy King Tank",
|
||||
"Octoking HK Jersey",
|
||||
"Slash King Tank",
|
||||
"White King Tank"
|
||||
"White King Tank",
|
||||
],
|
||||
head: [
|
||||
"Eminence Cuff",
|
||||
"King Facemask",
|
||||
"King Flip Mesh",
|
||||
"Octoking Facemask"
|
||||
"Octoking Facemask",
|
||||
],
|
||||
shoes: [
|
||||
"Black & Blue Squidkid V",
|
||||
@@ -473,8 +715,8 @@ export const gearEnglish = [
|
||||
"Red & Black Squidkid IV",
|
||||
"Red & White Squidkid V",
|
||||
"Rina Squidkid IV",
|
||||
"Sun & Shade Squidkid IV"
|
||||
]
|
||||
"Sun & Shade Squidkid IV",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Firefin",
|
||||
@@ -493,7 +735,7 @@ export const gearEnglish = [
|
||||
"Khaki 16-Bit FishFry",
|
||||
"White 8-Bit FishFry",
|
||||
"Yellow Urban Vest",
|
||||
"ω-3 Tee"
|
||||
"ω-3 Tee",
|
||||
],
|
||||
head: [
|
||||
"Black FishFry Bandana",
|
||||
@@ -507,9 +749,9 @@ export const gearEnglish = [
|
||||
"Jet Cap",
|
||||
"Jungle Hat",
|
||||
"Knitted Hat",
|
||||
"Octoglasses"
|
||||
"Octoglasses",
|
||||
],
|
||||
shoes: ["Red FishFry Sandals", "Yellow FishFry Sandals"]
|
||||
shoes: ["Red FishFry Sandals", "Yellow FishFry Sandals"],
|
||||
},
|
||||
{
|
||||
brand: "Forge",
|
||||
@@ -526,7 +768,7 @@ export const gearEnglish = [
|
||||
"Green Tee",
|
||||
"Moist Ghillie Suit",
|
||||
"White Leather F-3",
|
||||
"White Sailor Suit"
|
||||
"White Sailor Suit",
|
||||
],
|
||||
head: [
|
||||
"Deca Tackle Visor Helmet",
|
||||
@@ -552,9 +794,9 @@ export const gearEnglish = [
|
||||
"Squidlife Headphones",
|
||||
"Stealth Goggles",
|
||||
"Studio Headphones",
|
||||
"Treasure Hunter"
|
||||
"Treasure Hunter",
|
||||
],
|
||||
shoes: ["Moist Ghillie Boots"]
|
||||
shoes: ["Moist Ghillie Boots"],
|
||||
},
|
||||
{
|
||||
brand: "Grizzco",
|
||||
@@ -570,7 +812,7 @@ export const gearEnglish = [
|
||||
"Online Jersey",
|
||||
"Record Shop Look EP",
|
||||
"Squiddor Polo",
|
||||
"SRL Coat"
|
||||
"SRL Coat",
|
||||
],
|
||||
head: [
|
||||
"Beekeeper Hat",
|
||||
@@ -582,7 +824,7 @@ export const gearEnglish = [
|
||||
"Sailor Cap",
|
||||
"Welding Mask",
|
||||
"Worker's Cap",
|
||||
"Worker's Head Towel"
|
||||
"Worker's Head Towel",
|
||||
],
|
||||
shoes: [
|
||||
"Angry Rain Boots",
|
||||
@@ -590,8 +832,8 @@ export const gearEnglish = [
|
||||
"Friendship Bracelet",
|
||||
"Non-slip Senseis",
|
||||
"Octoleet Boots",
|
||||
"Wooden Sandals"
|
||||
]
|
||||
"Wooden Sandals",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Inkline",
|
||||
@@ -608,7 +850,7 @@ export const gearEnglish = [
|
||||
"Matcha Down Jacket",
|
||||
"Mountain Vest",
|
||||
"Olive Ski Jacket",
|
||||
"Striped Peaks LS"
|
||||
"Striped Peaks LS",
|
||||
],
|
||||
head: [
|
||||
"Bamboo Hat",
|
||||
@@ -618,7 +860,7 @@ export const gearEnglish = [
|
||||
"Seashell Bamboo Hat",
|
||||
"Short Beanie",
|
||||
"Tulip Parasol",
|
||||
"Yamagiri Beanie"
|
||||
"Yamagiri Beanie",
|
||||
],
|
||||
shoes: [
|
||||
"Acerola Rain Boots",
|
||||
@@ -632,8 +874,8 @@ export const gearEnglish = [
|
||||
"Pro Trail Boots",
|
||||
"Snow Delta Straps",
|
||||
"Sunny Climbing Shoes",
|
||||
"Trail Boots"
|
||||
]
|
||||
"Trail Boots",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Krak-On",
|
||||
@@ -647,7 +889,7 @@ export const gearEnglish = [
|
||||
"Rodeo Shirt",
|
||||
"Squid-Pattern Waistcoat",
|
||||
"Squidstar Waistcoat",
|
||||
"Sunny-Day Tee"
|
||||
"Sunny-Day Tee",
|
||||
],
|
||||
head: [
|
||||
"Full Moon Glasses",
|
||||
@@ -655,7 +897,7 @@ export const gearEnglish = [
|
||||
"Long-Billed Cap",
|
||||
"Paisley Bandana",
|
||||
"Two-Stripe Mesh",
|
||||
"Woolly Urchins Classic"
|
||||
"Woolly Urchins Classic",
|
||||
],
|
||||
shoes: [
|
||||
"Banana Basics",
|
||||
@@ -673,8 +915,8 @@ export const gearEnglish = [
|
||||
"Red Hi-Tops",
|
||||
"Red Slip-Ons",
|
||||
"Squid-Stitch Slip-Ons",
|
||||
"Truffle Canvas Hi-Tops"
|
||||
]
|
||||
"Truffle Canvas Hi-Tops",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Rockenberg",
|
||||
@@ -693,7 +935,7 @@ export const gearEnglish = [
|
||||
"Wet Floor Band Tee",
|
||||
"White Baseball LS",
|
||||
"White Inky Rider",
|
||||
"White Urchin Rock Tee"
|
||||
"White Urchin Rock Tee",
|
||||
],
|
||||
head: ["18K Aviators", "SV925 Circle Shades"],
|
||||
shoes: [
|
||||
@@ -718,8 +960,8 @@ export const gearEnglish = [
|
||||
"Squink Wingtips",
|
||||
"Tan Work Boots",
|
||||
"Turquoise Kicks",
|
||||
"White Kicks"
|
||||
]
|
||||
"White Kicks",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Skalop",
|
||||
@@ -734,7 +976,7 @@ export const gearEnglish = [
|
||||
"Mint Tee",
|
||||
"Pearl Tee",
|
||||
"Reggae Tee",
|
||||
"Squid-Stitch Tee"
|
||||
"Squid-Stitch Tee",
|
||||
],
|
||||
head: [
|
||||
"Bike Helmet",
|
||||
@@ -752,9 +994,9 @@ export const gearEnglish = [
|
||||
"Straw Boater",
|
||||
"Streetstyle Cap",
|
||||
"Urchins Cap",
|
||||
"Visor Skate Helmet"
|
||||
"Visor Skate Helmet",
|
||||
],
|
||||
shoes: []
|
||||
shoes: [],
|
||||
},
|
||||
{
|
||||
brand: "Splash Mob",
|
||||
@@ -780,7 +1022,7 @@ export const gearEnglish = [
|
||||
"Varsity Baseball LS",
|
||||
"Whale-Knit Sweater",
|
||||
"White Shirt",
|
||||
"White Striped LS"
|
||||
"White Striped LS",
|
||||
],
|
||||
head: [
|
||||
"Bobble Hat",
|
||||
@@ -790,7 +1032,7 @@ export const gearEnglish = [
|
||||
"Retro Specs",
|
||||
"Sennyu Bon Bon Beanie",
|
||||
"Sennyu Specs",
|
||||
"Striped Beanie"
|
||||
"Striped Beanie",
|
||||
],
|
||||
shoes: [
|
||||
"Green Laceups",
|
||||
@@ -800,8 +1042,8 @@ export const gearEnglish = [
|
||||
"Shark Moccasins",
|
||||
"Strapping Reds",
|
||||
"Strapping Whites",
|
||||
"Tea-Green Hunting Boots"
|
||||
]
|
||||
"Tea-Green Hunting Boots",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "SquidForce",
|
||||
@@ -831,7 +1073,7 @@ export const gearEnglish = [
|
||||
"White LS",
|
||||
"White Tee",
|
||||
"White V-Neck Tee",
|
||||
"Yellow Layered LS"
|
||||
"Yellow Layered LS",
|
||||
],
|
||||
head: [
|
||||
"Anglerfish Mask",
|
||||
@@ -851,9 +1093,9 @@ export const gearEnglish = [
|
||||
"Jetflame Crest",
|
||||
"Fierce Fishskull",
|
||||
"Hivemind Antenna",
|
||||
"Eye of Justice"
|
||||
"Eye of Justice",
|
||||
],
|
||||
shoes: ["Mecha Legs - LBS"]
|
||||
shoes: ["Mecha Legs - LBS"],
|
||||
},
|
||||
{
|
||||
brand: "Takoroka",
|
||||
@@ -872,7 +1114,7 @@ export const gearEnglish = [
|
||||
"Takoroka Nylon Vintage",
|
||||
"Takoroka Rainbow Tie Dye",
|
||||
"Takoroka Windcrusher",
|
||||
"Tricolor Rugby"
|
||||
"Tricolor Rugby",
|
||||
],
|
||||
head: ["Takoroka Mesh", "Takoroka Visor"],
|
||||
shoes: [
|
||||
@@ -889,8 +1131,8 @@ export const gearEnglish = [
|
||||
"Soccer Shoes",
|
||||
"Sunset Orca Hi-Tops",
|
||||
"Trooper Power Stripes",
|
||||
"White Arrows"
|
||||
]
|
||||
"White Arrows",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Tentatek",
|
||||
@@ -903,7 +1145,7 @@ export const gearEnglish = [
|
||||
"Red Tentatek Tee",
|
||||
"Silver Tentatek Vest",
|
||||
"Sky-Blue Squideye",
|
||||
"Tentatek Slogan Tee"
|
||||
"Tentatek Slogan Tee",
|
||||
],
|
||||
head: [
|
||||
"Cycle King Cap",
|
||||
@@ -914,7 +1156,7 @@ export const gearEnglish = [
|
||||
"Purple Novelty Visor",
|
||||
"Soccer Headband",
|
||||
"Sun Visor",
|
||||
"Tennis Headband"
|
||||
"Tennis Headband",
|
||||
],
|
||||
shoes: [
|
||||
"Amber Sea Slug Hi-Tops",
|
||||
@@ -941,8 +1183,8 @@ export const gearEnglish = [
|
||||
"Violet Trainers",
|
||||
"White Norimaki 750s",
|
||||
"Yellow Iromaki 750s",
|
||||
"Yellow-Mesh Sneakers"
|
||||
]
|
||||
"Yellow-Mesh Sneakers",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Toni Kensa",
|
||||
@@ -960,14 +1202,14 @@ export const gearEnglish = [
|
||||
"Positive Longcuff Sweater",
|
||||
"Pullover Coat",
|
||||
"Short Knit Layers",
|
||||
"Toni K. Baseball Jersey"
|
||||
"Toni K. Baseball Jersey",
|
||||
],
|
||||
head: ["Face Visor", "Ink-Guard Goggles", "Toni Kensa Goggles"],
|
||||
shoes: [
|
||||
"Arrow Pull-Ons",
|
||||
"Toni Kensa Black Hi-Tops",
|
||||
"Toni Kensa Soccer Shoes"
|
||||
]
|
||||
"Toni Kensa Soccer Shoes",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Zekko",
|
||||
@@ -991,7 +1233,7 @@ export const gearEnglish = [
|
||||
"Zekko Jade Coat",
|
||||
"Zekko Long Carrot Tee",
|
||||
"Zekko Long Radish Tee",
|
||||
"Zekko Redleaf Coat"
|
||||
"Zekko Redleaf Coat",
|
||||
],
|
||||
head: [
|
||||
"Backwards Cap",
|
||||
@@ -1004,7 +1246,7 @@ export const gearEnglish = [
|
||||
"Tinted Shades",
|
||||
"White Arrowbands",
|
||||
"Zekko Cap",
|
||||
"Zekko Mesh"
|
||||
"Zekko Mesh",
|
||||
],
|
||||
shoes: [
|
||||
"Black Flip-Flops",
|
||||
@@ -1015,8 +1257,8 @@ export const gearEnglish = [
|
||||
"Pearl-Scout Lace-Ups",
|
||||
"Suede Gray Lace-Ups",
|
||||
"Suede Marine Lace-Ups",
|
||||
"Suede Nation Lace-Ups"
|
||||
]
|
||||
"Suede Nation Lace-Ups",
|
||||
],
|
||||
},
|
||||
{
|
||||
brand: "Zink",
|
||||
@@ -1033,14 +1275,14 @@ export const gearEnglish = [
|
||||
"Urchins Jersey",
|
||||
"White Deca Logo Tee",
|
||||
"Zink Layered LS",
|
||||
"Zink LS"
|
||||
"Zink LS",
|
||||
],
|
||||
head: [
|
||||
"B-ball Headband",
|
||||
"Cycling Cap",
|
||||
"Golf Visor",
|
||||
"Squash Headband",
|
||||
"Swim Goggles"
|
||||
"Swim Goggles",
|
||||
],
|
||||
shoes: [
|
||||
"Black Dakroniks",
|
||||
@@ -1054,10 +1296,10 @@ export const gearEnglish = [
|
||||
"White Laceless Dakroniks",
|
||||
"White Seahorses",
|
||||
"Yellow Seahorses",
|
||||
"Zombie Hi-Horses"
|
||||
]
|
||||
}
|
||||
];
|
||||
"Zombie Hi-Horses",
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export const clothingGear = [
|
||||
"Clt_AMB000",
|
||||
@@ -1317,8 +1559,8 @@ export const clothingGear = [
|
||||
"Clt_VST005",
|
||||
"Clt_VST007",
|
||||
"Clt_VST008",
|
||||
"Clt_VST009"
|
||||
];
|
||||
"Clt_VST009",
|
||||
]
|
||||
|
||||
export const headGear = [
|
||||
"Hed_ACC001",
|
||||
@@ -1483,8 +1725,8 @@ export const headGear = [
|
||||
"Hed_VIS001",
|
||||
"Hed_VIS002",
|
||||
"Hed_VIS003",
|
||||
"Hed_VIS004"
|
||||
];
|
||||
"Hed_VIS004",
|
||||
]
|
||||
|
||||
export const shoesGear = [
|
||||
"Shs_AMB000",
|
||||
@@ -1651,5 +1893,5 @@ export const shoesGear = [
|
||||
"Shs_SLP003",
|
||||
"Shs_TRS000",
|
||||
"Shs_TRS001",
|
||||
"Shs_TRS002"
|
||||
];
|
||||
"Shs_TRS002",
|
||||
]
|
||||
|
||||
@@ -14,8 +14,8 @@ const typeDef = gql`
|
||||
extend type Mutation {
|
||||
updateUser(
|
||||
country: String
|
||||
stick_sens: Float
|
||||
motion_sens: Float
|
||||
stick_sens: Float
|
||||
weapons: [String]
|
||||
): Boolean
|
||||
}
|
||||
@@ -78,23 +78,14 @@ const resolvers = {
|
||||
if (args.country)
|
||||
if (
|
||||
countries
|
||||
.map(countryObj => countryObj.Code)
|
||||
.indexOf(args.country.toUpperCase() === -1)
|
||||
.map(countryObj => countryObj.code)
|
||||
.includes(args.country === -1)
|
||||
) {
|
||||
throw new UserInputError("Invalid country ID", {
|
||||
invalidArgs: args,
|
||||
})
|
||||
}
|
||||
|
||||
if (args.motion_sens) {
|
||||
const number = Math.floor(args.motion_sens * 10)
|
||||
if (number < -50 || number > 50 || number % 5 != 0) {
|
||||
throw new UserInputError("Invalid motion sensitivity", {
|
||||
invalidArgs: args,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (args.stick_sens) {
|
||||
const number = Math.floor(args.stick_sens * 10)
|
||||
if (number < -50 || number > 50 || number % 5 != 0) {
|
||||
@@ -102,6 +93,28 @@ const resolvers = {
|
||||
invalidArgs: args,
|
||||
})
|
||||
}
|
||||
|
||||
args.sens = {}
|
||||
args.sens.stick = args.stick_sens
|
||||
delete args.stick_sens
|
||||
}
|
||||
|
||||
if (args.motion_sens) {
|
||||
const number = Math.floor(args.motion_sens * 10)
|
||||
if (number < -50 || number > 50 || number % 5 != 0) {
|
||||
throw new UserInputError("Invalid motion sensitivity", {
|
||||
invalidArgs: args,
|
||||
})
|
||||
}
|
||||
|
||||
if (!args.sens) {
|
||||
throw new UserInputError("Motion sens input without stick sens", {
|
||||
invalidArgs: args,
|
||||
})
|
||||
}
|
||||
|
||||
args.sens.motion = args.motion_sens
|
||||
delete args.motion_sens
|
||||
}
|
||||
|
||||
if (args.weapons) {
|
||||
@@ -110,18 +123,21 @@ const resolvers = {
|
||||
invalidArgs: args,
|
||||
})
|
||||
}
|
||||
|
||||
if (args.weapons.length > 5) {
|
||||
throw new UserInputError("Weapon pool too big", {
|
||||
invalidArgs: args,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const user = await User.findById(args.id)
|
||||
const user = await User.findById(ctx.user._id)
|
||||
if (!user)
|
||||
throw new UserInputError("No user found with the id", {
|
||||
invalidArgs: args,
|
||||
})
|
||||
|
||||
if (ctx.user.discord_id !== user.discord_id)
|
||||
throw new AuthenticationError("No privileges to edit the user")
|
||||
|
||||
await User.findByIdAndUpdate(build._id, { ...user, ...args }).catch(e => {
|
||||
await User.findByIdAndUpdate(ctx.user._id, { ...args }).catch(e => {
|
||||
throw new UserInputError(error.message, {
|
||||
invalidArgs: args,
|
||||
})
|
||||
|
||||
@@ -1,251 +1,243 @@
|
||||
const countries = [
|
||||
{ Code: "AF", Name: "Afghanistan" },
|
||||
{ Code: "AX", Name: "\u00c5land Islands" },
|
||||
{ Code: "AL", Name: "Albania" },
|
||||
{ Code: "DZ", Name: "Algeria" },
|
||||
{ Code: "AS", Name: "American Samoa" },
|
||||
{ Code: "AD", Name: "Andorra" },
|
||||
{ Code: "AO", Name: "Angola" },
|
||||
{ Code: "AI", Name: "Anguilla" },
|
||||
{ Code: "AQ", Name: "Antarctica" },
|
||||
{ Code: "AG", Name: "Antigua and Barbuda" },
|
||||
{ Code: "AR", Name: "Argentina" },
|
||||
{ Code: "AM", Name: "Armenia" },
|
||||
{ Code: "AW", Name: "Aruba" },
|
||||
{ Code: "AU", Name: "Australia" },
|
||||
{ Code: "AT", Name: "Austria" },
|
||||
{ Code: "AZ", Name: "Azerbaijan" },
|
||||
{ Code: "BS", Name: "Bahamas" },
|
||||
{ Code: "BH", Name: "Bahrain" },
|
||||
{ Code: "BD", Name: "Bangladesh" },
|
||||
{ Code: "BB", Name: "Barbados" },
|
||||
{ Code: "BY", Name: "Belarus" },
|
||||
{ Code: "BE", Name: "Belgium" },
|
||||
{ Code: "BZ", Name: "Belize" },
|
||||
{ Code: "BJ", Name: "Benin" },
|
||||
{ Code: "BM", Name: "Bermuda" },
|
||||
{ Code: "BT", Name: "Bhutan" },
|
||||
{ Code: "BO", Name: "Bolivia, Plurinational State of" },
|
||||
{ Code: "BQ", Name: "Bonaire, Sint Eustatius and Saba" },
|
||||
{ Code: "BA", Name: "Bosnia and Herzegovina" },
|
||||
{ Code: "BW", Name: "Botswana" },
|
||||
{ Code: "BV", Name: "Bouvet Island" },
|
||||
{ Code: "BR", Name: "Brazil" },
|
||||
{ Code: "IO", Name: "British Indian Ocean Territory" },
|
||||
{ Code: "BN", Name: "Brunei Darussalam" },
|
||||
{ Code: "BG", Name: "Bulgaria" },
|
||||
{ Code: "BF", Name: "Burkina Faso" },
|
||||
{ Code: "BI", Name: "Burundi" },
|
||||
{ Code: "KH", Name: "Cambodia" },
|
||||
{ Code: "CM", Name: "Cameroon" },
|
||||
{ Code: "CA", Name: "Canada" },
|
||||
{ Code: "CV", Name: "Cape Verde" },
|
||||
{ Code: "KY", Name: "Cayman Islands" },
|
||||
{ Code: "CF", Name: "Central African Republic" },
|
||||
{ Code: "TD", Name: "Chad" },
|
||||
{ Code: "CL", Name: "Chile" },
|
||||
{ Code: "CN", Name: "China" },
|
||||
{ Code: "CX", Name: "Christmas Island" },
|
||||
{ Code: "CC", Name: "Cocos (Keeling) Islands" },
|
||||
{ Code: "CO", Name: "Colombia" },
|
||||
{ Code: "KM", Name: "Comoros" },
|
||||
{ Code: "CG", Name: "Congo" },
|
||||
{ Code: "CD", Name: "Congo, the Democratic Republic of the" },
|
||||
{ Code: "CK", Name: "Cook Islands" },
|
||||
{ Code: "CR", Name: "Costa Rica" },
|
||||
{ Code: "CI", Name: "C\u00f4te d'Ivoire" },
|
||||
{ Code: "HR", Name: "Croatia" },
|
||||
{ Code: "CU", Name: "Cuba" },
|
||||
{ Code: "CW", Name: "Cura\u00e7ao" },
|
||||
{ Code: "CY", Name: "Cyprus" },
|
||||
{ Code: "CZ", Name: "Czech Republic" },
|
||||
{ Code: "DK", Name: "Denmark" },
|
||||
{ Code: "DJ", Name: "Djibouti" },
|
||||
{ Code: "DM", Name: "Dominica" },
|
||||
{ Code: "DO", Name: "Dominican Republic" },
|
||||
{ Code: "EC", Name: "Ecuador" },
|
||||
{ Code: "EG", Name: "Egypt" },
|
||||
{ Code: "SV", Name: "El Salvador" },
|
||||
{ Code: "GQ", Name: "Equatorial Guinea" },
|
||||
{ Code: "ER", Name: "Eritrea" },
|
||||
{ Code: "EE", Name: "Estonia" },
|
||||
{ Code: "ET", Name: "Ethiopia" },
|
||||
{ Code: "FK", Name: "Falkland Islands (Malvinas)" },
|
||||
{ Code: "FO", Name: "Faroe Islands" },
|
||||
{ Code: "FJ", Name: "Fiji" },
|
||||
{ Code: "FI", Name: "Finland" },
|
||||
{ Code: "FR", Name: "France" },
|
||||
{ Code: "GF", Name: "French Guiana" },
|
||||
{ Code: "PF", Name: "French Polynesia" },
|
||||
{ Code: "TF", Name: "French Southern Territories" },
|
||||
{ Code: "GA", Name: "Gabon" },
|
||||
{ Code: "GM", Name: "Gambia" },
|
||||
{ Code: "GE", Name: "Georgia" },
|
||||
{ Code: "DE", Name: "Germany" },
|
||||
{ Code: "GH", Name: "Ghana" },
|
||||
{ Code: "GI", Name: "Gibraltar" },
|
||||
{ Code: "GR", Name: "Greece" },
|
||||
{ Code: "GL", Name: "Greenland" },
|
||||
{ Code: "GD", Name: "Grenada" },
|
||||
{ Code: "GP", Name: "Guadeloupe" },
|
||||
{ Code: "GU", Name: "Guam" },
|
||||
{ Code: "GT", Name: "Guatemala" },
|
||||
{ Code: "GG", Name: "Guernsey" },
|
||||
{ Code: "GN", Name: "Guinea" },
|
||||
{ Code: "GW", Name: "Guinea-Bissau" },
|
||||
{ Code: "GY", Name: "Guyana" },
|
||||
{ Code: "HT", Name: "Haiti" },
|
||||
{ Code: "HM", Name: "Heard Island and McDonald Islands" },
|
||||
{ Code: "VA", Name: "Holy See (Vatican City State)" },
|
||||
{ Code: "HN", Name: "Honduras" },
|
||||
{ Code: "HK", Name: "Hong Kong" },
|
||||
{ Code: "HU", Name: "Hungary" },
|
||||
{ Code: "IS", Name: "Iceland" },
|
||||
{ Code: "IN", Name: "India" },
|
||||
{ Code: "ID", Name: "Indonesia" },
|
||||
{ Code: "IR", Name: "Iran, Islamic Republic of" },
|
||||
{ Code: "IQ", Name: "Iraq" },
|
||||
{ Code: "IE", Name: "Ireland" },
|
||||
{ Code: "IM", Name: "Isle of Man" },
|
||||
{ Code: "IL", Name: "Israel" },
|
||||
{ Code: "IT", Name: "Italy" },
|
||||
{ Code: "JM", Name: "Jamaica" },
|
||||
{ Code: "JP", Name: "Japan" },
|
||||
{ Code: "JE", Name: "Jersey" },
|
||||
{ Code: "JO", Name: "Jordan" },
|
||||
{ Code: "KZ", Name: "Kazakhstan" },
|
||||
{ Code: "KE", Name: "Kenya" },
|
||||
{ Code: "KI", Name: "Kiribati" },
|
||||
{ Code: "KP", Name: "Korea, Democratic People's Republic of" },
|
||||
{ Code: "KR", Name: "Korea, Republic of" },
|
||||
{ Code: "KW", Name: "Kuwait" },
|
||||
{ Code: "KG", Name: "Kyrgyzstan" },
|
||||
{ Code: "LA", Name: "Lao People's Democratic Republic" },
|
||||
{ Code: "LV", Name: "Latvia" },
|
||||
{ Code: "LB", Name: "Lebanon" },
|
||||
{ Code: "LS", Name: "Lesotho" },
|
||||
{ Code: "LR", Name: "Liberia" },
|
||||
{ Code: "LY", Name: "Libya" },
|
||||
{ Code: "LI", Name: "Liechtenstein" },
|
||||
{ Code: "LT", Name: "Lithuania" },
|
||||
{ Code: "LU", Name: "Luxembourg" },
|
||||
{ Code: "MO", Name: "Macao" },
|
||||
{ Code: "MK", Name: "Macedonia, the Former Yugoslav Republic of" },
|
||||
{ Code: "MG", Name: "Madagascar" },
|
||||
{ Code: "MW", Name: "Malawi" },
|
||||
{ Code: "MY", Name: "Malaysia" },
|
||||
{ Code: "MV", Name: "Maldives" },
|
||||
{ Code: "ML", Name: "Mali" },
|
||||
{ Code: "MT", Name: "Malta" },
|
||||
{ Code: "MH", Name: "Marshall Islands" },
|
||||
{ Code: "MQ", Name: "Martinique" },
|
||||
{ Code: "MR", Name: "Mauritania" },
|
||||
{ Code: "MU", Name: "Mauritius" },
|
||||
{ Code: "YT", Name: "Mayotte" },
|
||||
{ Code: "MX", Name: "Mexico" },
|
||||
{ Code: "FM", Name: "Micronesia, Federated States of" },
|
||||
{ Code: "MD", Name: "Moldova, Republic of" },
|
||||
{ Code: "MC", Name: "Monaco" },
|
||||
{ Code: "MN", Name: "Mongolia" },
|
||||
{ Code: "ME", Name: "Montenegro" },
|
||||
{ Code: "MS", Name: "Montserrat" },
|
||||
{ Code: "MA", Name: "Morocco" },
|
||||
{ Code: "MZ", Name: "Mozambique" },
|
||||
{ Code: "MM", Name: "Myanmar" },
|
||||
{ Code: "NA", Name: "Namibia" },
|
||||
{ Code: "NR", Name: "Nauru" },
|
||||
{ Code: "NP", Name: "Nepal" },
|
||||
{ Code: "NL", Name: "Netherlands" },
|
||||
{ Code: "NC", Name: "New Caledonia" },
|
||||
{ Code: "NZ", Name: "New Zealand" },
|
||||
{ Code: "NI", Name: "Nicaragua" },
|
||||
{ Code: "NE", Name: "Niger" },
|
||||
{ Code: "NG", Name: "Nigeria" },
|
||||
{ Code: "NU", Name: "Niue" },
|
||||
{ Code: "NF", Name: "Norfolk Island" },
|
||||
{ Code: "MP", Name: "Northern Mariana Islands" },
|
||||
{ Code: "NO", Name: "Norway" },
|
||||
{ Code: "OM", Name: "Oman" },
|
||||
{ Code: "PK", Name: "Pakistan" },
|
||||
{ Code: "PW", Name: "Palau" },
|
||||
{ Code: "PS", Name: "Palestine, State of" },
|
||||
{ Code: "PA", Name: "Panama" },
|
||||
{ Code: "PG", Name: "Papua New Guinea" },
|
||||
{ Code: "PY", Name: "Paraguay" },
|
||||
{ Code: "PE", Name: "Peru" },
|
||||
{ Code: "PH", Name: "Philippines" },
|
||||
{ Code: "PN", Name: "Pitcairn" },
|
||||
{ Code: "PL", Name: "Poland" },
|
||||
{ Code: "PT", Name: "Portugal" },
|
||||
{ Code: "PR", Name: "Puerto Rico" },
|
||||
{ Code: "QA", Name: "Qatar" },
|
||||
{ Code: "RE", Name: "R\u00e9union" },
|
||||
{ Code: "RO", Name: "Romania" },
|
||||
{ Code: "RU", Name: "Russian Federation" },
|
||||
{ Code: "RW", Name: "Rwanda" },
|
||||
{ Code: "BL", Name: "Saint Barth\u00e9lemy" },
|
||||
{ Code: "SH", Name: "Saint Helena, Ascension and Tristan da Cunha" },
|
||||
{ Code: "KN", Name: "Saint Kitts and Nevis" },
|
||||
{ Code: "LC", Name: "Saint Lucia" },
|
||||
{ Code: "MF", Name: "Saint Martin (French part)" },
|
||||
{ Code: "PM", Name: "Saint Pierre and Miquelon" },
|
||||
{ Code: "VC", Name: "Saint Vincent and the Grenadines" },
|
||||
{ Code: "WS", Name: "Samoa" },
|
||||
{ Code: "SM", Name: "San Marino" },
|
||||
{ Code: "ST", Name: "Sao Tome and Principe" },
|
||||
{ Code: "SA", Name: "Saudi Arabia" },
|
||||
{ Code: "SN", Name: "Senegal" },
|
||||
{ Code: "RS", Name: "Serbia" },
|
||||
{ Code: "SC", Name: "Seychelles" },
|
||||
{ Code: "SL", Name: "Sierra Leone" },
|
||||
{ Code: "SG", Name: "Singapore" },
|
||||
{ Code: "SX", Name: "Sint Maarten (Dutch part)" },
|
||||
{ Code: "SK", Name: "Slovakia" },
|
||||
{ Code: "SI", Name: "Slovenia" },
|
||||
{ Code: "SB", Name: "Solomon Islands" },
|
||||
{ Code: "SO", Name: "Somalia" },
|
||||
{ Code: "ZA", Name: "South Africa" },
|
||||
{ Code: "GS", Name: "South Georgia and the South Sandwich Islands" },
|
||||
{ Code: "SS", Name: "South Sudan" },
|
||||
{ Code: "ES", Name: "Spain" },
|
||||
{ Code: "LK", Name: "Sri Lanka" },
|
||||
{ Code: "SD", Name: "Sudan" },
|
||||
{ Code: "SR", Name: "Suriname" },
|
||||
{ Code: "SJ", Name: "Svalbard and Jan Mayen" },
|
||||
{ Code: "SZ", Name: "Swaziland" },
|
||||
{ Code: "SE", Name: "Sweden" },
|
||||
{ Code: "CH", Name: "Switzerland" },
|
||||
{ Code: "SY", Name: "Syrian Arab Republic" },
|
||||
{ Code: "TW", Name: "Taiwan, Province of China" },
|
||||
{ Code: "TJ", Name: "Tajikistan" },
|
||||
{ Code: "TZ", Name: "Tanzania, United Republic of" },
|
||||
{ Code: "TH", Name: "Thailand" },
|
||||
{ Code: "TL", Name: "Timor-Leste" },
|
||||
{ Code: "TG", Name: "Togo" },
|
||||
{ Code: "TK", Name: "Tokelau" },
|
||||
{ Code: "TO", Name: "Tonga" },
|
||||
{ Code: "TT", Name: "Trinidad and Tobago" },
|
||||
{ Code: "TN", Name: "Tunisia" },
|
||||
{ Code: "TR", Name: "Turkey" },
|
||||
{ Code: "TM", Name: "Turkmenistan" },
|
||||
{ Code: "TC", Name: "Turks and Caicos Islands" },
|
||||
{ Code: "TV", Name: "Tuvalu" },
|
||||
{ Code: "UG", Name: "Uganda" },
|
||||
{ Code: "UA", Name: "Ukraine" },
|
||||
{ Code: "AE", Name: "United Arab Emirates" },
|
||||
{ Code: "GB", Name: "United Kingdom" },
|
||||
{ Code: "US", Name: "United States" },
|
||||
{ Code: "UM", Name: "United States Minor Outlying Islands" },
|
||||
{ Code: "UY", Name: "Uruguay" },
|
||||
{ Code: "UZ", Name: "Uzbekistan" },
|
||||
{ Code: "VU", Name: "Vanuatu" },
|
||||
{ Code: "VE", Name: "Venezuela, Bolivarian Republic of" },
|
||||
{ Code: "VN", Name: "Viet Nam" },
|
||||
{ Code: "VG", Name: "Virgin Islands, British" },
|
||||
{ Code: "VI", Name: "Virgin Islands, U.S." },
|
||||
{ Code: "WF", Name: "Wallis and Futuna" },
|
||||
{ Code: "EH", Name: "Western Sahara" },
|
||||
{ Code: "YE", Name: "Yemen" },
|
||||
{ Code: "ZM", Name: "Zambia" },
|
||||
{ Code: "ZW", Name: "Zimbabwe" },
|
||||
{ code: "af", name: "Afghanistan" },
|
||||
{ code: "ax", name: "Åland Islands" },
|
||||
{ code: "al", name: "Albania" },
|
||||
{ code: "dz", name: "Algeria" },
|
||||
{ code: "as", name: "American Samoa" },
|
||||
{ code: "ad", name: "Andorra" },
|
||||
{ code: "ao", name: "Angola" },
|
||||
{ code: "ai", name: "Anguilla" },
|
||||
{ code: "ag", name: "Antigua and Barbuda" },
|
||||
{ code: "ar", name: "Argentina" },
|
||||
{ code: "am", name: "Armenia" },
|
||||
{ code: "aw", name: "Aruba" },
|
||||
{ code: "au", name: "Australia" },
|
||||
{ code: "at", name: "Austria" },
|
||||
{ code: "az", name: "Azerbaijan" },
|
||||
{ code: "bs", name: "Bahamas" },
|
||||
{ code: "bh", name: "Bahrain" },
|
||||
{ code: "bd", name: "Bangladesh" },
|
||||
{ code: "bb", name: "Barbados" },
|
||||
{ code: "by", name: "Belarus" },
|
||||
{ code: "be", name: "Belgium" },
|
||||
{ code: "bz", name: "Belize" },
|
||||
{ code: "bj", name: "Benin" },
|
||||
{ code: "bm", name: "Bermuda" },
|
||||
{ code: "bt", name: "Bhutan" },
|
||||
{ code: "bo", name: "Bolivia, Plurinational State of" },
|
||||
{ code: "ba", name: "Bosnia and Herzegovina" },
|
||||
{ code: "bw", name: "Botswana" },
|
||||
{ code: "bv", name: "Bouvet Island" },
|
||||
{ code: "br", name: "Brazil" },
|
||||
{ code: "io", name: "BritishIndian Ocean Territory" },
|
||||
{ code: "bn", name: "Brunei Darussalam" },
|
||||
{ code: "bg", name: "Bulgaria" },
|
||||
{ code: "bf", name: "Burkina Faso" },
|
||||
{ code: "bi", name: "Burundi" },
|
||||
{ code: "kh", name: "Cambodia" },
|
||||
{ code: "cm", name: "Cameroon" },
|
||||
{ code: "ca", name: "Canada" },
|
||||
{ code: "cv", name: "Cape Verde" },
|
||||
{ code: "ky", name: "Cayman Islands" },
|
||||
{ code: "cf", name: "Central African Republic" },
|
||||
{ code: "td", name: "Chad" },
|
||||
{ code: "cl", name: "Chile" },
|
||||
{ code: "cn", name: "China" },
|
||||
{ code: "cx", name: "Christmas Island" },
|
||||
{ code: "cc", name: "Cocos (Keeling) Islands" },
|
||||
{ code: "co", name: "Colombia" },
|
||||
{ code: "km", name: "Comoros" },
|
||||
{ code: "cg", name: "Congo" },
|
||||
{ code: "cd", name: "Congo, the Democratic Republic of the" },
|
||||
{ code: "ck", name: "Cook Islands" },
|
||||
{ code: "cr", name: "Costa Rica" },
|
||||
{ code: "ci", name: "Côte d'Ivoire" },
|
||||
{ code: "hr", name: "Croatia" },
|
||||
{ code: "cu", name: "Cuba" },
|
||||
{ code: "cy", name: "Cyprus" },
|
||||
{ code: "cz", name: "Czech Republic" },
|
||||
{ code: "dk", name: "Denmark" },
|
||||
{ code: "dj", name: "Djibouti" },
|
||||
{ code: "dm", name: "Dominica" },
|
||||
{ code: "do", name: "Dominican Republic" },
|
||||
{ code: "ec", name: "Ecuador" },
|
||||
{ code: "eg", name: "Egypt" },
|
||||
{ code: "sv", name: "El Salvador" },
|
||||
{ code: "gq", name: "Equatorial Guinea" },
|
||||
{ code: "er", name: "Eritrea" },
|
||||
{ code: "ee", name: "Estonia" },
|
||||
{ code: "et", name: "Ethiopia" },
|
||||
{ code: "fk", name: "Falkland Islands (Malvinas)" },
|
||||
{ code: "fo", name: "FaroeIslands" },
|
||||
{ code: "fj", name: "Fiji" },
|
||||
{ code: "fi", name: "Finland" },
|
||||
{ code: "fr", name: "France" },
|
||||
{ code: "gf", name: "French Guiana" },
|
||||
{ code: "pf", name: "French Polynesia" },
|
||||
{ code: "tf", name: "French Southern Territories" },
|
||||
{ code: "ga", name: "Gabon" },
|
||||
{ code: "gm", name: "Gambia" },
|
||||
{ code: "ge", name: "Georgia" },
|
||||
{ code: "de", name: "Germany" },
|
||||
{ code: "gh", name: "Ghana" },
|
||||
{ code: "gi", name: "Gibraltar" },
|
||||
{ code: "gr", name: "Greece" },
|
||||
{ code: "gl", name: "Greenland" },
|
||||
{ code: "gd", name: "Grenada" },
|
||||
{ code: "gp", name: "Guadeloupe" },
|
||||
{ code: "gu", name: "Guam" },
|
||||
{ code: "gt", name: "Guatemala" },
|
||||
{ code: "gn", name: "Guinea" },
|
||||
{ code: "gw", name: "Guinea-Bissau" },
|
||||
{ code: "gy", name: "Guyana" },
|
||||
{ code: "ht", name: "Haiti" },
|
||||
{ code: "hm", name: "Heard Island and McDonald Islands" },
|
||||
{ code: "va", name: "Holy See (Vatican City State)" },
|
||||
{ code: "hn", name: "Honduras" },
|
||||
{ code: "hk", name: "Hong Kong" },
|
||||
{ code: "hu", name: "Hungary" },
|
||||
{ code: "is", name: "Iceland" },
|
||||
{ code: "in", name: "India" },
|
||||
{ code: "id", name: "Indonesia" },
|
||||
{ code: "ir", name: "Iran, Islamic Republic of" },
|
||||
{ code: "iq", name: "Iraq" },
|
||||
{ code: "ie", name: "Ireland" },
|
||||
{ code: "il", name: "Israel" },
|
||||
{ code: "it", name: "Italy" },
|
||||
{ code: "jm", name: "Jamaica" },
|
||||
{ code: "jp", name: "Japan" },
|
||||
{ code: "jo", name: "Jordan" },
|
||||
{ code: "kz", name: "Kazakhstan" },
|
||||
{ code: "ke", name: "Kenya" },
|
||||
{ code: "ki", name: "Kiribati" },
|
||||
{ code: "kp", name: "Korea, Democratic People'sRepublic of" },
|
||||
{ code: "kr", name: "Korea, Republic of" },
|
||||
{ code: "kw", name: "Kuwait" },
|
||||
{ code: "kg", name: "Kyrgyzstan" },
|
||||
{ code: "la", name: "Lao People's Democratic Republic" },
|
||||
{ code: "lv", name: "Latvia" },
|
||||
{ code: "lb", name: "Lebanon" },
|
||||
{ code: "ls", name: "Lesotho" },
|
||||
{ code: "lr", name: "Liberia" },
|
||||
{ code: "ly", name: "Libya" },
|
||||
{ code: "li", name: "Liechtenstein" },
|
||||
{ code: "lt", name: "Lithuania" },
|
||||
{ code: "lu", name: "Luxembourg" },
|
||||
{ code: "mo", name: "Macao" },
|
||||
{ code: "mk", name: "Macedonia, the Former Yugoslav Republic of" },
|
||||
{ code: "mg", name: "Madagascar" },
|
||||
{ code: "mw", name: "Malawi" },
|
||||
{ code: "my", name: "Malaysia" },
|
||||
{ code: "mv", name: "Maldives" },
|
||||
{ code: "ml", name: "Mali" },
|
||||
{ code: "mt", name: "Malta" },
|
||||
{ code: "mh", name: "Marshall Islands" },
|
||||
{ code: "mq", name: "Martinique" },
|
||||
{ code: "mr", name: "Mauritania" },
|
||||
{ code: "mu", name: "Mauritius" },
|
||||
{ code: "yt", name: "Mayotte" },
|
||||
{ code: "mx", name: "Mexico" },
|
||||
{ code: "fm", name: "Micronesia, Federated States of" },
|
||||
{ code: "md", name: "Moldova, Republic of" },
|
||||
{ code: "mc", name: "Monaco" },
|
||||
{ code: "mn", name: "Mongolia" },
|
||||
{ code: "me", name: "Montenegro" },
|
||||
{ code: "ms", name: "Montserrat" },
|
||||
{ code: "ma", name: "Morocco" },
|
||||
{ code: "mz", name: "Mozambique" },
|
||||
{ code: "mm", name: "Myanmar" },
|
||||
{ code: "na", name: "Namibia" },
|
||||
{ code: "nr", name: "Nauru" },
|
||||
{ code: "np", name: "Nepal" },
|
||||
{ code: "nl", name: "Netherlands" },
|
||||
{ code: "nc", name: "New Caledonia" },
|
||||
{ code: "nz", name: "New Zealand" },
|
||||
{ code: "ni", name: "Nicaragua" },
|
||||
{ code: "ne", name: "Niger" },
|
||||
{ code: "ng", name: "Nigeria" },
|
||||
{ code: "nu", name: "Niue" },
|
||||
{ code: "nf", name: "Norfolk Island" },
|
||||
{ code: "mp", name: "Northern Mariana Islands" },
|
||||
{ code: "no", name: "Norway" },
|
||||
{ code: "om", name: "Oman" },
|
||||
{ code: "pk", name: "Pakistan" },
|
||||
{ code: "pw", name: "Palau" },
|
||||
{ code: "ps", name: "Palestine, State of" },
|
||||
{ code: "pa", name: "Panama" },
|
||||
{ code: "pg", name: "Papua New Guinea" },
|
||||
{ code: "py", name: "Paraguay" },
|
||||
{ code: "pe", name: "Peru" },
|
||||
{ code: "ph", name: "Philippines" },
|
||||
{ code: "pn", name: "Pitcairn" },
|
||||
{ code: "pl", name: "Poland" },
|
||||
{ code: "pt", name: "Portugal" },
|
||||
{ code: "pr", name: "Puerto Rico" },
|
||||
{ code: "qa", name: "Qatar" },
|
||||
{ code: "re", name: "Réunion" },
|
||||
{ code: "ro", name: "Romania" },
|
||||
{ code: "ru", name: "Russian Federation" },
|
||||
{ code: "rw", name: "Rwanda" },
|
||||
{ code: "sh", name: "Saint Helena, Ascension and Tristan da Cunha" },
|
||||
{ code: "kn", name: "Saint Kitts and Nevis" },
|
||||
{ code: "lc", name: "Saint Lucia" },
|
||||
{ code: "pm", name: "Saint Pierre and Miquelon" },
|
||||
{ code: "vc", name: "Saint Vincent and the Grenadines" },
|
||||
{ code: "ws", name: "Samoa" },
|
||||
{ code: "sm", name: "San Marino" },
|
||||
{ code: "st", name: "Sao Tome and Principe" },
|
||||
{ code: "sa", name: "Saudi Arabia" },
|
||||
{ code: "sn", name: "Senegal" },
|
||||
{ code: "rs", name: "Serbia" },
|
||||
{ code: "sc", name: "Seychelles" },
|
||||
{ code: "sl", name: "Sierra Leone" },
|
||||
{ code: "sg", name: "Singapore" },
|
||||
{ code: "sk", name: "Slovakia" },
|
||||
{ code: "si", name: "Slovenia" },
|
||||
{ code: "sb", name: "Solomon Islands" },
|
||||
{ code: "so", name: "Somalia" },
|
||||
{ code: "za", name: "South Africa" },
|
||||
{ code: "gs", name: "South Georgia and the South Sandwich Islands" },
|
||||
{ code: "es", name: "Spain" },
|
||||
{ code: "lk", name: "Sri Lanka" },
|
||||
{ code: "sd", name: "Sudan" },
|
||||
{ code: "sr", name: "Suriname" },
|
||||
{ code: "sj", name: "Svalbard and Jan Mayen" },
|
||||
{ code: "sz", name: "Swaziland" },
|
||||
{ code: "se", name: "Sweden" },
|
||||
{ code: "ch", name: "Switzerland" },
|
||||
{ code: "sy", name: "Syrian Arab Republic" },
|
||||
{ code: "tw", name: "Taiwan, Province of China" },
|
||||
{ code: "tj", name: "Tajikistan" },
|
||||
{ code: "tz", name: "Tanzania, United Republic of" },
|
||||
{ code: "th", name: "Thailand" },
|
||||
{ code: "tl", name: "Timor-Leste" },
|
||||
{ code: "tg", name: "Togo" },
|
||||
{ code: "tk", name: "Tokelau" },
|
||||
{ code: "to", name: "Tonga" },
|
||||
{ code: "tt", name: "Trinidad and Tobago" },
|
||||
{ code: "tn", name: "Tunisia" },
|
||||
{ code: "tr", name: "Turkey" },
|
||||
{ code: "tm", name: "Turkmenistan" },
|
||||
{ code: "tc", name: "Turks and Caicos Islands" },
|
||||
{ code: "tv", name: "Tuvalu" },
|
||||
{ code: "ug", name: "Uganda" },
|
||||
{ code: "ua", name: "Ukraine" },
|
||||
{ code: "ae", name: "United Arab Emirates" },
|
||||
{ code: "gb", name: "United Kingdom" },
|
||||
{ code: "us", name: "United States" },
|
||||
{ code: "um", name: "United States Minor Outlying Islands" },
|
||||
{ code: "uy", name: "Uruguay" },
|
||||
{ code: "uz", name: "Uzbekistan" },
|
||||
{ code: "vu", name: "Vanuatu" },
|
||||
{ code: "ve", name: "Venezuela, Bolivarian Republic of" },
|
||||
{ code: "vn", name: "Viet Nam" },
|
||||
{ code: "vg", name: "Virgin Islands, British" },
|
||||
{ code: "vi", name: "Virgin Islands, U.S." },
|
||||
{ code: "wf", name: "Wallis and Futuna" },
|
||||
{ code: "eh", name: "Western Sahara" },
|
||||
{ code: "ye", name: "Yemen" },
|
||||
{ code: "zm", name: "Zambia" },
|
||||
{ code: "zw", name: "Zimbabwe" },
|
||||
]
|
||||
|
||||
module.exports = countries
|
||||
|
||||
Reference in New Issue
Block a user