diff --git a/src/models.py b/src/models.py index c31ccb4..0333321 100644 --- a/src/models.py +++ b/src/models.py @@ -127,6 +127,8 @@ class SourceResponse(BaseModel): article_count: int = 0 last_seen_at: Optional[str] = None created_at: str + language: Optional[str] = None + bias: Optional[str] = None is_global: bool = False diff --git a/src/static/js/components.js b/src/static/js/components.js index 6230bdb..cf9acbd 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -581,11 +581,25 @@ const UI = { ? `${feedCount} Feed${feedCount !== 1 ? 's' : ''}` : ''; + // Info-Button mit Tooltip (Typ, Sprache, Ausrichtung) + let infoButtonHtml = ''; + const firstFeed = feeds[0] || {}; + const hasInfo = firstFeed.language || firstFeed.bias; + if (hasInfo) { + const typeMap = { rss_feed: 'RSS-Feed', web_source: 'Web-Quelle', telegram_channel: 'Telegram-Kanal' }; + const lines = []; + lines.push('Typ: ' + (typeMap[firstFeed.source_type] || firstFeed.source_type || 'Unbekannt')); + if (firstFeed.language) lines.push('Sprache: ' + firstFeed.language); + if (firstFeed.bias) lines.push('Ausrichtung: ' + firstFeed.bias); + const tooltipText = this.escape(lines.join('\n')); + infoButtonHtml = ` `; + } + return `