Skip to content

Commit 1dff1ae

Browse files
committed
Fix startup bug
1 parent 53a64e4 commit 1dff1ae

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: CD
33
# Controls when the action will run. Triggers the workflow on push
44
# events but only for the master branch
55
on:
6-
create:
7-
tags:
8-
- v*
9-
# push:
10-
# branches: [ master ]
6+
# create:
7+
# tags:
8+
# - v*
9+
push:
10+
branches: [ master ]
1111

1212
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1313
jobs:

app/player/player.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ angular.module('Player.player', ['ngRoute'])
4343

4444
function setTheme(data) {
4545
// var theme = data.theme
46+
var icons = document.body.querySelectorAll("svg");
47+
4648
if (data.theme == "light") {
4749
$scope.theme = 'light'
4850
document.body.style.backgroundColor = "#F5F5F5"
4951
document.body.style.color = "#212529"
50-
var icons = document.body.querySelectorAll("svg");
5152

5253
icons.forEach(icon => {
5354
icon.style.color = "#212529";
@@ -60,7 +61,6 @@ angular.module('Player.player', ['ngRoute'])
6061
$scope.theme = 'dark'
6162
document.body.style.backgroundColor = "#212121"
6263
document.body.style.color = "azure"
63-
var icons = document.body.querySelectorAll("svg");
6464

6565
icons.forEach(icon => {
6666
icon.style.color = "azure";
@@ -70,6 +70,9 @@ angular.module('Player.player', ['ngRoute'])
7070
}
7171
else if (data.theme == "disco") {
7272
$scope.theme = 'disco'
73+
icons.forEach(icon => {
74+
icon.style.color = "azure";
75+
});
7376
}
7477
}
7578

@@ -205,6 +208,13 @@ angular.module('Player.player', ['ngRoute'])
205208
$scope.$apply()
206209
});
207210
}
211+
else {
212+
$scope.player = new Player(songArr, 0);
213+
214+
$scope.playMusic()
215+
$scope.playMusic()
216+
$scope.$apply()
217+
}
208218
})
209219

210220

0 commit comments

Comments
 (0)