Compare commits

..

3 commits

Author SHA1 Message Date
88ef4c7060 Handle out of index last-added pages
Some checks are pending
/ build (push) Waiting to run
2025-04-10 18:37:24 -06:00
eb17632154 Ensure alt property is provided in image 2025-04-10 18:25:16 -06:00
ae7605ad4a Nullable album createdAt 2025-04-10 17:47:23 -06:00
8 changed files with 10 additions and 12 deletions

View file

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `albums` MODIFY `createdAt` DATETIME(0) NULL DEFAULT CURRENT_TIMESTAMP(0);

View file

@ -130,7 +130,7 @@ model albums {
releaseDate DateTime? @db.Date
label String? @db.VarChar(255)
vgmdb String? @db.VarChar(255)
createdAt DateTime @default(now()) @db.DateTime(0)
createdAt DateTime? @default(now()) @db.DateTime(0)
updatedAt DateTime @default(now()) @db.DateTime(0)
publishedAt DateTime @default(now())
description String? @db.VarChar(255)

View file

@ -17,7 +17,7 @@ fullPageList.forEach((n) => {
})
const currentListIndex = pageList.findIndex((l) => l.includes(page))
const currentList = pageList[currentListIndex]
const currentList = pageList[currentListIndex] ?? []
---
<ul class:list={[className, 'bg-dark mb-0 py-2 justify-center']}>

View file

@ -13,16 +13,12 @@ import DefaultSEO from 'components/DefaultSEO.astro'
import FooterNav from 'components/lastAdded/FooterNav.astro'
const { albums, limitMD, limitXS, ...listProps } = Astro.props
if (albums.length === 0) {
Astro.redirect('/404')
}
---
<DefaultSEO />
<Base>
<div class='flex flex-col w-full'>
<div class='w-full min-h-100vh mx-auto max-w-[1140px]'>
<div class='w-full mx-auto max-w-[1140px] grow-1'>
<div class='px-2 mb-2'>
<h1 class='uppercase font-medium tracking-wide text-5xl drop-shadow-2xl mt-5 mb-2 text-center'>
<slot />

View file

@ -10,6 +10,6 @@ import GuraGif from '../img/assets/doggo-thumbs-up.gif'
<BaseLayout>
<div class='flex flex-1 flex-col bg-soc-green-dark py-6'>
<div class='text-md` text-center'>Something went wrong.... yubi yubi</div>
<Image src={GuraGif} alt='Gawr Gura roomba' class='size-80 mx-auto mt-4' />
<Image src={GuraGif} alt='' class='size-80 mx-auto mt-4' />
</div>
</BaseLayout>

View file

@ -287,7 +287,7 @@ const coverImage = await getImage({
width={130}
height={50}
style={{ height: 'auto', width: '130px' }}
alt={provider}
alt={provider ?? 'Store icon'}
src={`/img/provider/${provider}.jpg`}
/>
</a>
@ -317,7 +317,7 @@ const coverImage = await getImage({
class='rounded-md'
width={30}
height={30}
alt={provider}
alt={provider ?? 'Provider'}
src={`/img/provider/${provider}.png`}
/>
</div>

View file

@ -14,7 +14,7 @@ export const POST: APIRoute = async ({ request, locals }) => {
let body
try {
const formData = await parseForm(request)
const formData = await parseForm(await request.formData())
body = s.create(formData, DeleteAlbum)
await prismaClient.albums.findUniqueOrThrow({ where: { id: body.albumId }, select: { id: true } })
} catch (err) {

View file

@ -14,6 +14,6 @@ import GuraGif from '../img/assets/doggo-thumbs-up.gif'
>our Discord Server</a
> for updates
</div>
<Image src={GuraGif} alt='Gawr Gura roomba' class='size-80 mx-auto mt-4' />
<Image src={GuraGif} alt='' class='size-80 mx-auto mt-4' />
</div>
</BaseLayout>