From 413ec3734324d99ad2f1f04b25de8e1b693a798f Mon Sep 17 00:00:00 2001 From: pollutri Date: Fri, 8 May 2026 13:37:56 +0200 Subject: [PATCH] External Link configurabile --- README.md | 5 +++++ app/admin/page.tsx | 23 ++++++++++++++++++++--- components/PublicGrid.tsx | 12 +++++++++++- lib/config.ts | 3 +++ 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 lib/config.ts diff --git a/README.md b/README.md index e215bc4..208f3a5 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,8 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. + +## Configurazione + +Per configruare usare il file lib/config.ts +Per disattivare l'utilizzo di external link, settare a false la variabile EXTERNAL_LINK_ENABLED a false; \ No newline at end of file diff --git a/app/admin/page.tsx b/app/admin/page.tsx index fa93d14..ca0b3f4 100644 --- a/app/admin/page.tsx +++ b/app/admin/page.tsx @@ -2,6 +2,7 @@ import { useState, useEffect } from 'react'; import { Card, Portal, MediaItem } from '@/types'; +import { EXTERNAL_LINK_ENABLED } from '@/lib/config'; const isVideoUrl = (url: string) => /\.(mp4|webm|mov|m4v|ogv)(\?|$)/i.test(url); const isPdfFile = (file: File) => @@ -498,12 +499,28 @@ export default function AdminDashboard() {
- -