feat(react/settings): port heading style

This commit is contained in:
Elian Doran
2025-08-18 09:47:18 +03:00
parent 701855344e
commit 3ba0bcea4e
3 changed files with 37 additions and 58 deletions

View File

@@ -738,6 +738,18 @@ function isLaunchBarConfig(noteId: string) {
return ["_lbRoot", "_lbAvailableLaunchers", "_lbVisibleLaunchers", "_lbMobileRoot", "_lbMobileAvailableLaunchers", "_lbMobileVisibleLaunchers"].includes(noteId);
}
export function toggleBodyClass(prefix: string, value: string) {
const $body = $("body");
for (const clazz of Array.from($body[0].classList)) {
// create copy to safely iterate over while removing classes
if (clazz.startsWith(prefix)) {
$body.removeClass(clazz);
}
}
$body.addClass(prefix + value);
}
export default {
reloadFrontendApp,
restartDesktopApp,