diff --git a/frontend/src/components/UserMenu.js b/frontend/src/components/UserMenu.js
index 6cba1d7..d295704 100644
--- a/frontend/src/components/UserMenu.js
+++ b/frontend/src/components/UserMenu.js
@@ -58,13 +58,6 @@ export default function UserMenu({ user, onLogout, darkMode, onToggleDarkMode, s
onClick: clearAdsCache,
},
{ type: 'divider' },
- {
- key: 'settings',
- icon: ,
- label: 'Einstellungen (bald)',
- disabled: true,
- },
- { type: 'divider' },
{
key: 'logout',
icon: ,
diff --git a/frontend/src/pages/ProjectDetail.js b/frontend/src/pages/ProjectDetail.js
index 50f944a..64f2c60 100644
--- a/frontend/src/pages/ProjectDetail.js
+++ b/frontend/src/pages/ProjectDetail.js
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import { Tabs, Button, Spin, Skeleton, Result, Grid, Select, Layout, Tooltip, message } from 'antd';
-import { ArrowLeftOutlined, LoadingOutlined, LockOutlined, MinusOutlined, PlusOutlined, EllipsisOutlined, ShareAltOutlined } from '@ant-design/icons';
+import { ArrowLeftOutlined, LoadingOutlined, LockOutlined, MinusOutlined, PlusOutlined, EllipsisOutlined, ShareAltOutlined, ReloadOutlined } from '@ant-design/icons';
import UserMenu from '../components/UserMenu';
import FilePreview, { formatFileSize, formatDuration } from '../components/FilePreview';
import debugLogger from '../utils/debugLogger';
@@ -85,6 +85,32 @@ function ProjectDetail({ user, darkMode, onLogout, onToggleDarkMode, overridePar
}
};
+ // iFrame Refresh Funktionalität
+ const handleRefreshAd = (adId, adName) => {
+ // Finde alle iFrames innerhalb des Ad-Containers
+ const adContainer = document.getElementById(adId);
+ if (adContainer) {
+ const iframes = adContainer.querySelectorAll('iframe');
+ let refreshedCount = 0;
+
+ iframes.forEach((iframe) => {
+ if (iframe.src) {
+ // Füge einen Timestamp als URL-Parameter hinzu, um den Cache zu umgehen
+ const url = new URL(iframe.src);
+ url.searchParams.set('refresh', Date.now().toString());
+ iframe.src = url.toString();
+ refreshedCount++;
+ }
+ });
+
+ if (refreshedCount > 0) {
+ message.success(`Animation${refreshedCount > 1 ? 'en' : ''} "${adName}" ${refreshedCount > 1 ? 'wurden' : 'wurde'} neu geladen!`);
+ } else {
+ message.info(`Keine Animationen in "${adName}" gefunden.`);
+ }
+ }
+ };
+
useEffect(() => {
async function fetchLogo() {
if (!client || !project) {
@@ -153,6 +179,17 @@ function ProjectDetail({ user, darkMode, onLogout, onToggleDarkMode, overridePar
onClick={() => handleCopyLink(adId, ad.name)}
/>
+ {/* Refresh-Button nur bei HTML-Dateien (iFrames) anzeigen */}
+ {Array.isArray(ad.files) && ad.files.some(file => file.type === 'html') && (
+
+ }
+ onClick={() => handleRefreshAd(adId, ad.name)}
+ />
+
+ )}
{/* Dateien unterhalb des Ads anzeigen */}
{Array.isArray(ad.files) && ad.files.length > 0 ? (