From 38a881487ee4d428791e25f47d950ea5e8063e2c Mon Sep 17 00:00:00 2001 From: WheresAlice Date: Sat, 22 May 2021 14:59:13 +0100 Subject: [PATCH] fix: disable buttons until the user sets a name --- assets/mocha.html | 38 ++++++++++++++++++++++++++++++++++++++ assets/room.js | 5 +++++ room.html | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 assets/mocha.html diff --git a/assets/mocha.html b/assets/mocha.html new file mode 100644 index 0000000..bf4e4cf --- /dev/null +++ b/assets/mocha.html @@ -0,0 +1,38 @@ + + + + + Mocha Tests + + + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/assets/room.js b/assets/room.js index 2534ec4..6f134ae 100644 --- a/assets/room.js +++ b/assets/room.js @@ -17,6 +17,11 @@ const app = new Vue({ ], userMoods: [] }, + computed: { + isReady: function () { + return this.user.length > 0 + } + }, methods: { deleteUserMood: function (username = this.user) { const body = JSON.stringify({ diff --git a/room.html b/room.html index 90b8701..e24c3f7 100644 --- a/room.html +++ b/room.html @@ -17,7 +17,7 @@
×

Room number: {{ room }}

- +
{{item.username}} :: {{item.mood}}