create suggestion model, fix unfillable language
Build / Build-image (push) Successful in 1m13s

This commit is contained in:
2026-08-13 22:30:42 +02:00
parent 5a6c398a3a
commit cd9ffc012e
7 changed files with 67 additions and 2 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ class Tla extends Model
use HasFactory; use HasFactory;
protected $fillable = ['acronym', 'hint', 'used', 'context']; protected $fillable = ['acronym', 'hint', 'language', 'used', 'context'];
public static function GetCurrentTla( string $language ) : Tla { public static function GetCurrentTla( string $language ) : Tla {
$tla = Tla::where('used', date("Y-m-d")) $tla = Tla::where('used', date("Y-m-d"))
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class TlaSuggestion extends Model
{
protected $table = 'tla_suggestion';
protected $fillable = ['acronym', 'hint', 'language', 'context'];
}
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('tla_suggestion', function (Blueprint $table) {
$table->id();
$table->string('acronym');
$table->string('hint')->nullable();
$table->enum('language', ['hu', 'en']);
$table->longText('context')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tla_suggestion');
}
};
+4
View File
@@ -9,6 +9,10 @@
'Segoe UI Symbol', 'Noto Color Emoji'; 'Segoe UI Symbol', 'Noto Color Emoji';
} }
:root {
--ui-primary: rgb(255, 200, 0);
}
.main { .main {
text-align: center; text-align: center;
} }
+1
View File
@@ -29,6 +29,7 @@ import HowToPlay from "./components/HowToPlay.vue";
<template #right> <template #right>
<HowToPlay/> <HowToPlay/>
<UColorModeSwitch :size="xl"/> <UColorModeSwitch :size="xl"/>
</template> </template>
+1 -1
View File
@@ -96,7 +96,7 @@
<template #footer> <template #footer>
<template v-if="guesses.length < maxGuesses && !correct"> <template v-if="guesses.length < maxGuesses && !correct">
<div class="flex-container"> <div class="flex-container" v-if="guess.length > 0">
<template v-for="word in words"> <template v-for="word in words">
<GuessWord :correctness="words.length == 3 ? -1 : (words.length > 3 ? -2 : -3)"> <GuessWord :correctness="words.length == 3 ? -1 : (words.length > 3 ? -2 : -3)">
{{ word }} {{ word }}
+17
View File
@@ -1,3 +1,20 @@
<template> <template>
<h1>TLA suggestion form</h1> <h1>TLA suggestion form</h1>
<UCard>
<UForm>
<UFormField label="Acronym" required>
<UInput placeholder="Enter your TLA"></UInput>
</UFormField>
<UFormField label="Motto" required>
<UInput placeholder="Enter the motto for your TLA"></UInput>
</UFormField>
<UFormField label="Contex" required>
<UTextarea style="w-full" placeholder="Provide context for your TLA. This will be displayed upon completing the riddle of the day, either by guessing it correctly, or by running out of guesses."></UTextarea>
</UFormField>
<UButton>
salkdjf
</UButton>
</UForm>
</UCard>
</template> </template>