feat(kopf): Dokumentart grau hinter dem Namens-Chip — Mitgeliefert/Lokal/Geteilt samt Host (D90)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
mhoennig
2026-08-27 13:03:53 +02:00
co-authored by Claude Fable 5
parent 408e23f25b
commit f45ca44d3c
6 changed files with 68 additions and 2 deletions
+14
View File
@@ -3938,6 +3938,20 @@ const docList = document.getElementById('docList');
function updateDocName(){
const d = activeDoc();
if(docNameEl) docNameEl.textContent = d ? d.name : '';
/* Dokumentart hinter dem Chip (D90): dieselben Begriffe wie die
Menü-Abschnitte vor allem gegen die Verwechslung lokale Kopie statt
geteiltem Dokument" (der D89-Vorfall). Bei Server-Dokumenten mit Host,
wie in der Menüzeile. */
const kindEl = document.getElementById('docKindLabel');
if(kindEl){
if(d){
const art = docKind(d.id, SHIPPED_IDS);
const label = {shipped: 'docGroupShipped', own: 'docGroupOwn',
server: 'docGroupSources', url: 'docGroupSources'}[art];
const host = serverHostOf(d.id);
kindEl.textContent = t(label) + (host ? ' · ' + host : '');
} else kindEl.textContent = '';
}
/* Aus einer URL geladene Dokumente (D23): die vollständige Quelle in den
Tooltip, da der Name in der Titelzeile mit Ellipse abgeschnitten wird.
Muss nach applyLang erneut laufen das setzt data-i18n-title zurück. */