Updated a couple routes to the new api and made small tweaks to the UI

This commit is contained in:
Exkywor 2019-11-09 10:26:56 -06:00
parent 176612f207
commit 692b9e8778
No known key found for this signature in database
GPG Key ID: 97340B3B720E2327
3 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,7 @@
mat-divider {
border-color: rgb(175, 175, 175);
}
mat-sidenav { mat-sidenav {
background: white; background: white;
} }

View File

@ -3,6 +3,7 @@ mat-card {
} }
.selected { .selected {
background-color: rgb(235, 235, 235);
font-weight: 700; font-weight: 700;
} }

View File

@ -45,7 +45,7 @@ export class OpenLPService {
else { else {
port = '4316'; port = '4316';
} }
this.apiURL = `http://${host}:${port}/api/v1`; this.apiURL = `http://${host}:${port}/api/v2`;
this.stateChanged$ = new EventEmitter<State>(); this.stateChanged$ = new EventEmitter<State>();
this.retrieveSystemInformation().subscribe(info => { this.retrieveSystemInformation().subscribe(info => {
@ -78,7 +78,7 @@ export class OpenLPService {
} }
getServiceItems(): Observable<ServiceItem[]> { getServiceItems(): Observable<ServiceItem[]> {
return this.http.get<ServiceItem[]>(`${this.apiURL}/service/list`, httpOptions); return this.http.get<ServiceItem[]>(`${this.apiURL}/service/items`, httpOptions);
} }
getSearchablePlugins(): Observable<PluginDescription[]> { getSearchablePlugins(): Observable<PluginDescription[]> {
@ -86,7 +86,7 @@ export class OpenLPService {
} }
setServiceItem(id: number): Observable<any> { setServiceItem(id: number): Observable<any> {
return this.http.get(`${this.apiURL}/service/set?id=${id}`); return this.http.post(`${this.apiURL}/service/show`, {'id': id}, httpOptions);
} }
search(plugin, text): Observable<any> { search(plugin, text): Observable<any> {