fix: polices woff2 invalides + debounce ResizeObserver config

- jetbrains-mono.woff2 et share-tech-mono.woff2 étaient des fichiers HTML
  (pages 404 téléchargées par erreur) → remplacés par les vrais binaires wOF2
- JetBrains Mono : fichiers séparés regular/bold (400 et 700)
- ResizeObserver popup détail : debounce 600ms pour éviter 50+ PUT /api/config
  lors d'un resize

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gilles Soulier
2026-05-23 07:14:11 +02:00
parent 017d7bb1bb
commit 1002a6be68
5 changed files with 16 additions and 6 deletions
+7 -1
View File
@@ -15,7 +15,13 @@
@font-face { @font-face {
font-family: 'JetBrains Mono'; font-family: 'JetBrains Mono';
src: url('../fonts/jetbrains-mono.woff2') format('woff2'); src: url('../fonts/jetbrains-mono.woff2') format('woff2');
font-weight: 400 700; font-weight: 400;
font-display: swap;
}
@font-face {
font-family: 'JetBrains Mono';
src: url('../fonts/jetbrains-mono-bold.woff2') format('woff2');
font-weight: 700;
font-display: swap; font-display: swap;
} }
@font-face { @font-face {
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
View File
@@ -2,6 +2,7 @@ const Popups = (() => {
let _currentAgentId = null; let _currentAgentId = null;
let _agentCfgData = null; let _agentCfgData = null;
let _resizeObs = null; let _resizeObs = null;
let _resizeTimer = null;
// ══ POPUP DÉTAIL ══ // ══ POPUP DÉTAIL ══
async function showDetail(agentId) { async function showDetail(agentId) {
@@ -214,11 +215,14 @@ const Popups = (() => {
if (_resizeObs) _resizeObs.disconnect(); if (_resizeObs) _resizeObs.disconnect();
const pd = document.getElementById('popup-detail'); const pd = document.getElementById('popup-detail');
_resizeObs = new ResizeObserver(() => { _resizeObs = new ResizeObserver(() => {
clearTimeout(_resizeTimer);
_resizeTimer = setTimeout(() => {
API.putServerConfig({ API.putServerConfig({
...App.serverConfig, ...App.serverConfig,
popup_detail_w: pd.offsetWidth, popup_detail_w: pd.offsetWidth,
popup_detail_h: pd.offsetHeight, popup_detail_h: pd.offsetHeight,
}).catch(() => {}); }).catch(() => {});
}, 600);
}); });
_resizeObs.observe(pd); _resizeObs.observe(pd);