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:
@@ -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.
@@ -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(() => {
|
||||||
API.putServerConfig({
|
clearTimeout(_resizeTimer);
|
||||||
...App.serverConfig,
|
_resizeTimer = setTimeout(() => {
|
||||||
popup_detail_w: pd.offsetWidth,
|
API.putServerConfig({
|
||||||
popup_detail_h: pd.offsetHeight,
|
...App.serverConfig,
|
||||||
}).catch(() => {});
|
popup_detail_w: pd.offsetWidth,
|
||||||
|
popup_detail_h: pd.offsetHeight,
|
||||||
|
}).catch(() => {});
|
||||||
|
}, 600);
|
||||||
});
|
});
|
||||||
_resizeObs.observe(pd);
|
_resizeObs.observe(pd);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user