Fix wrong label set for dark mode switch

This commit is contained in:
Hadi Nategh 2023-01-18 12:15:26 +01:00
parent 0f5fedfc5d
commit 03123ee729
2 changed files with 4 additions and 4 deletions

View File

@ -549,12 +549,12 @@ import "sortablejs/Sortable.min.js";
if (state == 1)
{
node.firstElementChild.classList.remove('darkmode_on');
node.firstElementChild.title = egw.lang('light mode');
node.firstElementChild.title = egw.lang('dark mode');
}
else
{
node.firstElementChild.classList.add('darkmode_on');
node.firstElementChild.title = egw.lang('dark mode');
node.firstElementChild.title = egw.lang('light mode');
}
}
});

View File

@ -1059,12 +1059,12 @@ import {tapAndSwipe} from "../../api/js/tapandswipe";
{
node.classList.remove('darkmode_on');
if (node.hasChildNodes()) node.children[0].classList.remove('darkmode_on');
node.title = egw.lang('light mode');
node.title = egw.lang('dark mode');
}
else
{
node.classList.add('darkmode_on');
node.title = egw.lang('dark mode');
node.title = egw.lang('light mode');
if (node.hasChildNodes()) node.children[0].classList.add('darkmode_on');
}
}