Revamp the CBX reader layout for improved structure and usability (#2330)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,11 @@ import {Injectable, inject} from '@angular/core';
|
||||
import {API_CONFIG} from '../../../core/config/api-config';
|
||||
import {AuthService} from '../../../shared/service/auth.service';
|
||||
|
||||
export interface CbxPageInfo {
|
||||
pageNumber: number;
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class CbxReaderService {
|
||||
|
||||
@@ -24,6 +29,10 @@ export class CbxReaderService {
|
||||
return this.http.get<number[]>(this.appendToken(`${this.pagesUrl}/${bookId}/pages`));
|
||||
}
|
||||
|
||||
getPageInfo(bookId: number) {
|
||||
return this.http.get<CbxPageInfo[]>(this.appendToken(`${this.pagesUrl}/${bookId}/page-info`));
|
||||
}
|
||||
|
||||
getPageImageUrl(bookId: number, page: number): string {
|
||||
return this.appendToken(`${this.imageUrl}/${bookId}/cbx/pages/${page}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user