Volle Breite mit Seitenleiste in Gruppen (1.0.1)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-27 18:42:03 +00:00
parent 5bdfb8a082
commit c2792f6a63
13 changed files with 40 additions and 14 deletions

View file

@ -129,7 +129,7 @@ const shownImages = computed(() => p.images.slice(0, 4));
<!-- Fotos -->
<div v-if="p.images.length" class="ih:mt-3 ih:grid ih:gap-0.5" :class="p.images.length === 1 ? '' : 'ih:grid-cols-2'">
<a v-for="(img, i) in shownImages" :key="img.id" :href="img.url" target="_blank" rel="noopener" class="ih:relative ih:block ih:overflow-hidden ih:bg-muted" :class="p.images.length === 3 && i === 0 ? 'ih:row-span-2' : ''">
<img :src="p.images.length === 1 ? img.url : img.thumb_url" :alt="img.name" loading="lazy" class="ih:w-full ih:object-cover" :class="p.images.length === 1 ? 'ih:max-h-[32rem]' : 'ih:aspect-square ih:h-full'" />
<img :src="p.images.length === 1 ? img.url : img.thumb_url" :alt="img.name" loading="lazy" class="ih:w-full" :class="p.images.length === 1 ? 'ih:max-h-[32rem] ih:object-contain' : 'ih:aspect-square ih:h-full ih:object-cover'" />
<span v-if="i === 3 && p.images.length > 4" class="ih:absolute ih:inset-0 ih:grid ih:place-items-center ih:bg-foreground/55 ih:text-2xl ih:font-semibold ih:text-background">+{{ p.images.length - 4 }}</span>
</a>
</div>

View file

