styling + dist config

This commit is contained in:
YadPe
2019-08-01 18:22:34 +02:00
parent 10684b1de5
commit edd95feb80
30 changed files with 420 additions and 119 deletions
+2 -5
View File
@@ -1,7 +1,7 @@
# Beatconnect irc bot
This App gives you access to all the beatmaps mirrored on [Beatconect](https://beatconnect.io). You can downloads multiple beatmaps that will be automaticaly imported into osu! </br>
Plus, you can launch an IRC bot from the app that will make all available commands usable to peoples pming you and from all the matches chat that the bot is connected to. (how to connect docs soon..)
Plus, you can launch an IRC bot from the app that will make all available commands usable to peoples pming you and from all the matches chats that the bot is connected to. (how to connect docs soon..)
<img src="https://cdn.discordapp.com/attachments/414474227710820352/606134985971204096/unknown.png">
@@ -27,13 +27,10 @@ $ cd beatconnect_irc_bot
# Install dependencies
$ npm i
# Copy conf_template.js as conf.js then fill it with all the informations needed
$ cp conf_template.js ./src/Bot/conf.js
# Build the react App
$ npm run build
# Run the electron App
# Run electron
$ electron .
```
View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

+87 -26
View File
@@ -1922,7 +1922,8 @@
"array-find-index": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
"integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E="
"integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
"dev": true
},
"array-flatten": {
"version": "1.1.1",
@@ -3016,6 +3017,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
"dev": true,
"requires": {
"camelcase": "^2.0.0",
"map-obj": "^1.0.0"
@@ -3024,7 +3026,8 @@
"camelcase": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
"integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8="
"integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
"dev": true
}
}
},
@@ -3887,6 +3890,7 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
"integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
"dev": true,
"requires": {
"array-find-index": "^1.0.1"
}
@@ -3971,7 +3975,8 @@
"deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"dev": true
},
"deep-is": {
"version": "0.1.3",
@@ -4321,6 +4326,7 @@
"version": "5.0.6",
"resolved": "https://registry.npmjs.org/electron/-/electron-5.0.6.tgz",
"integrity": "sha512-0L53lv26eDhaaNxL6DqXGQrQOEAYbrQg40stRSb2pzrY06kwPbABzXEiaCvEsBuKUQ+9OQBbVyyvXRbLJlun/A==",
"dev": true,
"requires": {
"@types/node": "^10.12.18",
"electron-download": "^4.1.0",
@@ -4330,7 +4336,8 @@
"@types/node": {
"version": "10.14.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.10.tgz",
"integrity": "sha512-V8wj+w2YMNvGuhgl/MA5fmTxgjmVHVoasfIaxMMZJV6Y8Kk+Ydpi1z2whoShDCJ2BuNVoqH/h1hrygnBxkrw/Q=="
"integrity": "sha512-V8wj+w2YMNvGuhgl/MA5fmTxgjmVHVoasfIaxMMZJV6Y8Kk+Ydpi1z2whoShDCJ2BuNVoqH/h1hrygnBxkrw/Q==",
"dev": true
}
}
},
@@ -4444,6 +4451,7 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz",
"integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==",
"dev": true,
"requires": {
"debug": "^3.0.0",
"env-paths": "^1.0.0",
@@ -4460,6 +4468,7 @@
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
@@ -4468,6 +4477,7 @@
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
"integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
@@ -4477,7 +4487,8 @@
"semver": {
"version": "5.7.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA=="
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
}
}
},
@@ -4609,7 +4620,8 @@
"env-paths": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
"integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA="
"integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=",
"dev": true
},
"errno": {
"version": "0.1.7",
@@ -5383,6 +5395,7 @@
"version": "1.6.7",
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
"integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
"dev": true,
"requires": {
"concat-stream": "1.6.2",
"debug": "2.6.9",
@@ -5394,6 +5407,7 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -5401,7 +5415,8 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
}
}
},
@@ -5458,6 +5473,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
"integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
"dev": true,
"requires": {
"pend": "~1.2.0"
}
@@ -6242,7 +6258,8 @@
"get-stdin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4="
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
"dev": true
},
"get-stream": {
"version": "4.1.0",
@@ -6877,6 +6894,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
"integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
"dev": true,
"requires": {
"repeating": "^2.0.0"
}
@@ -7104,6 +7122,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
"integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
"dev": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -7268,7 +7287,8 @@
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true
},
"is-what": {
"version": "3.2.4",
@@ -8438,6 +8458,7 @@
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
"integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
"dev": true,
"requires": {
"currently-unhandled": "^0.4.1",
"signal-exit": "^3.0.0"
@@ -8512,7 +8533,8 @@
"map-obj": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0="
"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
"dev": true
},
"map-visit": {
"version": "1.0.0",
@@ -8577,6 +8599,7 @@
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
"dev": true,
"requires": {
"camelcase-keys": "^2.0.0",
"decamelize": "^1.1.2",
@@ -8594,6 +8617,7 @@
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"dev": true,
"requires": {
"path-exists": "^2.0.0",
"pinkie-promise": "^2.0.0"
@@ -8603,6 +8627,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
@@ -8615,6 +8640,7 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"dev": true,
"requires": {
"error-ex": "^1.2.0"
}
@@ -8623,6 +8649,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"dev": true,
"requires": {
"pinkie-promise": "^2.0.0"
}
@@ -8631,6 +8658,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"pify": "^2.0.0",
@@ -8640,12 +8668,14 @@
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
},
"read-pkg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"dev": true,
"requires": {
"load-json-file": "^1.0.0",
"normalize-package-data": "^2.3.2",
@@ -8656,6 +8686,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"dev": true,
"requires": {
"find-up": "^1.0.0",
"read-pkg": "^1.0.0"
@@ -8665,6 +8696,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"dev": true,
"requires": {
"is-utf8": "^0.2.0"
}
@@ -8978,11 +9010,6 @@
"lower-case": "^1.1.1"
}
},
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
},
"node-forge": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz",
@@ -9337,6 +9364,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz",
"integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=",
"dev": true,
"requires": {
"debug": "^2.1.3",
"minimist": "^1.1.0",
@@ -9351,6 +9379,7 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -9358,12 +9387,14 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"pretty-bytes": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
"integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
"dev": true,
"requires": {
"get-stdin": "^4.0.1",
"meow": "^3.1.0"
@@ -9832,7 +9863,8 @@
"pend": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
"dev": true
},
"performance-now": {
"version": "2.1.0",
@@ -10864,6 +10896,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz",
"integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=",
"dev": true,
"requires": {
"speedometer": "~0.1.2",
"through2": "~0.2.3"
@@ -10872,17 +10905,20 @@
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
"dev": true
},
"object-keys": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
"integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
"integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
"dev": true
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -10893,12 +10929,14 @@
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true
},
"through2": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
"integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
"dev": true,
"requires": {
"readable-stream": "~1.1.9",
"xtend": "~2.1.1"
@@ -10908,6 +10946,7 @@
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
"integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
"dev": true,
"requires": {
"object-keys": "~0.4.0"
}
@@ -11114,6 +11153,7 @@
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"dev": true,
"requires": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
@@ -11393,6 +11433,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
"integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
"dev": true,
"requires": {
"indent-string": "^2.1.0",
"strip-indent": "^1.0.1"
@@ -11585,6 +11626,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
"integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
"dev": true,
"requires": {
"is-finite": "^1.0.0"
}
@@ -12193,6 +12235,7 @@
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz",
"integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=",
"dev": true,
"requires": {
"string-width": "^1.0.1"
},
@@ -12200,12 +12243,14 @@
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -12214,6 +12259,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -12224,6 +12270,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -12513,7 +12560,8 @@
"speedometer": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz",
"integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0="
"integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=",
"dev": true
},
"split-string": {
"version": "3.1.0",
@@ -12704,6 +12752,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
"integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
"dev": true,
"requires": {
"get-stdin": "^4.0.1"
}
@@ -12778,6 +12827,7 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz",
"integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=",
"dev": true,
"requires": {
"debug": "^2.2.0"
},
@@ -12786,6 +12836,7 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -12793,7 +12844,8 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
}
}
},
@@ -13021,7 +13073,8 @@
"throttleit": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz",
"integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8="
"integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=",
"dev": true
},
"through": {
"version": "2.3.8",
@@ -13152,7 +13205,8 @@
"trim-newlines": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM="
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
"dev": true
},
"trim-right": {
"version": "1.0.1",
@@ -13237,6 +13291,12 @@
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"typescript": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==",
"dev": true
},
"uglify-js": {
"version": "3.4.10",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz",
@@ -14334,6 +14394,7 @@
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
"integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
"dev": true,
"requires": {
"fd-slicer": "~1.0.1"
}
+12 -5
View File
@@ -2,14 +2,14 @@
"name": "beatconnect_irc_bot",
"version": "0.1.0",
"description": "Beatconnect power for osu irc",
"main": "electron_start.js",
"main": "./public/electron.js",
"homepage": "./",
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js",
"go": "electron .",
"dist": "build",
"dist": "npm run build && npx electron-builder build",
"electron-dev": "set ELECTRON_START_URL=http://localhost:3000 && electron ."
},
"eslintConfig": {
@@ -29,6 +29,13 @@
},
"build": {
"appId": "io.beatconnect.bot",
"files": [
"build/**/*",
"node_modules/**/*"
],
"directories":{
"buildResources": "assets"
},
"dmg": {
"contents": [
{
@@ -69,7 +76,6 @@
"css-loader": "2.1.1",
"dotenv": "6.2.0",
"dotenv-expand": "4.2.0",
"electron": "^5.0.5",
"electron-download-manager": "^2.1.2",
"eslint": "^5.16.0",
"eslint-config-react-app": "^4.0.1",
@@ -92,7 +98,6 @@
"jest-resolve": "24.7.1",
"jest-watch-typeahead": "0.3.0",
"mini-css-extract-plugin": "0.5.0",
"node-fetch": "^2.6.0",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.2.1",
"postcss-flexbugs-fixes": "4.1.0",
@@ -125,7 +130,9 @@
},
"devDependencies": {
"electron-builder": "^20.44.4",
"nodemon": "^1.19.1"
"nodemon": "^1.19.1",
"electron": "^5.0.5",
"typescript": "^3.5.3"
},
"browserslist": {
"production": [
+5 -2
View File
@@ -2,10 +2,13 @@ const { BrowserWindow } = require('electron')
// default window settings
const defaultProps = {
width: 800,
height: 500,
width: 1200,
height: 750,
minHeight: 350,
minWidth: 750,
show: false,
darkTheme: true,
// frame: false
frame: process.env.ELECTRON_START_URL ? true : false
}
+2 -2
View File
@@ -1,6 +1,6 @@
const electron = require('electron');
const { app } = electron;
const Window = require('./electron/Window');
const Window = require('./Window');
const path = require('path')
const url = require('url')
@@ -29,7 +29,7 @@ const main = () => {
webSecurity: false
},
url: process.env.ELECTRON_START_URL || url.format({
pathname: path.join(__dirname, '/build/index.html'),
pathname: path.join(__dirname, './index.html'),
protocol: 'file:',
slashes: true
})
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

+21 -5
View File
@@ -18,23 +18,39 @@ body {
.menuContainer {
text-align: center;
display: flex;
/* display: flex;
flex-direction: column;
align-items: center;
align-items: center; */
/* justify-content: center; */
font-size: calc(10px + 2vmin);
color: white;
background-color: #121212;
text-rendering: optimizelegibility;
font-family: Open Sans, sans-serif;
height: 91vh;
height: calc(98.1vh - 79px);
overflow-y: auto;
}
.Beatmap {
width: 80%
width: 80%;
background: #2a2a2a;
margin: 1.3vh auto;
padding-bottom: 10px;
filter: brightness(0.95);
transition-property: filter !important;
/* transition-duration: 50ms !important; */
transition-timing-function: linear !important;
}
.Beatmap > div{
justify-content: center;
}
.Beatmap:hover {
filter: brightness(1.1)
}
.btn {
margin: 8px
}
@@ -56,7 +72,7 @@ body {
} */
.separator {
margin: 0 auto;
margin: 15px auto;
width: 90%;
height: 1px;
background-color: #fff
@@ -7,7 +7,11 @@ const DownloadsInProgress = ({ theme }) => {
const renderDownloads = () => {
const { infos, item, progress } = currentDownload;
if (!infos) return null;
return <DownloadsItem id={infos.id} progress={progress} theme={theme} status='downloading' key={`download${infos.id}`}/>
return (
<div className='DownloadsInProgress' style={{ marginBottom: 15 }}>
<DownloadsItem id={infos.id} progress={progress} theme={theme} status='downloading' key={`download${infos.id}`} />
</div>
)
}
return (
<React.Fragment>
@@ -5,10 +5,16 @@ import { DownloadQueueContext } from '../../../Providers/DownloadQueueProvider'
const DownloadsInQueue = ({ theme }) => {
const { queue } = useContext(DownloadQueueContext);
const renderDownloads = () => {
return queue.map(item => {
const { id } = item;
return <DownloadsItem id={id} theme={theme} status='queued' key={`queued${id}`}/>
})
return (
<div className='DownloadsInQueue' style={{ marginBottom: 15 }}>
{
queue.map(item => {
const { id } = item;
return <DownloadsItem id={id} theme={theme} status='queued' key={`queued${id}`} />
})
}
</div >
)
}
return (
<React.Fragment>
+96 -32
View File
@@ -6,10 +6,58 @@ import { Text, Button } from 'react-desktop';
import { shell } from 'electron'
import renderIcons from '../../utils/renderIcons'
import { DownloadQueueContext } from '../../../Providers/DownloadQueueProvider'
import timeSince from '../../utils/timeSince';
import injectSheet from 'react-jss'
import convertRange from '../../utils/convertRange';
const styles = {
DownloadsItem: {
position: 'relative',
margin: '5px auto',
textAlign: 'left',
},
fade: {
//position: 'absolute',
top: 0,
left: 0,
width: '100%',
//height: '100%',
filter: props => props.status === 'downloaded' ? 'brightness(0.3)' : `blur(${ props.progress ? convertRange(props.progress.progress, 0, 100, 10, 0) : 10}px)`,
backgroundColor: 'rgba(0, 0, 0, 1)',
'&:hover': {
filter: props => props.status === 'downloaded' ? ' brightness(0.9)' : ''
}
},
controls: {
//position: 'absolute',
overflow: 'hidden',
height: '100%',
},
leftControls: {
position: 'absolute',
bottom: '5%',
left: '1%',
//transformOrigin: '50%',
},
rightControls: {
position: 'absolute',
top: '0%',
right: '1%',
//transformOrigin: '50%',
},
downloadInfos: {
userSelect: 'none',
textAlign: 'center',
position: 'absolute',
width: '100%',
top: '50%',
// right: '50%',
transform: 'translateY(-50%)',
}
}
const DownloadsItem = ({ id, name, date, theme, status, progress }) => {
const [ isPaused, setIsPaused ] = useState(false);
const DownloadsItem = ({ id, name, date, theme, status, progress, classes }) => {
const [isPaused, setIsPaused] = useState(false);
const { removeItemfromQueue, cancelDownload, currentDownload } = useContext(DownloadQueueContext)
const cancel = () => {
if (status === 'downloading') {
@@ -25,41 +73,57 @@ const DownloadsItem = ({ id, name, date, theme, status, progress }) => {
}
return (
<div className='DownloadsItem'>
<Cover url={`https://assets.ppy.sh/beatmaps/${id}/covers/cover.jpg`} />
<Text color='#fff'>{name}</Text>
<Text color='#fff'>{status === 'downloaded' ? new Date(date).toDateString() : status}</Text>
<div className={classes.DownloadsItem}>
<div className={classes.fade}>
<Cover url={`https://assets.ppy.sh/beatmaps/${id}/covers/cover.jpg`} />
</div>
{
status === 'downloading' ?
<Text color='#fff'>{ progress ? JSON.stringify({progress: progress.progress, spedd: progress.speed}) : ''}</Text> :
progress ?
<div className={classes.downloadInfos}>
<div style={{ fontSize: '1.5em' }}>{`${Math.round(progress.progress)}%`}</div>
<div style={{ fontSize: '0.8.em' }}>{progress.speed}</div>
</div> :
null
}
<PreviewBeatmapBtn theme={theme} beatmapSetId={id} />
<Button
push
color={theme.color}
onClick={() => shell.openExternal(getBeatmapInfosUrl({ id }))}
hidden={false}>
{renderIcons('Search', theme.style)}
</Button>
<Button
push
color={theme.color}
onClick={toggleDownload}
hidden={!(status === 'downloading')}>
{renderIcons(isPaused ? 'Download' : 'Pause', theme.style)}
</Button>
<Button
push
color={theme.color}
onClick={cancel}
hidden={status === 'downloaded'}>
{renderIcons('Cancel', theme.style)}
</Button>
<div className={classes.controls}>
<div className={classes.leftControls}>
<Text color='#fff'>{name}</Text>
<Text color='#fff'>{status === 'downloaded' ? `Downloaded ${timeSince(new Date(date))}` : status}</Text>
{/* <div className={classes.buttons}> */}
<PreviewBeatmapBtn theme={theme} beatmapSetId={id} />
<Button
push
color={theme.color}
onClick={() => shell.openExternal(getBeatmapInfosUrl({ id }))}
hidden={false}>
{renderIcons('Search', theme.style)}
</Button>
{/* </div> */}
</div>
<div className={classes.rightControls}>
<Button
push
color={theme.color}
onClick={toggleDownload}
hidden={!(status === 'downloading')}
>
{renderIcons(isPaused ? 'Download' : 'Pause', theme.style)}
</Button>
<Button
push
color={theme.warning}
onClick={cancel}
hidden={status === 'downloaded'}
>
{renderIcons('Cancel', theme.style)}
</Button>
</div>
</div>
</div>
);
}
export default DownloadsItem;
export default injectSheet(styles)(DownloadsItem);
-2
View File
@@ -7,9 +7,7 @@ const Downloads = ({ theme }) => {
return (
<div className='menuContainer Downloads' style={{ transition: 'background 0ms' }}>
<DownloadsInProgress theme={theme} />
<div className='separator' />
<DownloadsInQueue theme={theme} />
<div className='separator' />
<DownloadedItems theme={theme} />
</div>
);
+1 -1
View File
@@ -18,7 +18,7 @@ const AddMatch = ({ bot, theme }) => {
className='btn'
push
color={theme.color}
//hidden={test.test(reqMatchId)}
hidden={!bot.joinMatch}
onClick={() => bot.joinMatch(reqMatchId)}
>
<Text color='fff'>Join</Text>
@@ -30,13 +30,23 @@ const MatchDetails = ({ match, theme, close }) => {
onClick={() => match.autoBeat = !match.autoBeat}
// hidden={!beatmap.title}
>
{renderIcons('Music', theme.style)}
{/* {renderIcons('Music', theme.style)} */}
{`AutoBeat: ${match.autoBeat}`}
</Button>
<Button
className='btn startMatch'
push
color={theme.color}
onClick={() => match.start()}
hidden={!match}
>
Start
</Button >
<Button
className='btn endMatch'
push
color={theme.warning}
onClick={() => match.start()}
onClick={() => match.close()}
hidden={!match}
>
Close
+1 -1
View File
@@ -14,7 +14,7 @@ const Settings = ({ userPreferences, theme }) => {
}, [])
return (
<div className='menuContainer Settings'>
<div className='menuContainer Settings' style={{transition: 'background 0ms'}}>
<Volume value={userPreferences.volume} onChange={(e) => updateVolume(e.target.value)} />
<History theme={theme}/>
<Configuration theme={theme} values={userPreferences} />
+4 -4
View File
@@ -5,9 +5,9 @@ import store from '../../../store';
import { connect } from 'react-redux';
const Start = ({ connected, theme, irc, osuApi }) => {
const connect = () => {
store.dispatch({ type: 'CONNECT', status: 'connecting', bot: start() });
}
// const connect = () => {
// store.dispatch({ type: 'CONNECT', status: 'connecting', bot: start() });
// }
const notReady = (!osuApi || !irc.username || !irc.password)
@@ -18,7 +18,7 @@ const Start = ({ connected, theme, irc, osuApi }) => {
push
hidden={notReady}
color={theme.color}
onClick={connect}
onClick={start}
>
{connected === 'connecting'
? <ProgressCircle
+2 -2
View File
@@ -14,9 +14,9 @@ const Cover = ({ url }) => {
opacity: loaded ? 1 : 0,
filter: `blur(${loaded ? 0 + 'px' : 10 + 'px'})`,
transition: '1s all',
width: '48%',
width: '100%',
paddingBottom: '15%',
margin: '10px auto',
// margin: 'auto 0 auto 10px',
backgroundPosition: 'center center',
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover',
@@ -3,10 +3,11 @@ import { Button, Text } from 'react-desktop/windows';
import renderIcons from '../../../utils/renderIcons'
import { AudioPlayerContext } from '../../../../Providers/AudioPlayerProvider';
const PreviewBeatmapBtn = ({ beatmapSetId, theme }) => {
const PreviewBeatmapBtn = ({ beatmapSetId, theme, setIsPLaying }) => {
const audioPlayer = useContext(AudioPlayerContext);
const preview = new Audio(`https://b.ppy.sh/preview/${beatmapSetId}.mp3`)
const isPlaying = audioPlayer.isPlaying === beatmapSetId;
if (setIsPLaying) setIsPLaying(isPlaying)
const playPreview = () => {
isPlaying ? audioPlayer.pause() : audioPlayer.setAudio(preview, beatmapSetId)
}
+34 -6
View File
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useState, useEffect } from 'react';
import Cover from './Cover'
import { Button, Text } from 'react-desktop/windows';
import DownloadBeatmapBtn from './DownloadBeatmapBtn'
@@ -16,11 +16,39 @@ const Beatmap = ({ theme, beatmap }) => {
const getDownloadUrl = ({ id, unique_id }) => {
return `https://beatconnect.io/b/${id}/${unique_id}`
}
const [brightness, setBrightness] = useState(0.95)
const [isPlaying, setIsPLaying] = useState(false)
const { beatmapset_id, id, title, artist, creator, version, beatconnectDlLink } = beatmap;
const playpreview = null;
const downloadBeatmap = null;
let bpmFlash = null;
const handleClick = () => {
}
const style = isPlaying ? {
filter: `brightness(${brightness})`,
transitionDuration: `${50}ms`
} : {}
useEffect(() => {
if (isPlaying) {
bpmFlash = setInterval(() => {
setBrightness(1.08)
setTimeout(() => setBrightness(0.95), (60000 / beatmap.bpm) / 2.5)
}, 60000 / beatmap.bpm)
}
return () => bpmFlash ? clearInterval(bpmFlash) : undefined
}, [isPlaying])
useEffect(() => {
return () => bpmFlash ? clearInterval(bpmFlash) : undefined
}, [])
return (
<div className='Beatmap'>
<div className='Beatmap' style={style} onClick={() => setIsPLaying(true)}>
{
beatmap
?
@@ -28,9 +56,9 @@ const Beatmap = ({ theme, beatmap }) => {
<Cover url={`https://assets.ppy.sh/beatmaps/${beatmapset_id || id}/covers/cover.jpg`} />
<Text color='#fff'>{title}</Text>
<Text color='#fff'>{artist}</Text>
<Text color='#fff'>{`[${version || ''}]`}</Text>
<PreviewBeatmapBtn theme={theme} beatmapSetId={beatmapset_id || id} />
<DownloadBeatmapBtn theme={theme} url={beatconnectDlLink || getDownloadUrl(beatmap)} infos={{ title, artist, creator, id: beatmapset_id || id }}/>
{version ? <Text color='#fff'>{`[${version || ''}]`}</Text> : null}
<PreviewBeatmapBtn theme={theme} beatmapSetId={beatmapset_id || id} setIsPLaying={setIsPLaying} />
<DownloadBeatmapBtn theme={theme} url={beatconnectDlLink || getDownloadUrl(beatmap)} infos={{ title, artist, creator, id: beatmapset_id || id }} />
<Button
push
color={theme.color}
+19
View File
@@ -0,0 +1,19 @@
export default (timeStamp) => {
const now = new Date(),
secondsPast = (now.getTime() - timeStamp.getTime()) / 1000;
if (secondsPast < 60) {
return parseInt(secondsPast) + ' sec ago';
}
if (secondsPast < 3600) {
return parseInt(secondsPast / 60) + ' min ago';
}
if (secondsPast <= 86400) {
return parseInt(secondsPast / 3600) + ' h ago';
}
if (secondsPast > 86400) {
const day = timeStamp.getDate();
const month = timeStamp.toDateString().match(/ [a-zA-Z]*/)[0].replace(" ", "");
const year = timeStamp.getFullYear() == now.getFullYear() ? "" : " " + timeStamp.getFullYear();
return day + " " + month + year;
}
}
+4 -1
View File
@@ -8,7 +8,10 @@ class BeatconnectApi {
}
getBeatmapById(beatmapId) {
return fetch(`${this.url}/beatmap/${beatmapId}/?token=${this.key}`, { mode: 'cors' }).then(res => res.json()).catch(err => console.error(err));
console.log(beatmapId)
return fetch(`${this.url}/beatmap/${beatmapId}/?token=${this.key}`, { mode: 'cors' })
.then(res => res.json())
.catch(err => console.error(err));
}
searchBeatmap(query, page) {
+28 -15
View File
@@ -27,6 +27,8 @@ class Bot {
this.irc.onBeatmapChange = this.newBeatmap;
this.osuApi = new OsuApi(this.conf.userPreferences.osuApi.key);
};
this.connect = () => this.irc.client.connect();
this.disconnect = () => this.irc.client.disconnect();
//this.web = new WebUi(this.matchs, this.irc.makeMatch);
}
@@ -97,19 +99,30 @@ class Bot {
if (match.id === matchId) {
const { rawMsg, from, channel, text } = msg;
const { rawCommand, args } = rawMsg;
if (rawCommand === 'PRIVMSG' && args[0].includes('mp') && args[1].includes('Beatmap changed to')) {
const beatmapId = this.regExp[1].exec(args[1])[1].split('/').pop();
this.newBeatmap(beatmapId, matchId);
} else if (rawCommand === 'PRIVMSG' && args[0].includes('mp') && args[1].includes('joined in')) {
const player = args[1].split(' ').shift();
match.playerJoin(player);
} else if (rawCommand === 'PRIVMSG' && args[0].includes('mp') && args[1].includes('left the game.')) {
const player = args[1].split(' ').shift();
match.playerLeave(player);
} else if (rawCommand === 'PRIVMSG' && args[0].includes('mp') && args[1].includes('became the host.')) {
const player = args[1].split(' ').shift();
match.host = player;
console.log(`Host for ${match.matchName} is now ${player}`)
if (rawCommand === 'PRIVMSG' && args[0].includes('mp')) {
if (args[1].includes('Beatmap changed to')) {
const beatmapId = this.regExp[1].exec(args[1])[1].split('/').pop();
this.newBeatmap(beatmapId, matchId);
} else if (args[1].includes('joined in')) {
const player = args[1].split(' ').shift();
match.playerJoin(player);
} else if (args[1].includes('left the game.')) {
const player = args[1].split(' ').shift();
match.playerLeave(player);
} else if (args[1].includes('became the host.')) {
const player = args[1].split(' ').shift();
match.host = player;
console.log(`Host for ${match.matchName} is now ${player}`)
}
else if (args[1].includes('Room name: ')
|| args[1].includes('Room name: ')
|| args[1].includes('Beatmap: ')
|| args[1].includes('Team mode: ')
|| args[1].includes('Players: ')
|| args[1].includes('Slot 1 ')) {
match.mpSettingsMessage(args[1])
}
}
}
})
@@ -149,8 +162,8 @@ class Bot {
if (!fromMp) { this.irc.pm(from, `You need to be in a multiplayer match to use this`); break; }
const matchId = fromMp.split('_').pop();
this.matchs.map(match => {
if (match.if = matchId)
this.sendMapById(match.beatmap, fromMp, match.fullBeatmapData);
if (match.id = matchId)
this.sendMapById(match.beatmapset_id, fromMp, match.fullBeatmapData);
});
break;
case 'join':
+17 -1
View File
@@ -1,4 +1,20 @@
import Bot from './Bot'
import store from '../store';
export default () => new Bot(store.getState().settings);
export default () => {
const { settings, main } = store.getState();
const { connected, bot } = main;
if (!bot.connect) {
console.log('connecting using new Bot')
store.dispatch({ type: 'CONNECT', status: 'connecting', bot: new Bot(settings) })
} else if (connected) {
console.log('disconnecting')
store.dispatch({ type: 'DISCONNECT' })
bot.disconnect();
} else {
console.log('connecting using existing Bot')
store.dispatch({ type: 'CONNECT', status: 'connecting' })
bot.connect()
}
}
+47
View File
@@ -0,0 +1,47 @@
export default function(msg) {
let msgDatas = msg.split(',').map((data) => data.split(/:(?!\/)/g));
//msgDatas = msgDatas
console.log(msgDatas);
const mpData = {};
// Players infos
if (msgDatas[0].length === 1) {
const player = {}
const indexes = [
[7, 'slot'],
[17, 'readyState'],
[46, 'userProfileUrl'],
[62, 'userName'],
[69, 'isHost']
]
indexes.map((index, i) => {
player[index[1]] = msgDatas[0][0].slice(i > 0 ? indexes[i - 1][0] : 0, index[0]).replace(/\s/g, '')
})
if (!mpData.player) {
mpData.player = [];
}
mpData.player.push(player);
console.log(player)
return mpData;
}
// number of players and beatmapId
if (msgDatas.length === 1) {
let data = msgDatas[0];
data = data.map(d => d.includes('https://osu.ppy.sh/b/') ? /.*?(\d+)/i.exec(d.split(' ')[1])[1] : d.replace(/\s/g, ''))
mpData[data[0]] = data[1]
console.log(mpData)
if (data[0] === 'Beatmap'){
// this.beatmapset_id = data[1]
}
return mpData
}
msgDatas.map(data => {
if (data[0] === 'Room name') {
mpData[data[0]] = data[1]
this.matchName = data[1]
}
})
return mpData
}
+6
View File
@@ -1,4 +1,5 @@
import { getDlLink } from '../BeatconnectApi';
import mpSettingsMessage from '../msg/mpSettings';
class MpMatch {
constructor(id, matchName, ircRoom, creator, ircClient, sendBeatmap, destroy, autoBeat) {
@@ -21,6 +22,7 @@ class MpMatch {
this.ircClient = ircClient;
this.creatorJoined = false;
this.startTime = Date.now();
this.mpSettingsMessage = mpSettingsMessage.bind(this);
if (this.creator){
this.invitePlayer(this.creator);
}else {
@@ -95,6 +97,10 @@ class MpMatch {
this.ircClient.pm(this.ircRoom, '!mp start')
}
close() {
this.ircClient.pm(this.ircRoom, '!mp close')
}
welcome(newMatchType) {
if (newMatchType === 'existingMatch')
this.ircClient.pm(this.ircRoom, `!mp settings BEATCONEEEEEEECT`);
-1
View File
@@ -49,7 +49,6 @@ class HistoryProvider extends Component {
contains = (id) => {
const { history } = this.state;
console.log(typeof history[id])
return typeof history[id] !== 'undefined'
}
+3
View File
@@ -26,6 +26,9 @@ export default (state = initialState, { type, newMatchs, status, bot, searchResu
case 'CONNECT':
console.log('CONNECTEDD', { ...state, connected: status || true, bot })
return { ...state, connected: status || true, bot : bot || state.bot };
case 'DISCONNECT':
console.log('CONNECTEDD', { ...state, connected: false })
return { ...state, connected: false };
case 'SEARCH_RESULTS':
console.log('SEARCH_RESULTS', { searchResults })
return { ...state, searchResults };