diff --git a/.eslintrc.js b/.eslintrc.js
index 403ca3e..15cd681 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -22,10 +22,6 @@ module.exports = {
"error",
4
],
- "quotes": [
- "error",
- "single"
- ],
"semi": [
"error",
"always"
diff --git a/app/app.js b/app/app.js
index a31614b..bc83130 100644
--- a/app/app.js
+++ b/app/app.js
@@ -3,13 +3,15 @@ import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import Wrapper from './Wrapper';
+import Home from './pages/Home/Home';
import Soundboard from './pages/Soundboard/Soundboard';
import NotFound from './pages/NotFound/NotFound';
ReactDOM.render(
-
+
+
diff --git a/app/components/Navbar/Navbar.component.js b/app/components/Navbar/Navbar.component.js
index 14be98a..6d67912 100644
--- a/app/components/Navbar/Navbar.component.js
+++ b/app/components/Navbar/Navbar.component.js
@@ -8,8 +8,9 @@ export default class Navbar extends React.Component {
render() {
return (
Sounds
-
+
{this.state.soundList.length > 0 ? this.state.soundList.map((sound, index) => {
- return
-
- {sound.prefix + sound.name}
+ return (
+
+
+ {sound.prefix + sound.name}
+
+
+ {this.checkExtension(sound.extension) && this.state.showAudioControls[index] ?
+
+ :
this.handleShowAudio(index)}/> }
-
- {this.checkExtension(sound.extension) ?
-
- : null}
-
+ );
}) : null}
);
diff --git a/app/pages/Soundboard/Soundboard.js b/app/pages/Soundboard/Soundboard.js
index 04752f9..3c4b7e2 100644
--- a/app/pages/Soundboard/Soundboard.js
+++ b/app/pages/Soundboard/Soundboard.js
@@ -35,9 +35,9 @@ export default class Soundboard extends React.Component {
}
onDrop(acceptedFiles, rejectedFiles) {
- if (acceptedFiles.length > 0) {
- self.uploadFile(acceptedFiles[0]);
- }
+ if (acceptedFiles.length > 0) {
+ self.uploadFile(acceptedFiles[0]);
+ }
}
uploadFile(file) {
@@ -47,7 +47,7 @@ export default class Soundboard extends React.Component {
formData.append("password", this.state.password);
axios.put("/upload", formData, this.config)
- .then((response) => {
+ .then(() => {
this.setState({
password: "",
percentCompleted: 0,
@@ -77,18 +77,6 @@ export default class Soundboard extends React.Component {
return (
-
-
- Discord Sound Bot
-
-
Drag and drop files to upload. The sounds can then be played in discord by typing the commands below.
-
Check out the source code on
- GitHub
-
-
-
-
Follow the readme to set up your own bot!
-
diff --git a/app/scss/style.scss b/app/scss/style.scss
index 22c22e3..887bf1f 100644
--- a/app/scss/style.scss
+++ b/app/scss/style.scss
@@ -2,10 +2,11 @@
box-sizing: border-box;
}
-a {
+a, .link {
text-decoration: none;
color: $primaryBlue;
transition: color 0.1s linear;
+ cursor: pointer;
&:hover {
color: darken(white, 10%);
diff --git a/server/webserver/server.go b/server/webserver/server.go
index 5652997..aa0196e 100644
--- a/server/webserver/server.go
+++ b/server/webserver/server.go
@@ -1,11 +1,12 @@
package webserver
import (
+ "log"
+
"../config"
"./handlers"
"github.com/buaazp/fasthttprouter"
"github.com/valyala/fasthttp"
- "log"
)
func logger(next fasthttp.RequestHandler) fasthttp.RequestHandler {
@@ -28,7 +29,7 @@ func registerRoutes(router *fasthttprouter.Router) {
router.PUT("/upload", handlers.FileUpload)
router.ServeFiles("/static/*filepath", "./static")
- router.ServeFiles("/sounds/*filepath", "./sounds")
+ router.ServeFiles("/sounds/*filepath", config.Config.SoundsPath)
router.NotFound = func(ctx *fasthttp.RequestCtx) {
fasthttp.ServeFile(ctx, "./index.html")