diff --git a/.gitignore b/.gitignore index ee5c9d8..cb40977 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ .vscode/* !.vscode/settings.json !.vscode/tasks.json -!.vscode/launch.json +.vscode/launch.json !.vscode/extensions.json # misc diff --git a/src/app/components/service/service.component.ts b/src/app/components/service/service.component.ts index 0270023..25b5268 100644 --- a/src/app/components/service/service.component.ts +++ b/src/app/components/service/service.component.ts @@ -20,8 +20,10 @@ export class ServiceComponent implements OnInit { } onItemSelected(item) { - this.openlpService.setServiceItem(item.id).subscribe(); - this.router.navigate(['slides']); + if (item.is_valid) { + this.openlpService.setServiceItem(item.id).subscribe(); + this.router.navigate(['slides']); + } } getServiceItems() { @@ -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'; diff --git a/src/app/responses.ts b/src/app/responses.ts index 338f520..1dc46ff 100644 --- a/src/app/responses.ts +++ b/src/app/responses.ts @@ -27,16 +27,17 @@ export interface Slide { } export interface ServiceItem { - id: string; - notes: string; - plugin: string; - selected: boolean; - title: string; + id: string; + notes: string; + plugin: string; + selected: boolean; + title: string; + is_valid: boolean; } export interface Theme { - selected: boolean; - name: string; + selected: boolean; + name: string; } export interface MainView {