summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-02-03 14:44:36 +0100
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-02-03 14:44:36 +0100
commit51fcd1cf5d45eea38f4a5ec164725b3023dcd2e4 (patch)
tree07404fcd4a48f257704cad68c0977ea4cc1190ad
parentdbeb579593dfbfcbd8eb0f1cf5bd3199f41de4ee (diff)
downloadwordle-frontend-51fcd1cf5d45eea38f4a5ec164725b3023dcd2e4.tar.xz
handle wrong words
-rw-r--r--src/components/Trials.vue17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/components/Trials.vue b/src/components/Trials.vue
index b63d25c..f1b67a0 100644
--- a/src/components/Trials.vue
+++ b/src/components/Trials.vue
@@ -1,5 +1,5 @@
<template>
- <table>
+ <table class="trials-table" v-bind:class="{ error: !backendResponse.is_in_dictionary }">
<tr v-for="trial in trials" :key="trial">
<Trial :length="length" :trial="trial" :finished="true" />
</tr>
@@ -11,7 +11,7 @@
<script setup lang="ts">
import Trial from "@/components/Trial.vue";
-import { watch } from "vue";
+import {watch} from "vue";
let props = defineProps<{
length: number;
@@ -28,7 +28,6 @@ watch(
() => props.backendResponse,
(response) => {
if (!response.is_in_dictionary) {
- // TODO: handle wrong word
console.log("word not in dictionary");
return;
}
@@ -45,4 +44,14 @@ watch(
);
</script>
-<style scoped></style>
+<style scoped>
+.trials-table {
+ background-color: #000000;
+ color: #a0a0a0;
+ font-weight: bold;
+ font-family: monospace;
+}
+.trials-table.error {
+ background-color: #800000;
+}
+</style>