Skip to content

Commit 39788e2

Browse files
committed
Updated.
1 parent 7a307b0 commit 39788e2

File tree

7 files changed

+10
-13
lines changed

7 files changed

+10
-13
lines changed

electron/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default class Main {
4444
request.onBeforeSendHeaders(
4545
filter,
4646
(details, callback) => {
47-
console.log(details);
47+
//console.log(details);
4848
details.requestHeaders['Origin'] = 'capacitor-electron://-';
4949
details.requestHeaders['Access-Control-Allow-Origin'] = "capacitor-electron://-",
5050
details.requestHeaders["Access-Control-Allow-Methods"] = "GET,HEAD,OPTIONS,POST,PUT";

src/app/home/components/book-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</mat-card-subtitle>
2121
</mat-card-header>
2222

23-
<mat-card-content fxLayout="row" fxLayoutGap="5px" class="cate-list">
23+
<mat-card-content *ngIf="book.desc.length > 0" fxLayout="row" fxLayoutGap="5px" class="cate-list">
2424
<mat-label><b></b>{{book.desc}}<b></b></mat-label>
2525
</mat-card-content>
2626

src/app/home/components/book-list.component.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ export class BookListComponent implements OnInit, OnChanges {
5757
private book: BookService,
5858
private cdr: ChangeDetectorRef,
5959
private opMessage: OpMessageService
60-
) {
61-
this._bookList = book.list;
62-
}
60+
) {}
6361

6462
get bookList () {
6563
const bookList = this._bookList.filter(b => filterFn(b, this.filter));
@@ -68,9 +66,7 @@ export class BookListComponent implements OnInit, OnChanges {
6866
: sortBy(bookList, this.sortBy);
6967
}
7068

71-
ngOnInit() {
72-
console.log(this._bookList)
73-
}
69+
ngOnInit() {}
7470

7571
ngOnChanges (changes: SimpleChanges) {
7672
if ('sortBy' in changes) {

src/app/home/home.page.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
</ion-header>
5959
<ion-content padding>
6060
<section class="book-list">
61-
<app-book-list [_bookList]="bookList" [sortBy]="sortBy" [beenOpened]="beenOpened" [displayRecycled]="displayRecycled"></app-book-list>
61+
<app-book-list [_bookList]="bookList"
62+
[sortBy]="sortBy"
63+
[beenOpened]="beenOpened"
64+
[displayRecycled]="displayRecycled">
65+
</app-book-list>
6266
</section>
6367
</ion-content>

src/app/home/home.page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export class HomePage implements OnInit, AfterViewInit {
109109
});
110110

111111
this.message.getMessage().subscribe((_: IMessage) => {
112-
if(_.event === 'book-list-updated') this.bookList = this.book.list.slice();
112+
if(_.event === 'book-list-updated') this.bookList = (_.data as Book[]).slice();
113113

114114
this.cdr.detectChanges();
115115
});

src/app/home/services/book.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ export class BookService {
105105
newBook.defaultBranch = rawRepo['default_branch'];
106106
}
107107

108-
console.log(newBook)
109108
const query: IQuery = {
110109
table: 'Book',
111110
item: newBook

src/app/home/services/writer.service.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ export class WriterService {
6767
if(/gitlab/.test(newBook.website.uri)){
6868
const rawWriterList = await this.fetchService.getWriterProfile(writerName, newBook.website.uri);
6969

70-
console.log(rawWriterList);
71-
7270
_writer.platformId = rawWriterList[0]['id'] as number;
7371
_writer.avatarUrl = rawWriterList[0]['avatar_url'];
7472
_writer.fullName = rawWriterList[0]['name'];

0 commit comments

Comments
 (0)