mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 19:32:49 +00:00
Merge branch 'valid' into 'master'
Block requesting invalid Service items from UI. See merge request openlp/web-remote!20
This commit is contained in:
commit
24c74ab3c9
2
.gitignore
vendored
2
.gitignore
vendored
@ -21,7 +21,7 @@
|
|||||||
.vscode/*
|
.vscode/*
|
||||||
!.vscode/settings.json
|
!.vscode/settings.json
|
||||||
!.vscode/tasks.json
|
!.vscode/tasks.json
|
||||||
!.vscode/launch.json
|
.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
|
@ -20,8 +20,10 @@ export class ServiceComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onItemSelected(item) {
|
onItemSelected(item) {
|
||||||
this.openlpService.setServiceItem(item.id).subscribe();
|
if (item.is_valid) {
|
||||||
this.router.navigate(['slides']);
|
this.openlpService.setServiceItem(item.id).subscribe();
|
||||||
|
this.router.navigate(['slides']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getServiceItems() {
|
getServiceItems() {
|
||||||
@ -35,7 +37,9 @@ export class ServiceComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getIcon(item: ServiceItem): string {
|
getIcon(item: ServiceItem): string {
|
||||||
if (item.plugin === 'songs') {
|
if (!item.is_valid) {
|
||||||
|
return 'delete';
|
||||||
|
} else if (item.plugin === 'songs') {
|
||||||
return 'queue_music';
|
return 'queue_music';
|
||||||
} else if (item.plugin === 'images') {
|
} else if (item.plugin === 'images') {
|
||||||
return 'image';
|
return 'image';
|
||||||
|
@ -27,16 +27,17 @@ export interface Slide {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ServiceItem {
|
export interface ServiceItem {
|
||||||
id: string;
|
id: string;
|
||||||
notes: string;
|
notes: string;
|
||||||
plugin: string;
|
plugin: string;
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
|
is_valid: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Theme {
|
export interface Theme {
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MainView {
|
export interface MainView {
|
||||||
|
Loading…
Reference in New Issue
Block a user