fix: 🐛 Fix various layout issues from previous update
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 0s
Deploy to GitHub Pages / build (push) Failing after 0s
Deploy to GitHub Pages / deploy (push) Has been skipped
Docker / build (push) Failing after 0s
Mirror to Codeberg / Mirror (push) Failing after 0s

This commit is contained in:
Jesse Wierzbinski 2025-04-15 23:31:50 +02:00
parent ba0b5bf4ad
commit e0204e234b
No known key found for this signature in database
6 changed files with 45 additions and 38 deletions

View file

@ -1,6 +1,6 @@
<template> <template>
<Dialog> <Dialog>
<Card class="w-full h-full overflow-hidden relative"> <Card class="w-full h-full overflow-hidden relative p-0">
<DialogTrigger v-if="attachment.type === 'image'" :as-child="true"> <DialogTrigger v-if="attachment.type === 'image'" :as-child="true">
<img :src="attachment.url" :alt="attachment.description ?? undefined" <img :src="attachment.url" :alt="attachment.description ?? undefined"
class="w-full h-full object-contain bg-muted/20" /> class="w-full h-full object-contain bg-muted/20" />
@ -30,36 +30,38 @@
</Popover> </Popover>
</Card> </Card>
<DialogContent :hide-close="true" <DialogContent :hide-close="true"
class="fixed inset-0 z-50 w-screen h-screen p-6 duration-200 bg-transparent border-none grid grid-rows-[auto_1fr_auto] overflow-hidden translate-x-0 translate-y-0 max-w-full !animate-none gap-6"> class="p-6 duration-200 bg-transparent border-none overflow-hidden !animate-none gap-6 w-screen h-screen !max-w-none">
<div class="flex flex-row gap-2 w-full"> <div class="grid grid-rows-[auto_1fr_auto]">
<DialogTitle class="sr-only">{{ attachment.type }}</DialogTitle> <div class="flex flex-row gap-2 w-full">
<Button as="a" :href="attachment?.url" target="_blank" :download="true" variant="ghost" size="icon" <DialogTitle class="sr-only">{{ attachment.type }}</DialogTitle>
class="[&_svg]:size-6 ml-auto"> <Button as="a" :href="attachment?.url" target="_blank" :download="true" variant="ghost" size="icon"
<Download /> class="[&_svg]:size-6 ml-auto">
</Button> <Download />
<DialogClose :as-child="true">
<Button variant="ghost" size="icon" class="[&_svg]:size-6">
<X />
</Button> </Button>
</DialogClose> <DialogClose :as-child="true">
</div> <Button variant="ghost" size="icon" class="[&_svg]:size-6">
<div class="flex items-center justify-center overflow-hidden *:max-h-[80vh] *:max-w-[80vw]"> <X />
<img v-if="attachment.type === 'image'" :src="attachment.url" :alt="attachment.description ?? ''" </Button>
class="object-contain" /> </DialogClose>
<video v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" :src="attachment.url"
:alt="attachment.description ?? ''" class="object-cover" controls />
<audio v-else-if="attachment.type === 'audio'" :src="attachment.url" :alt="attachment.description ?? ''"
class="object-cover" controls />
<div v-else class="flex flex-col items-center justify-center">
<File class="size-12" />
<span class="text-sm"></span>
</div> </div>
<div class="flex items-center justify-center overflow-hidden *:max-h-[80vh] *:max-w-[80vw]">
<img v-if="attachment.type === 'image'" :src="attachment.url" :alt="attachment.description ?? ''"
class="object-contain" />
<video v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" :src="attachment.url"
:alt="attachment.description ?? ''" class="object-cover" controls />
<audio v-else-if="attachment.type === 'audio'" :src="attachment.url"
:alt="attachment.description ?? ''" class="object-cover" controls />
<div v-else class="flex flex-col items-center justify-center">
<File class="size-12" />
<span class="text-sm"></span>
</div>
</div>
<DialogDescription class="flex items-center justify-center">
<Card v-if="attachment.description" class="p-4 max-w-md max-h-48 overflow-auto">
<p class="text-sm">{{ attachment.description }}</p>
</Card>
</DialogDescription>
</div> </div>
<DialogDescription class="flex items-center justify-center">
<Card v-if="attachment.description" class="p-4 max-w-md max-h-48 overflow-auto">
<p class="text-sm">{{ attachment.description }}</p>
</Card>
</DialogDescription>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
</template> </template>