@ -71,9 +71,9 @@ async function submit() {
v-model="body"
:rows="focused || body ? 4 : 1"
maxlength="10000"
:placeholder="`Was möchten Sie mit „${group.name}“ teilen?`"
placeholder="Was möchten Sie teilen?"
aria-label="Beitrag schreiben"
class="ih:min-h-10 ih:flex-1 ih:resize-none ih:rounded-2xl ih:bg-muted ih:px-4 ih:py-2 ih:text-[15px] ih:focus-visible:bg-background ih:focus-visible:ring-3 ih:focus-visible:ring-ring/30 ih:focus-visible:outline-none"
class="ih:min-h-10 ih:min-w-0 ih:flex-1 ih:resize-none ih:rounded-2xl ih:bg-muted ih:px-4 ih:py-2 ih:text-[15px] ih:focus-visible:bg-background ih:focus-visible:ring-3 ih:focus-visible:ring-ring/30 ih:focus-visible:outline-none"
@focus="focused = true"
@paste="$event.clipboardData?.files?.length && ($event.preventDefault(), add([...$event.clipboardData.files]))"
/>

View file

@ -45,7 +45,7 @@ async function loadMore() {
</PageHeader>
<div class="ih:grid ih:gap-6 ih:lg:grid-cols-[minmax(0,1fr)_20rem]">
<section class="ih:mx-auto ih:grid ih:w-full ih:max-w-2xl ih:content-start ih:gap-4" aria-label="Neue Beiträge aus Ihren Gruppen">
<section class="ih:grid ih:min-w-0 ih:content-start ih:gap-4" aria-label="Neue Beiträge aus Ihren Gruppen">
<PostCard v-for="post in feed" :key="post.id" :post="post" :reactions="reactions" show-group @deleted="feed = feed.filter((p) => p.id !== post.id)" />
<Button v-if="hasMore" variant="outline" :disabled="loading" @click="loadMore"><LoaderCircle v-if="loading" class="ih:animate-spin" /> Ältere Beiträge laden</Button>
<div v-if="!feed.length" class="ih:rounded-xl ih:border ih:bg-card">

View file

@ -27,7 +27,7 @@ async function resolve() {
<template>
<AppLayout :title="`Beitrag in ${group.name}`">
<div class="ih:mx-auto ih:grid ih:max-w-2xl ih:gap-4">
<div class="ih:mx-auto ih:grid ih:max-w-4xl ih:gap-4">
<Link :href="group.url" 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" /> {{ group.name }}</Link>
<div v-if="reports.length" class="ih:rounded-md ih:border ih:border-destructive/30 ih:bg-destructive/5 ih:p-3 ih:text-sm">
<p class="ih:flex ih:items-center ih:gap-2 ih:font-medium"><Flag class="ih:size-4 ih:text-destructive" /> {{ reports.length }} {{ reports.length === 1 ? 'Meldung' : 'Meldungen' }}</p>

View file

@ -94,7 +94,8 @@ const canInvite = computed(() => props.can.post && (props.group.privacy === 'ope
</nav>
</header>
<div class="ih:mx-auto ih:mt-6 ih:grid ih:max-w-2xl ih:gap-4">
<div class="ih:mt-6 ih:grid ih:items-start ih:gap-6 ih:lg:grid-cols-[minmax(0,1fr)_20rem]">
<div class="ih:grid ih:min-w-0 ih:gap-4">
<p v-if="can.moderate && reports" class="ih:flex ih:items-center ih:gap-2 ih:rounded-md ih:border ih:border-destructive/30 ih:bg-destructive/5 ih:p-3 ih:text-sm"><Flag class="ih:size-4 ih:text-destructive" /> {{ reports }} offene {{ reports === 1 ? 'Meldung' : 'Meldungen' }} – zu finden an den betroffenen Beiträgen.</p>
<!-- Beiträge -->
@ -150,6 +151,31 @@ const canInvite = computed(() => props.can.post && (props.group.privacy === 'ope
</section>
</div>
<!-- Seitenleiste: Über die Gruppe und Mitglieder (am PC) -->
<aside class="ih:hidden ih:content-start ih:gap-4 ih:lg:sticky ih:lg:top-24 ih:lg:grid">
<section class="ih:rounded-xl ih:border ih:bg-card ih:p-5">
<h2 class="ih:mb-2 ih:text-sm ih:font-semibold">Über die Gruppe</h2>
<p v-if="group.description" class="ih:line-clamp-6 ih:text-sm ih:leading-relaxed ih:whitespace-pre-line">{{ group.description }}</p>
<p class="ih:mt-3 ih:flex ih:items-start ih:gap-2 ih:text-[13px] ih:text-muted-foreground"><component :is="icons[group.privacy]" class="ih:mt-0.5 ih:size-4 ih:shrink-0" /> {{ group.privacy_hint }}</p>
</section>
<section v-if="members" class="ih:rounded-xl ih:border ih:bg-card ih:p-5">
<div class="ih:mb-3 ih:flex ih:items-baseline ih:justify-between">
<h2 class="ih:text-sm ih:font-semibold">{{ members.active.length }} {{ members.active.length === 1 ? 'Mitglied' : 'Mitglieder' }}</h2>
<button type="button" class="ih:text-[13px] ih:font-medium ih:text-brand-text ih:hover:underline" @click="activeTab = 'mitglieder'">Alle ansehen</button>
</div>
<ul class="ih:flex ih:flex-wrap ih:gap-1.5">
<li v-for="m in members.active.slice(0, 15)" :key="m.id">
<a :href="`/personen/${m.id}`" :title="m.name"><PersonAvatar :person="m" class="ih:size-9 ih:text-[11px]" /></a>
</li>
</ul>
<p v-if="members.pending.length" class="ih:mt-3 ih:text-[13px]">
<button type="button" class="ih:font-medium ih:text-brand-text ih:hover:underline" @click="activeTab = 'mitglieder'">{{ members.pending.length }} {{ members.pending.length === 1 ? 'Beitrittsanfrage' : 'Beitrittsanfragen' }}</button>
</p>
<Button v-if="canInvite" variant="outline" size="sm" class="ih:mt-4 ih:w-full" @click="inviting = true"><UserPlus /> Einladen</Button>
</section>
</aside>
</div>
<GroupDialog v-model:open="editing" :group="group" :privacy="privacy" :privacy-hints="privacyHints" />
<Dialog v-model:open="inviting">
<DialogContent class="ih:sm:max-w-md">