diff --git a/branding/ui-icons/icons.py b/branding/ui-icons/icons.py index 424b6c72..c10a1875 100644 --- a/branding/ui-icons/icons.py +++ b/branding/ui-icons/icons.py @@ -1,6 +1,7 @@ """Chronos UI icon set (DESIGN.md §5): 16-px grid, 1.5-px strokes, round caps/joins. Each icon = stroke path data + optional fill path data. Generates the WPF resource dictionary -src/Chronos.Ui/Icons/Icons.xaml and a preview sheet (icons.svg). Run: python3 branding/ui-icons/icons.py""" +src/Chronos.Ui/Icons/Icons.xaml, the web admin's src/Chronos.Server/Admin/web/icons.js and a preview sheet (icons.svg). +Run: python3 branding/ui-icons/icons.py""" import math, os def rr(x, y, w, h, r): @@ -17,6 +18,18 @@ def arc(cx, cy, r, a0, a1): large = 1 if (a1 - a0) % 360 > 180 else 0 return f"M{x0:.2f} {y0:.2f} A{r} {r} 0 {large} 1 {x1:.2f} {y1:.2f}" +def gear(cx, cy, r_out, r_in, teeth, tip, base): + """Toothed outline, first tooth at 12 o'clock: each tooth has the half-width tip on r_out and base on r_in; + the valleys between teeth are arcs on r_in.""" + f = lambda v: f"{v:.2f}".rstrip("0").rstrip(".") + p = lambda a, r: f"{f(cx + r * math.sin(math.radians(a)))} {f(cy - r * math.cos(math.radians(a)))}" + t, b, step = math.degrees(math.asin(tip / r_out)), math.degrees(math.asin(base / r_in)), 360 / teeth + d = [f"M{p(-b, r_in)}"] + for k in range(teeth): + a = k * step + d.append(f"L{p(a - t, r_out)} A{r_out} {r_out} 0 0 1 {p(a + t, r_out)} L{p(a + b, r_in)} A{r_in} {r_in} 0 0 1 {p(a + step - b, r_in)}") + return " ".join(d) + " Z" + I = {} # Navigation I["Library"] = (rr(1.5,1.5,5.5,5.5,1)+rr(9,1.5,5.5,5.5,1)+rr(1.5,9,5.5,5.5,1)+rr(9,9,5.5,5.5,1), None) @@ -25,7 +38,9 @@ I["Sequence"] = ("M2 12.5 L11.5 3 L13 4.5 L3.5 14 H2 Z", None) I["Archive"] = ("M2 4.5 H14 V13.5 H2 Z M2 2 H14 V4.5 H2 Z M6 8 H10", None) I["Jobs"] = ("M3 8 H13 M3 4 H13 M3 12 H9", None) I["Server"] = ("M4.5 12.5 A3 3 0 0 1 4.2 6.5 A4 4 0 0 1 11.9 5.5 A3.5 3.5 0 0 1 12.2 12.5 Z", None) -I["Settings"] = (circ(8,8,2.2)+" M8 1.5 V3.5 M8 12.5 V14.5 M1.5 8 H3.5 M12.5 8 H14.5 M3.4 3.4 L4.8 4.8 M11.2 11.2 L12.6 12.6 M3.4 12.6 L4.8 11.2 M11.2 4.8 L12.6 3.4", None) +# Owner review 2: a toothed gear with a centre hole (the circle with rays it replaces read as a sun). Narrow teeth +# close up into solid knobs at 16 px, which keeps the gaps between them open. +I["Settings"] = (gear(8,8,6.5,4.6,8,0.6,0.85)+" "+circ(8,8,1.7), None) I["About"] = (circ(8,8,6.5)+" M8 7 V11 M8 4.8 V5.2", None) I["Menu"] = ("M2.5 4 H13.5 M2.5 8 H13.5 M2.5 12 H13.5", None) I["Users"] = (circ(8,5,3)+" M2.5 14 A5.5 5.5 0 0 1 13.5 14", None) @@ -127,8 +142,12 @@ I["Cross"] = ("M4.5 4.5 L11.5 11.5 M11.5 4.5 L4.5 11.5", None) # Everything else (clocks, media controls, the ▶ rendered status, symmetric shapes) never mirrors. DIRECTIONAL = {"Back", "Forward", "ChevronLeft", "ChevronRight", "ExternalLink", "Jobs", "Logs", "ViewList"} -out = os.path.join(os.path.dirname(__file__), "..", "..", "src", "Chronos.Ui", "Icons", "Icons.xaml") -with open(out, "w") as f: +here = os.path.dirname(__file__) +# UTF-8 with LF on every OS (the repository's .gitattributes), whatever the system code page. +write = lambda path: open(path, "w", encoding="utf-8", newline="\n") + +out = os.path.join(here, "..", "..", "src", "Chronos.Ui", "Icons", "Icons.xaml") +with write(out) as f: f.write('\n') @@ -154,5 +173,20 @@ for k, name in enumerate(names): svg.append('') svg.append(f'{name}') svg.append('') -open(os.path.join(os.path.dirname(__file__), "icons.svg"), "w").write("\n".join(svg)) -print(len(I), "icons") +with write(os.path.join(here, "icons.svg")) as f: + f.write("\n".join(svg)) + +# The web admin's icons (its own names -> this set's), as inline SVG strings for app.js and the pages. +WEB = {"dashboard": "Library", "users": "Users", "archive": "Archive", "jobs": "Jobs", "settings": "Settings", "logs": "Logs", + "menu": "Menu", "power": "Power", "moon": "Moon", "refresh": "Refresh", "close": "Close", "plus": "Plus", "copy": "Copy", + "search": "Search"} +STROKE = 'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"' +with write(os.path.join(here, "..", "..", "src", "Chronos.Server", "Admin", "web", "icons.js")) as f: + f.write("// Generated by branding/ui-icons/icons.py (same 16-px set as the desktop apps). Do not edit by hand.\n") + f.write("export const icons = {\n") + for key, name in WEB.items(): + stroke, fill = I[name] + paths = (f'' if fill else "") + (f'' if stroke else "") + f.write(f' {key}: ``,\n') + f.write("};\n") +print(len(I), "icons,", len(WEB), "web icons") diff --git a/branding/ui-icons/icons.svg b/branding/ui-icons/icons.svg index a63e85c2..1357fcf5 100644 --- a/branding/ui-icons/icons.svg +++ b/branding/ui-icons/icons.svg @@ -310,7 +310,7 @@ Server - + Settings diff --git a/docs/ui/DESIGN.md b/docs/ui/DESIGN.md index c8aca298..7d64e128 100644 --- a/docs/ui/DESIGN.md +++ b/docs/ui/DESIGN.md @@ -100,6 +100,9 @@ status) and the brand mark keep their drawn orientation. Photos, previews, chart templates are left-to-right islands (`FlowDirection="LeftToRight"` on the smallest element holding them). Category charts without a time axis (horizontal bars, stacked bars) still lay out from the reading side inside their island: labels on the reading side, bars growing away from it; time axes and month grids never flip. +`branding/ui-icons/icons.py` is the one source: it writes `Icons.xaml` and the web admin's `icons.js`. Settings is a +toothed gear (8 teeth, outer radius 6.5, valleys on 4.6, centre hole 1.7: `gear()` in `icons.py`); a circle with rays +is the Sun icon only. ## 6. App icon (`branding/`) @@ -123,7 +126,7 @@ from the SVG geometry (no raster assets checked in as sources). Badges only at | `Server.html` | §12.7 / §14 | connection with TOFU fingerprint, account and quota, render node, sync table, conflicts | | `Settings.html` | §12.8 | section list, Rendering section, encoder table, self-test | | `Welcome.html` | §12.1 | first run: local archive / adopt folder / connect; consent line; card toast | -| `Admin.html` | §14.7 | dashboard | +| `Admin.html` | §14.7 | dashboard; sidebar: pages from the top, Settings docked at its foot above the account, no About (the last group of Settings) | | `AdminUsers.html` | §14.7 | users table, roles, quotas, temporary password, render-node right | | `Uploader.html` | §15 | single window, watch folder, queue, tray | | `Components.html` | §12.1 | the control kit above, with hex values and state rules | diff --git a/docs/ui/mockups/Admin.html b/docs/ui/mockups/Admin.html index 79ac22d7..054ff957 100644 --- a/docs/ui/mockups/Admin.html +++ b/docs/ui/mockups/Admin.html @@ -19,10 +19,9 @@ a{color:#0067c0}a:hover{color:#004c8c} Users6 Archive Jobs3 - Settings Logs - About + Settings
A adminAdministrator diff --git a/docs/ui/mockups/AdminUsers.html b/docs/ui/mockups/AdminUsers.html index 10adee2b..dc1f8d8b 100644 --- a/docs/ui/mockups/AdminUsers.html +++ b/docs/ui/mockups/AdminUsers.html @@ -19,10 +19,9 @@ a{color:#0067c0}a:hover{color:#004c8c} Users6 Archive Jobs3 - Settings Logs - About + Settings
A adminAdministrator diff --git a/i18n/ar/Admin.ar.resx b/i18n/ar/Admin.ar.resx index fd8937b1..2f809602 100644 --- a/i18n/ar/Admin.ar.resx +++ b/i18n/ar/Admin.ar.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 إصدار API قاعدة البيانات - TLS SHA-256 - اسم الخادم خادم Chronos مدة التشغيل الإصدار @@ -266,8 +264,6 @@ الإجراء الوقت المستخدم - حول - الإصدار وبصمة الشهادة الأرشيف مسار الأرشيف والقوالب والفحص والتحقق إظهار القائمة كأيقونات فقط · Ctrl+B diff --git a/i18n/bg/Admin.bg.resx b/i18n/bg/Admin.bg.resx index 99263d84..66ea609d 100644 --- a/i18n/bg/Admin.bg.resx +++ b/i18n/bg/Admin.bg.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Версия на API База данни - TLS SHA-256 - Име на сървъра Chronos Server Време на работа Версия @@ -240,8 +238,6 @@ Какво Кога Кой - Относно - Версия и отпечатък на сертификата Архив Път до архива, шаблони, сканиране и проверка Показва менюто само с икони · Ctrl+B diff --git a/i18n/cs/Admin.cs.resx b/i18n/cs/Admin.cs.resx index b827fd47..89195186 100644 --- a/i18n/cs/Admin.cs.resx +++ b/i18n/cs/Admin.cs.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Verze API Databáze - TLS SHA-256 - Název serveru Chronos Server Doba provozu Verze @@ -253,8 +251,6 @@ Co Kdy Kdo - O aplikaci - Verze a otisk certifikátu Archiv Cesta k archivu, šablony, prohledání a ověření Zobrazí nabídku jen jako ikony · Ctrl+B diff --git a/i18n/da/Admin.da.resx b/i18n/da/Admin.da.resx index cde7e95e..c679f09d 100644 --- a/i18n/da/Admin.da.resx +++ b/i18n/da/Admin.da.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API-version Database - TLS SHA-256 - Servernavn Chronos Server Oppetid Version @@ -240,8 +238,6 @@ Hvad Hvornår Hvem - Om - Version og certifikatets fingeraftryk Arkiv Arkivsti, skabeloner, scanning og verificering Vis menuen kun som ikoner · Ctrl+B diff --git a/i18n/de/Admin.de.resx b/i18n/de/Admin.de.resx index fe191122..74ccd5a1 100644 --- a/i18n/de/Admin.de.resx +++ b/i18n/de/Admin.de.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API-Version Datenbank - TLS SHA-256 - Servername Chronos Server Läuft seit Version @@ -240,8 +238,6 @@ Was Wann Wer - Info - Version und Fingerabdruck des Zertifikats Archiv Archivpfad, Vorlagen, Scan und Prüfung Menü nur als Symbole anzeigen · Ctrl+B diff --git a/i18n/el/Admin.el.resx b/i18n/el/Admin.el.resx index b05a5021..05b189e2 100644 --- a/i18n/el/Admin.el.resx +++ b/i18n/el/Admin.el.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Έκδοση API Βάση δεδομένων - TLS SHA-256 - Όνομα διακομιστή Chronos Server Χρόνος λειτουργίας Έκδοση @@ -240,8 +238,6 @@ Τι Πότε Ποιος - Πληροφορίες - Έκδοση και αποτύπωμα πιστοποιητικού Αρχειοθήκη Διαδρομή αρχειοθήκης, πρότυπα, σάρωση και επαλήθευση Εμφάνιση του μενού μόνο με εικονίδια · Ctrl+B diff --git a/i18n/en/Admin.resx b/i18n/en/Admin.resx index 4b26aeef..6b988608 100644 --- a/i18n/en/Admin.resx +++ b/i18n/en/Admin.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API version Database - TLS SHA-256 - Server name Chronos Server Running for Version @@ -246,8 +244,6 @@ What When Who - About - Version and certificate fingerprint Archive Archive path, templates, scan and verify Show the menu as icons only · Ctrl+B @@ -277,6 +273,7 @@ Editor Uploader Viewer + About Chunk size (MiB) Size of each upload chunk; smaller chunks resume faster on poor links LAN discovery diff --git a/i18n/es/Admin.es.resx b/i18n/es/Admin.es.resx index 628b989f..eb55134c 100644 --- a/i18n/es/Admin.es.resx +++ b/i18n/es/Admin.es.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Versión de la API Base de datos - TLS SHA-256 - Nombre del servidor Chronos Server Tiempo activo Versión @@ -240,8 +238,6 @@ Qué Cuándo Quién - Acerca de - Versión y huella digital del certificado Fototeca Ruta de la fototeca, plantillas, escaneo y verificación Muestra el menú solo con iconos · Ctrl+B diff --git a/i18n/et/Admin.et.resx b/i18n/et/Admin.et.resx index cdbfab1e..d6cb4dd3 100644 --- a/i18n/et/Admin.et.resx +++ b/i18n/et/Admin.et.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API versioon Andmebaas - TLS SHA-256 - Serveri nimi Chronos Server Tööaeg Versioon @@ -240,8 +238,6 @@ Mis Millal Kes - Teave - Versioon ja sertifikaadi sõrmejälg Arhiiv Arhiivi tee, mallid, skannimine ja kontrollimine Kuvage menüü ainult ikoonidena · Ctrl+B diff --git a/i18n/fi/Admin.fi.resx b/i18n/fi/Admin.fi.resx index d3571dc7..8f0bd6d6 100644 --- a/i18n/fi/Admin.fi.resx +++ b/i18n/fi/Admin.fi.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API-versio Tietokanta - TLS SHA-256 - Palvelimen nimi Chronos-palvelin Käynnissä Versio @@ -240,8 +238,6 @@ Mitä Milloin Kuka - Tietoja - Versio ja varmenteen sormenjälki Arkisto Arkiston polku, mallit, skannaus ja tarkistus Näytä valikko vain kuvakkeina · Ctrl+B diff --git a/i18n/fr/Admin.fr.resx b/i18n/fr/Admin.fr.resx index 693a8542..67747b28 100644 --- a/i18n/fr/Admin.fr.resx +++ b/i18n/fr/Admin.fr.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Version de l'API Base de données - TLS SHA-256 - Nom du serveur Chronos Server Actif depuis Version @@ -240,8 +238,6 @@ Quoi Quand Qui - À propos - Version et empreinte du certificat Archive Chemin de l'archive, modèles, scan et vérification Afficher uniquement les icônes du menu · Ctrl+B diff --git a/i18n/he/Admin.he.resx b/i18n/he/Admin.he.resx index e41210cf..e03c403f 100644 --- a/i18n/he/Admin.he.resx +++ b/i18n/he/Admin.he.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 גרסת API מסד נתונים - TLS SHA-256 - שם השרת שרת Chronos זמן פעולה גרסה @@ -253,8 +251,6 @@ מה מתי מי - אודות - גרסה וטביעת האצבע של התעודה ארכיון נתיב הארכיון, תבניות, סריקה ואימות הצגת התפריט כסמלים בלבד · Ctrl+B diff --git a/i18n/hi/Admin.hi.resx b/i18n/hi/Admin.hi.resx index d1847ab9..aa362760 100644 --- a/i18n/hi/Admin.hi.resx +++ b/i18n/hi/Admin.hi.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API संस्करण डेटाबेस - TLS SHA-256 - सर्वर नाम Chronos Server चालू अवधि संस्करण @@ -240,8 +238,6 @@ क्या कब कौन - परिचय - संस्करण और प्रमाणपत्र का फ़िंगरप्रिंट संग्रह संग्रह पथ, टेम्पलेट, स्कैन और सत्यापन मेनू को केवल आइकन के रूप में दिखाएँ · Ctrl+B diff --git a/i18n/hr/Admin.hr.resx b/i18n/hr/Admin.hr.resx index 101f2a2f..fe24833c 100644 --- a/i18n/hr/Admin.hr.resx +++ b/i18n/hr/Admin.hr.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Verzija API-ja Baza podataka - TLS SHA-256 - Naziv poslužitelja Chronos Server Vrijeme rada Verzija @@ -253,8 +251,6 @@ Što Kada Tko - O programu - Verzija i otisak certifikata Arhiva Putanja arhive, predlošci, skeniranje i provjera Prikazuje izbornik samo s ikonama · Ctrl+B diff --git a/i18n/hu/Admin.hu.resx b/i18n/hu/Admin.hu.resx index 19fb1df3..3282a612 100644 --- a/i18n/hu/Admin.hu.resx +++ b/i18n/hu/Admin.hu.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API-verzió Adatbázis - TLS SHA-256 - Szervernév Chronos Server Üzemidő Verzió @@ -240,8 +238,6 @@ Mi Mikor Ki - Névjegy - Verzió és a tanúsítvány ujjlenyomata Archívum Az archívum elérési útja, sablonok, átvizsgálás és ellenőrzés Csak ikonokkal jeleníti meg a menüt · Ctrl+B diff --git a/i18n/id/Admin.id.resx b/i18n/id/Admin.id.resx index 840a3ecc..7a2b7606 100644 --- a/i18n/id/Admin.id.resx +++ b/i18n/id/Admin.id.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Versi API Basis data - TLS SHA-256 - Nama server Chronos Server Berjalan selama Versi @@ -240,8 +238,6 @@ Apa Kapan Siapa - Tentang - Versi dan sidik jari sertifikat Arsip Jalur arsip, templat, pemindaian, dan verifikasi Tampilkan menu hanya sebagai ikon · Ctrl+B diff --git a/i18n/it/Admin.it.resx b/i18n/it/Admin.it.resx index bb87d351..ebfabb04 100644 --- a/i18n/it/Admin.it.resx +++ b/i18n/it/Admin.it.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Versione API Database - TLS SHA-256 - Nome server Chronos Server In esecuzione da Versione @@ -246,8 +244,6 @@ Cosa Quando Chi - Informazioni - Versione e impronta del certificato Archivio Percorso archivio, modelli, scansione e verifica Mostra il menu solo con le icone · Ctrl+B @@ -276,6 +272,7 @@ Editor Caricamento Lettore + Informazioni Dimensione blocco (MiB) Dimensione di ogni blocco di caricamento; blocchi piccoli riprendono prima su linee lente Rilevamento LAN diff --git a/i18n/ja/Admin.ja.resx b/i18n/ja/Admin.ja.resx index 9d7038d6..21c18a0c 100644 --- a/i18n/ja/Admin.ja.resx +++ b/i18n/ja/Admin.ja.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API バージョン データベース - TLS SHA-256 - サーバー名 Chronos Server 稼働時間 バージョン @@ -240,8 +238,6 @@ 内容 日時 ユーザー - バージョン情報 - バージョンと証明書のフィンガープリント アーカイブ アーカイブのパス、テンプレート、スキャン、検証 メニューをアイコンだけで表示します · Ctrl+B diff --git a/i18n/ko/Admin.ko.resx b/i18n/ko/Admin.ko.resx index b2aa370a..b09538a4 100644 --- a/i18n/ko/Admin.ko.resx +++ b/i18n/ko/Admin.ko.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API 버전 데이터베이스 - TLS SHA-256 - 서버 이름 Chronos Server 가동 시간 버전 @@ -240,8 +238,6 @@ 내용 시각 사용자 - 정보 - 버전 및 인증서 지문 아카이브 아카이브 경로, 템플릿, 스캔 및 검증 메뉴를 아이콘으로만 표시합니다 · Ctrl+B diff --git a/i18n/lt/Admin.lt.resx b/i18n/lt/Admin.lt.resx index 3cf74449..246c5c6b 100644 --- a/i18n/lt/Admin.lt.resx +++ b/i18n/lt/Admin.lt.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API versija Duomenų bazė - TLS SHA-256 - Serverio pavadinimas Chronos serveris Veikia Versija @@ -253,8 +251,6 @@ Veiksmas Kada Kas - Apie - Versija ir sertifikato kontrolinis kodas Archyvas Archyvo kelias, šablonai, nuskaitymas ir patikra Rodyti tik meniu piktogramas · Ctrl+B diff --git a/i18n/lv/Admin.lv.resx b/i18n/lv/Admin.lv.resx index 2264bca8..c79792f1 100644 --- a/i18n/lv/Admin.lv.resx +++ b/i18n/lv/Admin.lv.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API versija Datu bāze - TLS SHA-256 - Servera nosaukums Chronos Server Darbības laiks Versija @@ -253,8 +251,6 @@ Darbība Kad Kas - Par - Versija un sertifikāta nospiedums Arhīvs Arhīva ceļš, veidnes, skenēšana un verificēšana Rādīt izvēlni tikai ar ikonām · Ctrl+B diff --git a/i18n/ms/Admin.ms.resx b/i18n/ms/Admin.ms.resx index 1163886b..592905a8 100644 --- a/i18n/ms/Admin.ms.resx +++ b/i18n/ms/Admin.ms.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Versi API Pangkalan data - TLS SHA-256 - Nama pelayan Chronos Server Berjalan selama Versi @@ -240,8 +238,6 @@ Apa Bila Siapa - Perihal - Versi dan cap jari sijil Arkib Laluan arkib, templat, imbas dan sahkan Tunjukkan menu sebagai ikon sahaja · Ctrl+B diff --git a/i18n/nb/Admin.nb.resx b/i18n/nb/Admin.nb.resx index e367fbab..cd183287 100644 --- a/i18n/nb/Admin.nb.resx +++ b/i18n/nb/Admin.nb.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API-versjon Database - TLS SHA-256 - Servernavn Chronos Server Oppetid Versjon @@ -240,8 +238,6 @@ Hva Når Hvem - Om - Versjon og sertifikatets fingeravtrykk Arkiv Arkivbane, maler, skanning og verifisering Vis menyen bare som ikoner · Ctrl+B diff --git a/i18n/nl/Admin.nl.resx b/i18n/nl/Admin.nl.resx index b5b99771..916699a2 100644 --- a/i18n/nl/Admin.nl.resx +++ b/i18n/nl/Admin.nl.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API-versie Database - TLS SHA-256 - Servernaam Chronos Server Bedrijfstijd Versie @@ -240,8 +238,6 @@ Wat Wanneer Wie - Info - Versie en vingerafdruk van het certificaat Archief Archiefpad, sjablonen, scannen en verifiëren Toon het menu alleen als pictogrammen · Ctrl+B diff --git a/i18n/pl/Admin.pl.resx b/i18n/pl/Admin.pl.resx index cf1b717d..cb568ad7 100644 --- a/i18n/pl/Admin.pl.resx +++ b/i18n/pl/Admin.pl.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Wersja API Baza danych - TLS SHA-256 - Nazwa serwera Chronos Server Czas działania Wersja @@ -266,8 +264,6 @@ Co Kiedy Kto - Informacje - Wersja i odcisk palca certyfikatu Archiwum Ścieżka archiwum, szablony, skanowanie i weryfikacja Pokaż menu tylko jako ikony · Ctrl+B diff --git a/i18n/pt-BR/Admin.pt-BR.resx b/i18n/pt-BR/Admin.pt-BR.resx index b6fa9bea..1722dbd4 100644 --- a/i18n/pt-BR/Admin.pt-BR.resx +++ b/i18n/pt-BR/Admin.pt-BR.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Versão da API Banco de dados - TLS SHA-256 - Nome do servidor Chronos Server Em execução há Versão @@ -240,8 +238,6 @@ O quê Quando Quem - Sobre - Versão e impressão digital do certificado Acervo Caminho do acervo, modelos, varredura e verificação Mostra o menu só com ícones · Ctrl+B diff --git a/i18n/pt-PT/Admin.pt-PT.resx b/i18n/pt-PT/Admin.pt-PT.resx index 54f823f0..c1152d23 100644 --- a/i18n/pt-PT/Admin.pt-PT.resx +++ b/i18n/pt-PT/Admin.pt-PT.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Versão da API Base de dados - TLS SHA-256 - Nome do servidor Chronos Server Em execução há Versão @@ -240,8 +238,6 @@ O quê Quando Quem - Acerca de - Versão e impressão digital do certificado Arquivo Caminho do arquivo, modelos, exame e verificação Mostrar o menu apenas com ícones · Ctrl+B diff --git a/i18n/ro/Admin.ro.resx b/i18n/ro/Admin.ro.resx index bffc6622..1f8f223e 100644 --- a/i18n/ro/Admin.ro.resx +++ b/i18n/ro/Admin.ro.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Versiune API Bază de date - TLS SHA-256 - Nume server Chronos Server Rulează de Versiune @@ -253,8 +251,6 @@ Ce Când Cine - Despre - Versiunea și amprenta certificatului Arhivă Calea arhivei, șabloane, scanare și verificare Afișați meniul doar cu pictograme · Ctrl+B diff --git a/i18n/ru/Admin.ru.resx b/i18n/ru/Admin.ru.resx index 26414bfa..2dde72c1 100644 --- a/i18n/ru/Admin.ru.resx +++ b/i18n/ru/Admin.ru.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Версия API База данных - TLS SHA-256 - Имя сервера Chronos Server Время работы Версия @@ -266,8 +264,6 @@ Что Когда Кто - О программе - Версия и отпечаток сертификата Архив Путь к архиву, шаблоны, сканирование и проверка Показать меню только в виде значков · Ctrl+B diff --git a/i18n/sk/Admin.sk.resx b/i18n/sk/Admin.sk.resx index c472a246..122e9df8 100644 --- a/i18n/sk/Admin.sk.resx +++ b/i18n/sk/Admin.sk.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Verzia API Databáza - TLS SHA-256 - Názov servera Chronos Server Doba prevádzky Verzia @@ -253,8 +251,6 @@ Čo Kedy Kto - Informácie - Verzia a odtlačok certifikátu Archív Cesta k archívu, šablóny, skenovanie a overenie Zobrazí ponuku iba ako ikony · Ctrl+B diff --git a/i18n/sl/Admin.sl.resx b/i18n/sl/Admin.sl.resx index eb0c3190..8ef62c10 100644 --- a/i18n/sl/Admin.sl.resx +++ b/i18n/sl/Admin.sl.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Različica API-ja Zbirka podatkov - TLS SHA-256 - Ime strežnika Chronos Server Deluje že Različica @@ -253,8 +251,6 @@ Kaj Kdaj Kdo - O programu - Različica in prstni odtis potrdila Arhiv Pot arhiva, predloge, pregled in preverjanje Pokaži meni samo z ikonami · Ctrl+B diff --git a/i18n/sv/Admin.sv.resx b/i18n/sv/Admin.sv.resx index 7868c8e5..aa65f416 100644 --- a/i18n/sv/Admin.sv.resx +++ b/i18n/sv/Admin.sv.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API-version Databas - TLS SHA-256 - Servernamn Chronos Server Drifttid Version @@ -240,8 +238,6 @@ Vad När Vem - Om - Version och certifikatets fingeravtryck Arkiv Arkivsökväg, mallar, genomsökning och verifiering Visa menyn endast som ikoner · Ctrl+B diff --git a/i18n/th/Admin.th.resx b/i18n/th/Admin.th.resx index d1c1af9f..606f306a 100644 --- a/i18n/th/Admin.th.resx +++ b/i18n/th/Admin.th.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 เวอร์ชัน API ฐานข้อมูล - TLS SHA-256 - ชื่อเซิร์ฟเวอร์ Chronos Server ทำงานมาแล้ว เวอร์ชัน @@ -240,8 +238,6 @@ การดำเนินการ เวลา ผู้ดำเนินการ - เกี่ยวกับ - เวอร์ชันและลายนิ้วมือของใบรับรอง คลังภาพ พาธคลังภาพ เทมเพลต การสแกน และการตรวจสอบ แสดงเมนูเป็นไอคอนเท่านั้น · Ctrl+B diff --git a/i18n/tr/Admin.tr.resx b/i18n/tr/Admin.tr.resx index 9410681a..f4484fd4 100644 --- a/i18n/tr/Admin.tr.resx +++ b/i18n/tr/Admin.tr.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API sürümü Veritabanı - TLS SHA-256 - Sunucu adı Chronos Server Çalışma süresi Sürüm @@ -240,8 +238,6 @@ Ne Ne zaman Kim - Hakkında - Sürüm ve sertifika parmak izi Arşiv Arşiv yolu, şablonlar, tarama ve doğrulama Menüyü yalnızca simgelerle gösterir · Ctrl+B diff --git a/i18n/uk/Admin.uk.resx b/i18n/uk/Admin.uk.resx index 0168d3c0..e0c064f7 100644 --- a/i18n/uk/Admin.uk.resx +++ b/i18n/uk/Admin.uk.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Версія API База даних - TLS SHA-256 - Ім’я сервера Chronos Server Час роботи Версія @@ -266,8 +264,6 @@ Що Коли Хто - Про програму - Версія та відбиток сертифіката Архів Шлях архіву, шаблони, сканування й перевірка Показати меню лише у вигляді значків · Ctrl+B diff --git a/i18n/vi/Admin.vi.resx b/i18n/vi/Admin.vi.resx index 912bb3d2..44d981d8 100644 --- a/i18n/vi/Admin.vi.resx +++ b/i18n/vi/Admin.vi.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Phiên bản API Cơ sở dữ liệu - TLS SHA-256 - Tên máy chủ Chronos Server Thời gian hoạt động Phiên bản @@ -240,8 +238,6 @@ Hành động Thời điểm Người thực hiện - Giới thiệu - Phiên bản và dấu vân tay chứng chỉ Kho lưu trữ Đường dẫn kho lưu trữ, mẫu đặt tên, quét và xác minh Chỉ hiển thị menu dưới dạng biểu tượng · Ctrl+B diff --git a/i18n/zh-Hans/Admin.zh-Hans.resx b/i18n/zh-Hans/Admin.zh-Hans.resx index f3d57e0b..aa850bfc 100644 --- a/i18n/zh-Hans/Admin.zh-Hans.resx +++ b/i18n/zh-Hans/Admin.zh-Hans.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API 版本 数据库 - TLS SHA-256 - 服务器名称 Chronos 服务器 已运行 版本 @@ -240,8 +238,6 @@ 操作 时间 用户 - 关于 - 版本和证书指纹 档案库 档案库路径、模板、扫描和校验 仅以图标显示菜单 · Ctrl+B diff --git a/i18n/zh-Hant/Admin.zh-Hant.resx b/i18n/zh-Hant/Admin.zh-Hant.resx index bfe94b5d..1b2a7f8a 100644 --- a/i18n/zh-Hant/Admin.zh-Hant.resx +++ b/i18n/zh-Hant/Admin.zh-Hant.resx @@ -6,8 +6,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 API 版本 資料庫 - TLS SHA-256 - 伺服器名稱 Chronos Server 已執行時間 版本 @@ -240,8 +238,6 @@ 事件 時間 使用者 - 關於 - 版本與憑證指紋 典藏庫 典藏庫路徑、範本、掃描與驗證 只以圖示顯示功能表 · Ctrl+B diff --git a/src/Chronos.Server/Admin/web/admin.css b/src/Chronos.Server/Admin/web/admin.css index b3f82536..efd6db11 100644 --- a/src/Chronos.Server/Admin/web/admin.css +++ b/src/Chronos.Server/Admin/web/admin.css @@ -61,8 +61,11 @@ h2 { font-size: 14px; font-weight: 600; } .brand strong { display: block; font-size: 14px; } .brand span { display: block; font-size: 11px; color: var(--text-muted); } .brand.large img { width: 40px; height: 40px; } -.brand.large h2 { font-size: 18px; } -.nav { display: grid; gap: 2px; } +.brand.large strong { font-size: 18px; } +/* The menu fills the sidebar: its pages from the top, Settings docked at its foot above the account (owner review 2). */ +.nav { flex: 1 0 auto; display: flex; flex-direction: column; gap: 2px; } +.nav-group { display: grid; gap: 2px; } +.nav-group.bottom { margin-block: auto 8px; padding-block-start: 8px; } .nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; } .nav a:hover { background: var(--card-hover); color: var(--text); } .nav a[aria-current="page"] { background: var(--accent-selected); color: var(--accent); font-weight: 600; } @@ -264,7 +267,10 @@ dialog.dialog p { margin: 0; color: var(--text-muted); } .toast { width: 420px; max-width: calc(100vw - 48px); padding: 12px 14px; color: var(--text); background: var(--card); border: 1px solid var(--stroke); border-inline-start: 3px solid var(--accent); border-radius: var(--radius-card); box-shadow: 0 4px 16px var(--shadow); } .toast.error { border-inline-start-color: var(--error); } -/* About */ +/* About: the last group of Settings (owner review 2); #/about scrolls to it below the sticky header and focuses its heading. */ +.about { scroll-margin-block-start: 84px; } +.about h2:focus { outline: none; } +.about .brand { padding: 0; } .about dl { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 16px; margin: 0; } .about dt { color: var(--text-muted); } .about dd { margin: 0; overflow-wrap: anywhere; } @@ -291,7 +297,9 @@ dialog.dialog p { margin: 0; color: var(--text-muted); } .sidebar { flex-direction: row; overflow-x: auto; padding: 8px; position: static; height: auto; border-bottom: 1px solid var(--stroke); } .main { border-inline-start: 0; } .sidebar .brand, .sidebar .user, .sidebar-toggle { display: none; } - .nav { display: flex; gap: 4px; } + .nav { flex-direction: row; gap: 4px; } + .nav-group { display: flex; gap: 4px; } + .nav-group.bottom { margin: 0; margin-inline-start: auto; padding: 0; } .nav a > span:not(.badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .header { position: static; flex-wrap: wrap; padding-block: 10px; } .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } diff --git a/src/Chronos.Server/Admin/web/app.js b/src/Chronos.Server/Admin/web/app.js index 48261488..4f56400d 100644 --- a/src/Chronos.Server/Admin/web/app.js +++ b/src/Chronos.Server/Admin/web/app.js @@ -5,7 +5,12 @@ import { icons } from "./icons.js"; import { escapeHtml, attr, errorText, nativeName, formatNumber, fitColumns } from "./ui.js"; const app = document.getElementById("app"); -const pages = ["dashboard", "users", "archive", "jobs", "settings", "logs", "about"]; +// The menu: its pages from the top, then the ones docked at its foot above the account (owner review 2). +const topPages = ["dashboard", "users", "archive", "jobs", "logs"]; +const bottomPages = ["settings"]; +const pages = [...topPages, ...bottomPages]; +/** Routes of old bookmarks and where they open now: About is the last group of Settings (owner review 2). */ +const MOVED = { about: "settings?group=about" }; const THEME_KEY = "chronos.admin.theme"; const SIDEBAR_KEY = "chronos.admin.sidebar"; /** The narrow layout of admin.css, where the menu is the top bar and does not collapse. */ @@ -43,7 +48,12 @@ async function start() { } function currentPage() { - const p = location.hash.replace(/^#\/?/, "").split("?")[0]; + let p = location.hash.replace(/^#\/?/, "").split("?")[0]; + if (Object.hasOwn(MOVED, p)) { + // The address shows the new route; replaceState fires no hashchange. + history.replaceState(null, "", `#/${MOVED[p]}`); + p = MOVED[p].split("?")[0]; + } return pages.includes(p) ? p : "dashboard"; } @@ -136,7 +146,7 @@ function renderPasswordChange() { } function renderShell(page, focus) { - const nav = pages.map((p) => ` + const links = (group) => group.map((p) => ` ${icons[p]} `).join(""); const user = api.user(); @@ -146,7 +156,7 @@ function renderShell(page, focus) {