diff --git a/frontend/src/ts/pages/settings.ts b/frontend/src/ts/pages/settings.ts index 9677f4de8..8f406acab 100644 --- a/frontend/src/ts/pages/settings.ts +++ b/frontend/src/ts/pages/settings.ts @@ -382,7 +382,7 @@ async function initGroups(): Promise { undefined, () => { const customButton = $( - ".pageSettings .section[data-config-name='fontFamily'] .buttons .custom" + ".pageSettings .section[data-config-name='fontFamily'] .buttons button[data-config-value='custom']" ); if ( $( @@ -643,22 +643,21 @@ async function fillSettingsPage(): Promise { if (fontsList) { for (const font of fontsList) { if (Config.fontFamily === font.name) isCustomFont = false; - fontsElHTML += `
${ - font.display !== undefined ? font.display : font.name - }
`; + }" data-config-value="${font.name.replace(/ /g, "_")}">${ + font.display !== undefined ? font.display : font.name + }`; } fontsElHTML += isCustomFont - ? `
Custom (${Config.fontFamily.replace( + ? `
` - : '
Custom
'; + )})` + : ''; fontsEl.innerHTML = fontsElHTML; } diff --git a/frontend/src/ts/popups/simple-popups.ts b/frontend/src/ts/popups/simple-popups.ts index 0496e63e4..af60a3841 100644 --- a/frontend/src/ts/popups/simple-popups.ts +++ b/frontend/src/ts/popups/simple-popups.ts @@ -1872,7 +1872,7 @@ $("#popups").on("click", "#apeKeysPopup table tbody tr .button.edit", (e) => { $(".pageSettings").on( "click", - ".section[data-config-name='fontFamily'] .button.custom", + ".section[data-config-name='fontFamily'] button[data-config-value='custom']", () => { showPopup("applyCustomFont", []); }