Ver código fonte

Skip Preview tag

Sviluppo_Carrello_Immagini
Lorenzo Pollutri 14 horas atrás
pai
commit
4ae64d7be0
3 arquivos alterados com 15 adições e 2 exclusões
  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 Ver arquivo

@@ -413,7 +413,7 @@ export default function AdminDashboard() {
<label className="block text-sm font-semibold text-gray-800 mb-1">Short Description</label> <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..." /> <textarea value={isEditing.shortDescription || ''} onChange={e => setIsEditing({...isEditing, shortDescription: e.target.value})} className={`${inputClasses} h-24 resize-none`} placeholder="Brief summary..." />
</div> </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"> <label className="flex items-start gap-3 cursor-pointer">
<input <input
type="checkbox" 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> <span className="block text-xs text-gray-600">Open the gallery in fullscreen immediately when the user clicks this card.</span>
</div> </div>
</label> </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> </div>
<div className="space-y-5"> <div className="space-y-5">


+ 1
- 1
components/PublicGrid.tsx Ver arquivo

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


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


+ 1
- 0
types/index.ts Ver arquivo

@@ -17,6 +17,7 @@ export interface Card {
actionUrl?: string; actionUrl?: string;
displayOrder: number; displayOrder: number;
autoFullscreen?: boolean; // open the fullscreen viewer immediately when this card is clicked 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 { export interface Portal {


Carregando…
Cancelar
Salvar