style: atualiza todo design interno da aplicacao
This commit is contained in:
@@ -19,11 +19,6 @@
|
||||
Preencha os dados para adicionar um jogo ao catálogo.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<NuxtLink to="/catalogo"
|
||||
class="inline-flex h-10 shrink-0 items-center justify-center rounded-full border border-[#d6d3d1] bg-transparent px-5 text-[15px] font-medium leading-none text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
Voltar
|
||||
</NuxtLink>
|
||||
</header>
|
||||
|
||||
<form
|
||||
@@ -100,7 +95,8 @@
|
||||
class="inline-flex min-h-6 items-center rounded-full bg-[rgba(196,184,232,0.4)] px-2.5 py-1 text-xs font-semibold uppercase leading-none tracking-[0.96px] text-[#0c0a09]">
|
||||
Imagens
|
||||
</span>
|
||||
<p class="mb-4 mt-3 text-[13px] leading-[1.5] text-[#777169]">Opcional — URLs públicas das imagens do jogo.
|
||||
<p class="mb-4 mt-3 text-[13px] leading-[1.5] text-[#777169]">
|
||||
Opcional — URLs públicas das imagens do jogo.
|
||||
</p>
|
||||
|
||||
<div class="grid gap-5 md:grid-cols-2">
|
||||
@@ -179,7 +175,8 @@
|
||||
|
||||
<script setup>
|
||||
definePageMeta({
|
||||
middleware: 'auth'
|
||||
middleware: 'auth',
|
||||
layout: 'protected'
|
||||
})
|
||||
|
||||
const CATALOG_API_BASE_URL = 'https://catalogo-jogos-sd-production.up.railway.app'
|
||||
@@ -216,8 +213,14 @@ const clearToken = () => {
|
||||
async function submitForm() {
|
||||
formError.value = ''
|
||||
|
||||
const genres = form.genresRaw.split(',').map((s) => s.trim()).filter(Boolean)
|
||||
const platforms = form.platformsRaw.split(',').map((s) => s.trim()).filter(Boolean)
|
||||
const genres = form.genresRaw
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean)
|
||||
const platforms = form.platformsRaw
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean)
|
||||
|
||||
if (!form.title || !form.description || !form.developer || !genres.length || !platforms.length) {
|
||||
formError.value = 'Preencha todos os campos obrigatórios.'
|
||||
@@ -271,7 +274,8 @@ async function submitForm() {
|
||||
return
|
||||
}
|
||||
|
||||
formError.value = error?.data?.message ?? 'Erro ao criar o jogo. Verifique os dados e tente novamente.'
|
||||
formError.value =
|
||||
error?.data?.message ?? 'Erro ao criar o jogo. Verifique os dados e tente novamente.'
|
||||
$toast.error(formError.value, { duration: 8000 })
|
||||
} finally {
|
||||
isSubmitting.value = false
|
||||
|
||||
Reference in New Issue
Block a user