little changes
This commit is contained in:
parent
358cc07593
commit
d3d9ab7c08
@ -5,8 +5,12 @@ const config: CapacitorConfig = {
|
|||||||
appName: 'library',
|
appName: 'library',
|
||||||
webDir: 'www',
|
webDir: 'www',
|
||||||
server: {
|
server: {
|
||||||
androidScheme: 'https'
|
androidScheme: 'https',
|
||||||
}
|
cleartext: true,
|
||||||
|
},
|
||||||
|
ios: {
|
||||||
|
handleApplicationNotifications: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<ion-modal [trigger]="trigger" (willDismiss)="onWillDismiss($event)">
|
<ion-modal [trigger]="trigger">
|
||||||
<ng-template>
|
<ng-template>
|
||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<ion-content class="ion-padding">
|
<ion-content class="ion-padding">
|
||||||
<ion-list class="book-page">
|
<ion-list class="book-page">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<img class="book-image" [src]="item.volumeInfo.imageLinks.thumbnail" [alt]="item.volumeInfo.title">
|
<img class="book-image" [alt]="item.volumeInfo.title" [src]="httpToHttps(item.volumeInfo.imageLinks.thumbnail || '')">
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-label>Название: {{ item.volumeInfo.title }}</ion-label>
|
<ion-label>Название: {{ item.volumeInfo.title }}</ion-label>
|
||||||
@ -28,20 +28,6 @@
|
|||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-label>Колличество страниц: {{ item.volumeInfo.pageCount }}</ion-label>
|
<ion-label>Колличество страниц: {{ item.volumeInfo.pageCount }}</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item lines="none" *ngIf="item.accessInfo.pdf.downloadLink || item.accessInfo.epub.downloadLink">
|
|
||||||
<div class="downloadBtnsItem">
|
|
||||||
<div *ngIf="item.accessInfo.pdf.downloadLink">
|
|
||||||
<ion-button (click)="this.openBrowser(item.accessInfo.pdf.downloadLink || '')">
|
|
||||||
Скачать книгу в pdf
|
|
||||||
</ion-button>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="item.accessInfo.epub.downloadLink">
|
|
||||||
<ion-button (click)="this.openBrowser(item.accessInfo.epub.downloadLink || '')">
|
|
||||||
Скачать книгу в epub
|
|
||||||
</ion-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item lines="full">
|
<ion-item lines="full">
|
||||||
<ion-label>Книга выдана:</ion-label>
|
<ion-label>Книга выдана:</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
@ -24,11 +24,21 @@ export class BookPageComponent implements OnInit {
|
|||||||
@Input() trigger!: string;
|
@Input() trigger!: string;
|
||||||
public openBrowser(url: string) {
|
public openBrowser(url: string) {
|
||||||
InAppBrowser.create(url, '_blank', {
|
InAppBrowser.create(url, '_blank', {
|
||||||
location: 'no',
|
allowInlineMediaPlayback: 'yes',
|
||||||
|
toolbar: 'yes',
|
||||||
|
useWideViewPort: 'yes',
|
||||||
|
hidden: 'no',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
constructor(private storage: StorageService) {}
|
constructor(private storage: StorageService) {}
|
||||||
|
|
||||||
|
public httpToHttps(url: string) {
|
||||||
|
if (url.startsWith('http://')) {
|
||||||
|
return url.replace('http://', 'https://');
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getIssuers();
|
this.getIssuers();
|
||||||
}
|
}
|
||||||
@ -57,7 +67,6 @@ export class BookPageComponent implements OnInit {
|
|||||||
parseDate(date: string) {
|
parseDate(date: string) {
|
||||||
return new Date(date).toLocaleDateString();
|
return new Date(date).toLocaleDateString();
|
||||||
}
|
}
|
||||||
onWillDismiss(event: Event) {}
|
|
||||||
|
|
||||||
protected readonly open = open;
|
protected readonly open = open;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<ion-item-sliding>
|
<ion-item-sliding>
|
||||||
<ion-item lines="none" button>
|
<ion-item lines="none" button>
|
||||||
<ion-card class="rent-card" [id]="'issue' + i">
|
<ion-card class="rent-card" [id]="'issue' + i">
|
||||||
<img class="itemImg" [alt]="item.book.volumeInfo.title" [src]="item.book.volumeInfo.imageLinks.thumbnail"/>
|
<img class="itemImg" [alt]="item.book.volumeInfo.title" [src]="httpToHttps(item.book.volumeInfo.imageLinks.thumbnail || '')"/>
|
||||||
<ion-card-header>
|
<ion-card-header>
|
||||||
<ion-card-title>{{ item.book.volumeInfo.title }}</ion-card-title>
|
<ion-card-title>{{ item.book.volumeInfo.title }}</ion-card-title>
|
||||||
<ion-card-subtitle>Выдан: {{ item.user?.fio }}</ion-card-subtitle>
|
<ion-card-subtitle>Выдан: {{ item.user?.fio }}</ion-card-subtitle>
|
||||||
|
@ -63,4 +63,11 @@ export class RentPage implements OnInit {
|
|||||||
let _date = new Date(date);
|
let _date = new Date(date);
|
||||||
return _date.toLocaleDateString();
|
return _date.toLocaleDateString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public httpToHttps(url: string) {
|
||||||
|
if (url.startsWith('http://')) {
|
||||||
|
return url.replace('http://', 'https://');
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<ion-list *ngFor="let item of searchResult; index as i">
|
<ion-list *ngFor="let item of searchResult; index as i">
|
||||||
<ion-item *ngIf="item.volumeInfo.imageLinks" [id]="'book' + i" lines="none">
|
<ion-item *ngIf="item.volumeInfo.imageLinks" [id]="'book' + i" lines="none">
|
||||||
<ion-thumbnail slot="start">
|
<ion-thumbnail slot="start">
|
||||||
<img [alt]="item.volumeInfo.imageLinks.thumbnail" [src]="item.volumeInfo.imageLinks.thumbnail" />
|
<img [alt]="item.volumeInfo.title" [src]="httpToHttps(item.volumeInfo.imageLinks.thumbnail || '')" />
|
||||||
</ion-thumbnail>
|
</ion-thumbnail>
|
||||||
<ion-label>{{item.volumeInfo.title}}</ion-label>
|
<ion-label>{{item.volumeInfo.title}}</ion-label>
|
||||||
<app-book-page [item]="item" [trigger]="'book'+i" />
|
<app-book-page [item]="item" [trigger]="'book'+i" />
|
||||||
|
@ -29,4 +29,11 @@ export class SearchPage {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public httpToHttps(url: string) {
|
||||||
|
if (url.startsWith('http://')) {
|
||||||
|
return url.replace('http://', 'https://');
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user