Skip to content

Commit

Permalink
Corrected a minor error
Browse files Browse the repository at this point in the history
Button displayed Dark Theme on launch when it should display Light Theme
  • Loading branch information
Sheinxy committed Aug 1, 2019
1 parent 0929de8 commit 9cb8c2a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions MobileApp/www/scripts/old-devices/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ var current = getCookie('theme') ? getCookie('theme') : 'light';
theme.href = './styles/' + current + '.css';
icon.src = './assets/icon-' + current + '.png';

if (current ==="dark") {
button.innerHTML = 'Light Theme';
}

function changeTheme() {
if (current === "dark") {
current = 'light';
Expand Down
4 changes: 4 additions & 0 deletions MobileApp/www/scripts/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ let current = getCookie('theme') ? getCookie('theme') : 'light';
theme.href = `./styles/${current}.css`;
icon.src = `./assets/icon-${current}.png`;

if (current ==="dark") {
button.innerHTML = 'Light Theme';
}

function changeTheme() {
if(current === "dark"){
current = 'light';
Expand Down
6 changes: 5 additions & 1 deletion WebApp/scripts/old-devices/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ var current = getCookie('theme') ? getCookie('theme') : 'light';
theme.href = './styles/' + current + '.css';
icon.src = './assets/icon-' + current + '.png';

if (current ==="dark") {
button.innerHTML = 'Light Theme';
}

function changeTheme() {
if (current === "dark") {
current = 'light';
Expand All @@ -16,5 +20,5 @@ function changeTheme() {
}
setCookie('theme', current, 365)
theme.href = './styles/' + current + '.css';
icon.href = './assets/icon-' + current + '.png';
icon.src = './assets/icon-' + current + '.png';
}
4 changes: 4 additions & 0 deletions WebApp/scripts/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ let current = getCookie('theme') ? getCookie('theme') : 'light';
theme.href = `./styles/${current}.css`;
icon.src = `./assets/icon-${current}.png`;

if (current ==="dark") {
button.innerHTML = 'Light Theme';
}

function changeTheme() {
if(current === "dark"){
current = 'light';
Expand Down

0 comments on commit 9cb8c2a

Please sign in to comment.