mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 11:32:47 +00:00
Block requesting invalid Service items from UI.
This commit is contained in:
parent
22a1a1cab3
commit
ad75ca76ee
2
.gitignore
vendored
2
.gitignore
vendored
@ -21,7 +21,7 @@
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# misc
|
||||
|
@ -20,9 +20,11 @@ export class ServiceComponent implements OnInit {
|
||||
}
|
||||
|
||||
onItemSelected(item) {
|
||||
if (item.is_valid) {
|
||||
this.openlpService.setServiceItem(item.id).subscribe();
|
||||
this.router.navigate(['slides']);
|
||||
}
|
||||
}
|
||||
|
||||
getServiceItems() {
|
||||
this.openlpService.getServiceItems().subscribe(items => this.items = items);
|
||||
@ -35,7 +37,9 @@ export class ServiceComponent implements OnInit {
|
||||
}
|
||||
|
||||
getIcon(item: ServiceItem): string {
|
||||
if (item.plugin === 'songs') {
|
||||
if (!item.is_valid) {
|
||||
return 'delete';
|
||||
} else if (item.plugin === 'songs') {
|
||||
return 'queue_music';
|
||||
} else if (item.plugin === 'images') {
|
||||
return 'image';
|
||||
|
@ -32,6 +32,7 @@ export interface ServiceItem {
|
||||
plugin: string;
|
||||
selected: boolean;
|
||||
title: string;
|
||||
is_valid: boolean;
|
||||
}
|
||||
|
||||
export interface Theme {
|
||||
|
Loading…
Reference in New Issue
Block a user