Update: GTM Architect v2.6.2 (Edit Specs, Report Fix) & Company Explorer v0.4 (Export, Timestamps)
This commit is contained in:
@@ -15,18 +15,18 @@ const SessionBrowser: React.FC<SessionBrowserProps> = ({ sessions, onLoadSession
|
||||
const getCategoryIcon = (category: string) => {
|
||||
// Return an icon based on the category, default to a generic robot
|
||||
if (!category) return '🤖';
|
||||
switch (category.toLowerCase()) {
|
||||
case 'reinigungsroboter':
|
||||
return '🧹';
|
||||
case 'serviceroboter':
|
||||
return '🛎️';
|
||||
case 'transportroboter':
|
||||
return '📦';
|
||||
case 'security roboter':
|
||||
return '🛡️';
|
||||
default:
|
||||
return '🤖';
|
||||
}
|
||||
const cat = category.toLowerCase();
|
||||
|
||||
if (cat.includes('reinigung') || cat.includes('cleaning')) return '🧹';
|
||||
if (cat.includes('service') || cat.includes('kellner')) return '🛎️';
|
||||
if (cat.includes('transport') || cat.includes('logistik') || cat.includes('logistics')) return '📦';
|
||||
if (cat.includes('security') || cat.includes('sicherheit') || cat.includes('wach')) return '🛡️';
|
||||
if (cat.includes('inspektion') || cat.includes('inspection')) return '🔍';
|
||||
if (cat.includes('humanoid')) return '🦾';
|
||||
if (cat.includes('drohne') || cat.includes('drone')) return '🚁';
|
||||
if (cat.includes('rasen') || cat.includes('mower')) return '🌱';
|
||||
|
||||
return '🤖';
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -48,27 +48,48 @@ const SessionBrowser: React.FC<SessionBrowserProps> = ({ sessions, onLoadSession
|
||||
) : (
|
||||
<div className="session-grid">
|
||||
{sessions.map((session) => (
|
||||
<div key={session.id} className="session-card">
|
||||
<div key={session.id} className="session-card group">
|
||||
{/* Left Column: Icon & Title */}
|
||||
<div className="card-header">
|
||||
<span className="category-icon">{getCategoryIcon(session.productCategory)}</span>
|
||||
<h3 title={session.productName}>{session.productName || 'Unbenannt'}</h3>
|
||||
</div>
|
||||
<div className="thumbnail-placeholder">
|
||||
<span>🖼️</span>
|
||||
<p>Thumbnail</p>
|
||||
<div className="category-badge" title={session.productCategory}>
|
||||
{getCategoryIcon(session.productCategory)}
|
||||
</div>
|
||||
<div className="card-title-container">
|
||||
<h3 className="card-title" title={session.productName}>{session.productName || 'Unbenanntes Projekt'}</h3>
|
||||
<div className="card-date">
|
||||
<span className="text-xs text-slate-400">Updated:</span>
|
||||
{new Date(session.updated_at).toLocaleDateString()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Middle Column: Description & Meta */}
|
||||
<div className="card-content">
|
||||
<p className="product-description">{session.productDescription || 'Keine Beschreibung verfügbar.'}</p>
|
||||
<p className="source-url">
|
||||
<a href={session.sourceUrl} target="_blank" rel="noopener noreferrer">
|
||||
Quelle anzeigen
|
||||
</a>
|
||||
<p className="product-description">
|
||||
{session.productDescription && session.productDescription !== "No description available."
|
||||
? session.productDescription
|
||||
: <span className="italic text-slate-400">Keine Beschreibung verfügbar.</span>}
|
||||
</p>
|
||||
<p className="last-updated">Zuletzt bearbeitet: {new Date(session.updated_at).toLocaleString()}</p>
|
||||
|
||||
<div className="card-meta">
|
||||
{session.sourceUrl && session.sourceUrl !== "No source URL found." && (
|
||||
<a href={session.sourceUrl} target="_blank" rel="noopener noreferrer" className="source-link">
|
||||
🔗 Link zur Quelle
|
||||
</a>
|
||||
)}
|
||||
<span className="text-slate-400">•</span>
|
||||
<span className="text-slate-500">{session.productCategory || 'Unkategorisiert'}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right Column: Actions */}
|
||||
<div className="card-actions">
|
||||
<button onClick={() => onLoadSession(session.id)} className="load-btn">Laden</button>
|
||||
<button onClick={() => onDeleteSession(session.id)} className="delete-btn">Löschen</button>
|
||||
<button onClick={() => onLoadSession(session.id)} className="load-btn">
|
||||
Öffnen
|
||||
</button>
|
||||
<button onClick={() => onDeleteSession(session.id)} className="delete-btn" title="Löschen">
|
||||
Löschen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user