diff --git a/src/models.py b/src/models.py index 93445e2..726dad5 100644 --- a/src/models.py +++ b/src/models.py @@ -150,7 +150,7 @@ class DiscoverMultiResponse(BaseModel): fallback_single: bool = False -# Domain-Aktionen (Sperren/Entsperren) +# Domain-Aktionen (Ausschließen/Ausschluss aufheben) class DomainActionRequest(BaseModel): domain: str = Field(min_length=1, max_length=200) notes: Optional[str] = None diff --git a/src/routers/sources.py b/src/routers/sources.py index c512ab1..e3e5471 100644 --- a/src/routers/sources.py +++ b/src/routers/sources.py @@ -291,7 +291,7 @@ async def block_domain( current_user: dict = Depends(get_current_user), db: aiosqlite.Connection = Depends(db_dependency), ): - """Domain sperren: Alle Feeds deaktivieren + excluded-Eintrag anlegen.""" + """Domain ausschließen: Alle Feeds deaktivieren + excluded-Eintrag anlegen.""" tenant_id = current_user.get("tenant_id") domain = data.domain.lower().strip() username = current_user["username"] @@ -351,7 +351,7 @@ async def unblock_domain( current_user: dict = Depends(get_current_user), db: aiosqlite.Connection = Depends(db_dependency), ): - """Domain entsperren: excluded-Eintrag loeschen + Feeds reaktivieren.""" + """Domain-Ausschluss aufheben: excluded-Eintrag loeschen + Feeds reaktivieren.""" tenant_id = current_user.get("tenant_id") domain = data.domain.lower().strip() @@ -374,7 +374,7 @@ async def unblock_domain( feeds_reactivated = cursor.rowcount else: await db.execute( - """UPDATE sources SET source_type = 'web_source', status = 'active', notes = 'Entsperrt' + """UPDATE sources SET source_type = 'web_source', status = 'active', notes = 'Ausschluss aufgehoben' WHERE LOWER(domain) = ? AND source_type = 'excluded' AND (tenant_id IS NULL OR tenant_id = ?)""", (domain, tenant_id), ) diff --git a/src/static/css/style.css b/src/static/css/style.css index 5f4367a..a022984 100644 --- a/src/static/css/style.css +++ b/src/static/css/style.css @@ -3437,7 +3437,7 @@ a:hover { gap: var(--sp-xs); } -/* Gesperrte Domain */ +/* Ausgeschlossene Domain */ .source-group-header.excluded { grid-template-columns: 1fr auto auto; border-left: 3px solid var(--error); diff --git a/src/static/dashboard.html b/src/static/dashboard.html index 8a2b399..2ecd5c1 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -427,7 +427,7 @@ - +
- +
- + diff --git a/src/static/js/app.js b/src/static/js/app.js index 5daa075..9b117eb 100644 --- a/src/static/js/app.js +++ b/src/static/js/app.js @@ -2199,7 +2199,7 @@ const App = { bar.innerHTML = ` ${rss.count} RSS-Feeds ${web.count} Web-Quellen - ${excluded} Gesperrt + ${excluded} Ausgeschlossen ${stats.total_articles} Artikel gesamt `; }, @@ -2237,7 +2237,7 @@ const App = { groups.get(domain).push(s); }); - // Gesperrte Domains die keine Feeds haben auch als Gruppe + // Ausgeschlossene Domains die keine Feeds haben auch als Gruppe this._blacklistOnly.forEach(s => { const domain = (s.domain || s.name || '').toLowerCase(); if (domain && !groups.has(domain)) { @@ -2279,7 +2279,7 @@ const App = { return; } - // Sortierung: Aktive zuerst (alphabetisch), dann gesperrte + // Sortierung: Aktive zuerst (alphabetisch), dann ausgeschlossene filteredGroups.sort((a, b) => { if (a.isExcluded !== b.isExcluded) return a.isExcluded ? 1 : -1; return a.domain.localeCompare(b.domain); @@ -2364,7 +2364,7 @@ const App = { }, /** - * Domain sperren (aus dem Inline-Formular). + * Domain ausschließen (aus dem Inline-Formular). */ async blockDomain() { const input = document.getElementById('block-domain-input'); @@ -2378,7 +2378,7 @@ const App = { try { await API.blockDomain(domain, notes); - UI.showToast(`${domain} gesperrt.`, 'success'); + UI.showToast(`${domain} ausgeschlossen.`, 'success'); this.showBlockDomainDialog(false); await this.loadSources(); this.updateSidebarStats(); @@ -2437,10 +2437,10 @@ const App = { }, /** - * Domain direkt sperren (aus der Gruppenliste). + * Domain direkt ausschließen (aus der Gruppenliste). */ async blockDomainDirect(domain) { - if (!await confirmDialog(`"${domain}" wirklich sperren? Alle Feeds dieser Domain werden deaktiviert.`)) return; + if (!await confirmDialog(`"${domain}" wirklich ausschließen? Alle Feeds dieser Domain werden deaktiviert.`)) return; try { await API.blockDomain(domain); @@ -2453,12 +2453,12 @@ const App = { }, /** - * Domain entsperren. + * Domain-Ausschluss aufheben. */ async unblockDomain(domain) { try { await API.unblockDomain(domain); - UI.showToast(`${domain} entsperrt.`, 'success'); + UI.showToast(`${domain} Ausschluss aufgehoben.`, 'success'); await this.loadSources(); this.updateSidebarStats(); } catch (err) { @@ -2499,7 +2499,7 @@ const App = { }, /** - * "Domain sperren" Dialog ein-/ausblenden. + * "Domain ausschließen" Dialog ein-/ausblenden. */ showBlockDomainDialog(show) { const form = document.getElementById('sources-block-form'); @@ -2558,12 +2558,12 @@ const App = { return; } - // Prüfen ob Domain gesperrt ist + // Prüfen ob Domain ausgeschlossen ist const inputDomain = url.replace(/^https?:\/\//, '').replace(/^www\./, '').split('/')[0].toLowerCase(); const isBlocked = inputDomain && this._blacklistOnly.some(s => (s.domain || '').toLowerCase() === inputDomain); if (isBlocked) { - if (!await confirmDialog(`"${inputDomain}" ist gesperrt. Trotzdem hinzufügen? Die Domain wird dabei entsperrt.`)) return; + if (!await confirmDialog(`"${inputDomain}" ist ausgeschlossen. Trotzdem hinzufügen? Der Ausschluss wird dabei aufgehoben.`)) return; await API.unblockDomain(inputDomain); } diff --git a/src/static/js/components.js b/src/static/js/components.js index 88a3211..e2b970a 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -537,16 +537,16 @@ const UI = { const escapedDomain = this.escape(domain); if (isExcluded) { - // Gesperrte Domain + // Ausgeschlossene Domain const notesHtml = excludedNotes ? ` ${this.escape(excludedNotes)}` : ''; return `
${this.escape(displayName)}${notesHtml}
- Gesperrt + Ausgeschlossen
- +
@@ -592,7 +592,7 @@ const UI = { ${feedCountBadge}
${!hasMultiple && feeds[0]?.id ? `` : ''} - +