Kleinanzeigen 1.2.0: Detailseite im einheitlichen Seitenkopf
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2129e9a5c6
commit
2be070eb67
6 changed files with 20 additions and 20 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import { computed, ref, watch } from 'vue';
|
||||
import { Link, router, useForm, usePage } from '@inertiajs/vue3';
|
||||
import { CalendarDays, ChevronLeft, ChevronRight, Flag, Heart, ImageOff, LoaderCircle, Mail, MapPin, MessageCircle, PencilLine, Phone, ShieldCheck, Trash2 } from '@lucide/vue';
|
||||
import { AppLayout, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, PersonAvatar, Textarea, formatDate, toast } from '@inhaus/ui';
|
||||
import { AppLayout, Button, PageHeader, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, PersonAvatar, Textarea, formatDate, toast } from '@inhaus/ui';
|
||||
import ListingCard from '../components/ListingCard.vue';
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -45,13 +45,20 @@ const statusNote = computed(() => ({
|
|||
|
||||
<template>
|
||||
<AppLayout :title="l.title">
|
||||
<div class="ih:mb-4 ih:flex ih:items-center ih:justify-between ih:gap-3">
|
||||
<Link href="/kleinanzeigen" class="ih:inline-flex ih:items-center ih:gap-1 ih:text-sm ih:font-medium ih:text-muted-foreground ih:hover:text-foreground"><ChevronLeft class="ih:size-4" /> Alle Kleinanzeigen</Link>
|
||||
<div class="ih:flex ih:gap-2">
|
||||
<PageHeader :title="l.title" :breadcrumbs="[{ label: 'Kleinanzeigen', href: '/kleinanzeigen' }]">
|
||||
<template #description>
|
||||
<span class="ih:flex ih:flex-wrap ih:items-center ih:gap-2 ih:text-xs">
|
||||
<span class="ih:rounded ih:bg-brand-soft ih:px-2 ih:py-0.5 ih:font-semibold ih:text-brand-text">{{ l.type_label }}</span>
|
||||
<span>{{ l.category_label }}</span>
|
||||
<span v-if="l.reserved" class="ih:rounded ih:bg-foreground ih:px-2 ih:py-0.5 ih:font-semibold ih:text-background">Reserviert</span>
|
||||
<span v-if="l.price" class="ih:text-base ih:font-semibold ih:text-brand-text">{{ l.price }}</span>
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="l.own || l.can_moderate" #actions>
|
||||
<Button v-if="l.own" variant="outline" size="sm" as-child><Link :href="`/kleinanzeigen/${l.id}/bearbeiten`"><PencilLine /> Bearbeiten</Link></Button>
|
||||
<Button v-if="l.own || l.can_moderate" variant="ghost" size="sm" class="ih:text-destructive ih:hover:text-destructive" @click="remove"><Trash2 /> Löschen</Button>
|
||||
</div>
|
||||
</div>
|
||||
<Button variant="ghost" size="sm" class="ih:text-destructive ih:hover:text-destructive" @click="remove"><Trash2 /> Löschen</Button>
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<p v-if="statusNote" class="ih:mb-4 ih:rounded-md ih:border ih:bg-muted ih:px-4 ih:py-3 ih:text-sm">
|
||||
{{ statusNote }}<template v-if="l.review_note"> Hinweis: {{ l.review_note }}</template>
|
||||
|
|
@ -78,14 +85,7 @@ const statusNote = computed(() => ({
|
|||
</section>
|
||||
|
||||
<section class="ih:rounded-xl ih:border ih:bg-card ih:p-5 ih:sm:p-6">
|
||||
<div class="ih:flex ih:flex-wrap ih:items-center ih:gap-2 ih:text-xs">
|
||||
<span class="ih:rounded ih:bg-brand-soft ih:px-2 ih:py-0.5 ih:font-semibold ih:text-brand-text">{{ l.type_label }}</span>
|
||||
<span class="ih:text-muted-foreground">{{ l.category_label }}</span>
|
||||
<span v-if="l.reserved" class="ih:rounded ih:bg-foreground ih:px-2 ih:py-0.5 ih:font-semibold ih:text-background">Reserviert</span>
|
||||
</div>
|
||||
<h1 class="ih:mt-2 ih:text-2xl ih:font-semibold ih:tracking-tight ih:text-balance">{{ l.title }}</h1>
|
||||
<p v-if="l.price" class="ih:mt-1 ih:text-xl ih:font-semibold ih:text-brand-text">{{ l.price }}</p>
|
||||
<dl class="ih:mt-4 ih:flex ih:flex-wrap ih:gap-x-6 ih:gap-y-2 ih:text-sm ih:text-muted-foreground">
|
||||
<dl class="ih:flex ih:flex-wrap ih:gap-x-6 ih:gap-y-2 ih:text-sm ih:text-muted-foreground">
|
||||
<div v-if="l.location" class="ih:flex ih:items-center ih:gap-1.5"><dt class="ih:sr-only">Ort</dt><MapPin class="ih:size-4" aria-hidden="true" /><dd>{{ l.location }}</dd></div>
|
||||
<div v-if="l.published_at" class="ih:flex ih:items-center ih:gap-1.5"><dt class="ih:sr-only">Eingestellt</dt><CalendarDays class="ih:size-4" aria-hidden="true" /><dd>seit {{ formatDate(l.published_at) }}</dd></div>
|
||||
</dl>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue