diff --git a/website/api/api.js b/website/api/api.js index 11013b2..e5ece60 100644 --- a/website/api/api.js +++ b/website/api/api.js @@ -1,7 +1,7 @@ class API { constructor() { - this.url = "http://127.0.0.1:8000/api/"; + this.url = "http://192.168.0.131:8000/api/"; // this is the url of the server // this may have to change later on } @@ -145,7 +145,16 @@ class API { // there will be other tests here in later iterations but for now these tests should suffice - this.postTest(testType, testLength, testTime, testSeed, quoteId, wpm, accuracy, userId); + this.postTest( + testType, + testLength, + testTime, + testSeed, + quoteId, + wpm, + accuracy, + userId + ); } /** @@ -169,7 +178,7 @@ class API { xhr.open( "POST", `${this.url}create_user/` - ) + ); xhr.send( JSON.stringify(user) diff --git a/website/screens/signUpScreen.js b/website/screens/signUpScreen.js new file mode 100644 index 0000000..3da60be --- /dev/null +++ b/website/screens/signUpScreen.js @@ -0,0 +1,42 @@ +class SignUpScreen { + constructor() { + textboxes = [ + new Textbox( + 0,0, + 0,0, + true, + "#000", + false, "#000", + "#000" + ), + + new Textbox( + 0,0, + 0,0, + true, + "#000", + false,"000", + "#000" + ) + ] + } + + /** + * Draws the SignUpScreen class with all + * appropriate elements + */ + draw() { + background("#eeeee4"); + for (texbox in this.textboxes) { + textbox.draw(); + } + } + + /** + * + * @param {key} key + */ + letterTyped(key) { + this.textboxes[0].letterTyped(); + } +} \ No newline at end of file