View file

@ -6,7 +6,7 @@
variant="ghost" variant="ghost"
class="h-fit w-fit p-0 m-0 relative group border overflow-hidden" class="h-fit w-fit p-0 m-0 relative group border overflow-hidden"
> >
<Avatar size="lg" :src="image" :name="displayName" /> <Avatar class="size-32" :src="image" :name="displayName" />
<div <div
class="absolute inset-0 bg-background/80 flex group-hover:opacity-100 opacity-0 duration-200 items-center justify-center" class="absolute inset-0 bg-background/80 flex group-hover:opacity-100 opacity-0 duration-200 items-center justify-center"
> >
@ -88,7 +88,7 @@
<Label>{{ <Label>{{
m.witty_honest_wallaby_support() m.witty_honest_wallaby_support()
}}</Label> }}</Label>
<Avatar size="lg" :src="gravatarUrl" /> <Avatar class="size-32" :src="gravatarUrl" />
</div> </div>
</FormItem> </FormItem>
</FormField> </FormField>
@ -114,7 +114,7 @@
<Label>{{ <Label>{{
m.witty_honest_wallaby_support() m.witty_honest_wallaby_support()
}}</Label> }}</Label>
<Avatar size="lg" :src="value" /> <Avatar class="size-32" :src="value" />
</div> </div>
</FormItem> </FormItem>
</FormField> </FormField>

View file

@ -1,5 +1,5 @@
<template> <template>
<Avatar :class="shape.value === 'square' && 'rounded-md'"> <Avatar :class="[shape.value === 'square' && 'rounded-md', 'bg-secondary']">
<AvatarFallback v-if="name"> <AvatarFallback v-if="name">
{{ getInitials(name) }} {{ getInitials(name) }}
</AvatarFallback> </AvatarFallback>

View file

@ -16,8 +16,7 @@
class="absolute bottom-0 translate-y-1/3 left-4 flex flex-row items-start gap-2" class="absolute bottom-0 translate-y-1/3 left-4 flex flex-row items-start gap-2"
> >
<Avatar <Avatar
size="lg" class="size-32 border"
class="border"
:src="avatar" :src="avatar"
:name="displayName" :name="displayName"
/> />

View file

@ -30,7 +30,7 @@
</Button> </Button>
</ProfileActions> </ProfileActions>
</div> </div>
<div class="flex flex-col -mt-1 gap-2 justify-center"> <div class="flex flex-col -mt-1 gap-1 justify-center">
<CardTitle class="" v-render-emojis="account.emojis"> <CardTitle class="" v-render-emojis="account.emojis">
{{ account.display_name }} {{ account.display_name }}
</CardTitle> </CardTitle>
@ -45,10 +45,10 @@
> >
</CopyableText> </CopyableText>
</div> </div>
<ProfileBadges :account="account" /> <ProfileBadges :account="account" class="my-2" />
<ProfileContent :content="account.note" :emojis="account.emojis" /> <ProfileContent :content="account.note" :emojis="account.emojis" />
</CardContent> </CardContent>
<CardFooter> <CardFooter class="flex-col *:w-full gap-4">
<ProfileStats <ProfileStats
:creation-date="new Date(account.created_at || 0)" :creation-date="new Date(account.created_at || 0)"
:follower-count="account.followers_count" :follower-count="account.followers_count"

View file

@ -33,7 +33,13 @@ export default defineNuxtConfig({
}, },
fonts: { fonts: {
families: [ families: [
{ name: "Inter", provider: "local", weights: [400, 500, 600, 700, 800], styles: ["normal", "italic"], display: "swap" }, {
name: "Inter",
provider: "local",
weights: [400, 500, 600, 700, 800],
styles: ["normal", "italic"],
display: "swap",
},
], ],
}, },
pwa: { pwa: {