Przeglądaj źródła

Skip Preview tag

Sviluppo_Carrello_Immagini
Lorenzo Pollutri 1 dzień temu
rodzic
commit
4ae64d7be0
3 zmienionych plików z 15 dodań i 2 usunięć
  1. +13
    -1
      app/admin/page.tsx
  2. +1
    -1
      components/PublicGrid.tsx
  3. +1
    -0
      types/index.ts

+ 13
- 1
app/admin/page.tsx Wyświetl plik

@@ -413,7 +413,7 @@ export default function AdminDashboard() {
<label className="block text-sm font-semibold text-gray-800 mb-1">Short Description</label>
<textarea value={isEditing.shortDescription || ''} onChange={e => setIsEditing({...isEditing, shortDescription: e.target.value})} className={`${inputClasses} h-24 resize-none`} placeholder="Brief summary..." />
</div>
<div className="bg-gray-50 p-3 rounded-lg border border-gray-200">
<div className="bg-gray-50 p-3 rounded-lg border border-gray-200 space-y-3">
<label className="flex items-start gap-3 cursor-pointer">
<input
type="checkbox"
@@ -426,6 +426,18 @@ export default function AdminDashboard() {
<span className="block text-xs text-gray-600">Open the gallery in fullscreen immediately when the user clicks this card.</span>
</div>
</label>
<label className="flex items-start gap-3 cursor-pointer">
<input
type="checkbox"
checked={!!isEditing.skipPreview}
onChange={e => setIsEditing({ ...isEditing, skipPreview: e.target.checked })}
className="w-5 h-5 text-blue-600 rounded mt-0.5"
/>
<div>
<span className="block text-sm font-semibold text-gray-900">Skip preview</span>
<span className="block text-xs text-gray-600">Don&rsquo;t show the cover as a slide in the gallery. The cover stays as the card thumbnail only. Combine with &ldquo;Auto fullscreen&rdquo; to jump straight into the gallery items.</span>
</div>
</label>
</div>
</div>
<div className="space-y-5">


+ 1
- 1
components/PublicGrid.tsx Wyświetl plik

@@ -327,7 +327,7 @@ export default function PublicGrid({ cards, maxCols = 5 }: { cards: Card[], maxC

const carouselItems: MediaItem[] = activeCard
? [
...(activeCard.imageUrl ? [{ url: activeCard.imageUrl }] : []),
...(activeCard.imageUrl && !activeCard.skipPreview ? [{ url: activeCard.imageUrl }] : []),
...(activeCard.extraMedia || []),
]
: [];


+ 1
- 0
types/index.ts Wyświetl plik

@@ -17,6 +17,7 @@ export interface Card {
actionUrl?: string;
displayOrder: number;
autoFullscreen?: boolean; // open the fullscreen viewer immediately when this card is clicked
skipPreview?: boolean; // skip the modal preview AND exclude the cover image from the swipe sequence
}
export interface Portal {


Ładowanie…
Anuluj
Zapisz