Skip to content

Commit

Permalink
UI fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
bia-pain-bache committed Oct 9, 2024
1 parent 93c98b3 commit 49d08e9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2436,6 +2436,7 @@ async function renderHomePage (proxySettings, warpConfigs, hostName, password) {
let activeHttpsPortsNo = ${ports.filter(port => defaultHttpsPorts.includes(port)).length};
let activeProtocols = ${activeProtocols};
const warpPlusLicense = '${warpPlusLicense}';
localStorage.getItem('darkMode') === 'enabled' && document.body.classList.add('dark-mode');
document.addEventListener('DOMContentLoaded', async () => {
const configForm = document.getElementById('configForm');
Expand All @@ -2451,8 +2452,6 @@ async function renderHomePage (proxySettings, warpConfigs, hostName, password) {
let qrcodeContainer = document.getElementById('qrcode-container');
let forcedPassChange = false;
const darkModeToggle = document.getElementById('darkModeToggle');
localStorage.getItem('darkMode') === 'enabled' && document.body.classList.add('dark-mode');
${isPassSet && !isWarpReady} && await getWarpConfigs();
const hasFormDataChanged = () => {
Expand Down Expand Up @@ -3005,9 +3004,7 @@ async function renderLoginPage () {
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', async () => {
localStorage.getItem('darkMode') === 'enabled' && document.body.classList.add('dark-mode');
});
localStorage.getItem('darkMode') === 'enabled' && document.body.classList.add('dark-mode');
document.getElementById('loginForm').addEventListener('submit', async (event) => {
event.preventDefault();
const password = document.getElementById('password').value;
Expand Down Expand Up @@ -3088,9 +3085,7 @@ function renderErrorPage (message, error, refer) {
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', async () => {
localStorage.getItem('darkMode') === 'enabled' && document.body.classList.add('dark-mode');
});
localStorage.getItem('darkMode') === 'enabled' && document.body.classList.add('dark-mode');
</script>
</body>
</html>`;
Expand Down

0 comments on commit 49d08e9

Please sign in to comment.