mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 16:55:24 +03:00
Make the dark / light theme work with PWA (#3883)
Changed the way the dark-theme is loaded. Thanks to @Vitroid for the suggestion.
This commit is contained in:
parent
4bae72907d
commit
be0103f445
3 changed files with 891 additions and 886 deletions
File diff suppressed because it is too large
Load diff
|
@ -61,12 +61,12 @@ DarkTheme.setConfig = function (result) {
|
|||
};
|
||||
|
||||
DarkTheme.applyDark = function () {
|
||||
css_dark.forEach((el) => $(`link[href="${el}"]`).prop('disabled', false));
|
||||
$('body').addClass('dark-theme');
|
||||
this.enabled = true;
|
||||
};
|
||||
|
||||
DarkTheme.applyNormal = function () {
|
||||
css_dark.forEach((el) => $(`link[href="${el}"]`).prop('disabled', true));
|
||||
$('body').removeClass('dark-theme');
|
||||
this.enabled = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<link type="text/css" rel="stylesheet" href="./node_modules/multiple-select/dist/multiple-select.min.css" media="all"/>
|
||||
<link type="text/css" rel="stylesheet" href="./components/EscDshotDirection/Styles.css" media="all"/>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="./css/dark-theme.css" media="all" disabled/>
|
||||
<link type="text/css" rel="stylesheet" href="./css/dark-theme.css" media="all"/>
|
||||
|
||||
<script type="module" src="./js/jquery.js"></script>
|
||||
<!-- TODO: probably won't need this here once everything is imported -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue