Skip to content

Commit

Permalink
Update backend to support slider
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil Ko committed Sep 3, 2019
1 parent 6c89ec6 commit 343cbe5
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions controller-web/src/main/web/src/musiclist/musiclist.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import {
NewMusicListDialog,
DeleteMusicListDialog,
MusicFileInfoDialog,
LoadingDialog
LoadingDialog,
ErrorDialog,
MusicMixerInfoDialog
} from "../dialog/dialog-component";

@Component({
Expand Down Expand Up @@ -41,7 +43,7 @@ export class MusicListComponent implements OnInit {
});

dialogRef.afterClosed().subscribe(newMusicList => {
if (newMusicList != null) {
if (newMusicList != null && newMusicList.label != null && newMusicList.label != "" ) {


const loadingDialogRef = this.dialog.open(LoadingDialog, {
Expand All @@ -58,6 +60,15 @@ export class MusicListComponent implements OnInit {
});
});
}
else
{
const dialogRef = this.dialog.open(ErrorDialog, {
width: "80%",
data: "Invalid music list Label: "
});

return;
}
});

}
Expand Down Expand Up @@ -146,6 +157,15 @@ export class MusicListComponent implements OnInit {

updateMusicList(musiclist: MusicList){

if (musiclist == null || musiclist.label == null || musiclist.label == "" ) {
const dialogRef = this.dialog.open(ErrorDialog, {
width: "80%",
data: "Invalid music list Label: "
});

return;
}

const loadingDialogRef = this.dialog.open(LoadingDialog, {
width: "80%",
data: ""
Expand Down

0 comments on commit 343cbe5

Please sign in to comment.