Add eslint
This commit is contained in:
@@ -6,6 +6,7 @@ const props = withDefaults(
|
||||
class?: string;
|
||||
}>(),
|
||||
{
|
||||
title: '',
|
||||
class: 'h-32'
|
||||
}
|
||||
);
|
||||
@@ -18,7 +19,7 @@ const isOpen = ref(false);
|
||||
:src="src"
|
||||
class="cursor-pointer"
|
||||
:class="props.class"
|
||||
:title="title || ''"
|
||||
:title="title"
|
||||
fit="cover"
|
||||
lazy
|
||||
@click.prevent="isOpen = true"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18nKey } from '~/composables/useI18nKey';
|
||||
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
quest: {
|
||||
title_de: string;
|
||||
title_en: string;
|
||||
|
||||
@@ -28,6 +28,8 @@ async function submit() {
|
||||
pending.value = true;
|
||||
|
||||
try {
|
||||
// TODO: show toast with invite code
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const result = await $fetch(`/api/hunt/${props.huntId}/team`, {
|
||||
body: JSON.stringify(data),
|
||||
method: 'POST'
|
||||
@@ -56,14 +58,14 @@ async function submit() {
|
||||
<div class="mt-4 flex flex-col gap-4">
|
||||
<VaInput v-model="data.name" label="Name" placeholder="My cool team" />
|
||||
<VaTextarea
|
||||
v-model="data.description"
|
||||
max-rows="4"
|
||||
min-rows="2"
|
||||
v-model="data.description"
|
||||
label="Description"
|
||||
placeholder="The best team!"
|
||||
/>
|
||||
<p>An invite code will be generated automatically.</p>
|
||||
<VaAlert color="danger" v-if="error">{{ t(error) }}</VaAlert>
|
||||
<VaAlert v-if="error" color="danger">{{ t(error) }}</VaAlert>
|
||||
</div>
|
||||
<template #footer>
|
||||
<VaButtonGroup :loading="pending" :disabled="pending">
|
||||
@@ -71,8 +73,8 @@ async function submit() {
|
||||
<VaButton
|
||||
color="success"
|
||||
:disabled="data.name.length < 3 || pending"
|
||||
@click="submit"
|
||||
:loading="pending"
|
||||
@click="submit"
|
||||
>Create</VaButton
|
||||
>
|
||||
</VaButtonGroup>
|
||||
|
||||
@@ -44,7 +44,7 @@ async function submit() {
|
||||
submitPending.value = true;
|
||||
|
||||
try {
|
||||
const result = await $fetch(`/api/hunt/${props.huntId}/join`, {
|
||||
await $fetch(`/api/hunt/${props.huntId}/join`, {
|
||||
body: JSON.stringify(data),
|
||||
method: 'POST'
|
||||
});
|
||||
@@ -78,8 +78,8 @@ async function submit() {
|
||||
<h3 class="text-3xl">Join a team</h3>
|
||||
<div class="mt-4 flex flex-col gap-4">
|
||||
<VaSelect
|
||||
:options="teams"
|
||||
v-model="data.team"
|
||||
:options="teams"
|
||||
value-by="id"
|
||||
track-by="id"
|
||||
searchable
|
||||
@@ -104,7 +104,7 @@ async function submit() {
|
||||
</template>
|
||||
</VaInput>
|
||||
|
||||
<VaAlert color="danger" v-if="error">{{ t(error) }}</VaAlert>
|
||||
<VaAlert v-if="error" color="danger">{{ t(error) }}</VaAlert>
|
||||
</div>
|
||||
<template #footer>
|
||||
<VaButtonGroup
|
||||
@@ -117,8 +117,8 @@ async function submit() {
|
||||
:disabled="
|
||||
data.password.length < 3 || data.team === null || submitPending
|
||||
"
|
||||
@click="submit"
|
||||
:loading="submitPending || pending"
|
||||
@click="submit"
|
||||
>Join</VaButton
|
||||
>
|
||||
</VaButtonGroup>
|
||||
|
||||
@@ -172,9 +172,9 @@ async function deleteTeam() {
|
||||
<p>{{ team._count.answers }} answers</p>
|
||||
<div class="grid grid-cols-1 gap-2 md:grid-cols-3 lg:grid-cols-5">
|
||||
<VaButton
|
||||
color="danger"
|
||||
v-for="member in team.members"
|
||||
:key="member.member.id"
|
||||
color="danger"
|
||||
:disabled="loading"
|
||||
:loading="loading"
|
||||
@click="kick(member)"
|
||||
@@ -183,13 +183,13 @@ async function deleteTeam() {
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 md:flex-row">
|
||||
<VaSelect
|
||||
v-model="newUser"
|
||||
v-model:search="search"
|
||||
label="New Member"
|
||||
placeholder="Start typing their email..."
|
||||
autocomplete
|
||||
highlight-matched-text
|
||||
:options="users"
|
||||
v-model="newUser"
|
||||
v-model:search="search"
|
||||
:loading="searchPending"
|
||||
track-by="id"
|
||||
text-by="email"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
defineProps<{
|
||||
count: number | string;
|
||||
title: string;
|
||||
icon: string;
|
||||
|
||||
Reference in New Issue
Block a user