refactor: integrate system font into default font selector

This commit is contained in:
Erzbir
2026-08-19 02:25:45 +08:00
parent 930587a542
commit fd751c14b0
5 changed files with 4 additions and 22 deletions
-1
View File
@@ -136,7 +136,6 @@
</style>
<th:block
th:if="${theme.config?.style?.custom_font_enable
and not theme.config?.style?.system_font_enable
and theme.config?.style?.custom_fonts != null
and not #lists.isEmpty(theme.config.style.custom_fonts)}">
+1 -7
View File
@@ -1,7 +1,6 @@
<th:block th:fragment="theme-preferences">
<script data-no-pjax th:inline="javascript">
window.TerminalThemeConfig = {
systemFontEnabled: /*[[${theme.config.style.system_font_enable}]]*/ false,
darkTheme: /*[[${theme.config.style.dark_color_scheme}]]*/ "dark",
lightTheme: /*[[${theme.config.style.light_color_scheme}]]*/ "light",
customDarkTheme: /*[[${theme.config.style.custom_dark_scheme}]]*/ "",
@@ -108,11 +107,7 @@
setStoredPreference(storageKeys.colorScheme, scheme);
root.dataset.themeColorScheme = scheme;
}
function syncSystemFont() {
root.dataset.systemFontEnabled = String(config.systemFontEnabled);
}
function syncPixelStyle() {
root.dataset.pixelStyle = getStoredPreference(storageKeys.pixelStyle)
|| String(config.pixelStyle);
@@ -168,7 +163,6 @@
syncPixelStyle
};
syncSystemFont();
syncThemeMode();
syncPixelStyle();
syncPixelFont();