Skip to content

Commit

Permalink
fix UI issue to render version note properly
Browse files Browse the repository at this point in the history
  • Loading branch information
gfxcc committed Dec 9, 2023
1 parent 532c1c2 commit afaf083
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
min-width: 200px;
max-width: 600px;
}

:host ::ng-deep .ck-editor__editable_inline {
max-height: 500px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
}

.entry-image-container {
display: flex;
/* display: flex;
justify-content: center;
align-items: center;
align-items: center; */
width: 320px;
height: 200px;
}

.entry-image {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<div class="container clickable-card" (click)="onClick()">
<div class="entry-area inner-border">
<div class="entry-image-container">
<img [hidden]="this.loadingPreview"
class="entry-image" [src]="getCoverImage()"
<img [hidden]="this.loadingPreview" class="entry-image" [src]="getCoverImage()"
(load)="this.loadingPreview=false;">
<p-skeleton *ngIf="this.loadingPreview"
height="200px"></p-skeleton>
<p-skeleton *ngIf="this.loadingPreview" height="200px"></p-skeleton>
</div>

<div class="entry-content">
Expand All @@ -23,9 +21,7 @@ <h5 class="entry-subject">
</div>
<div class="entry-meta">
<span class="entry-avatar">
<img [src]="this.user?.imageUrl | fullUrl: '128_128'"
class="avatar-img"
width="36" height="36">
<img [src]="this.user?.imageUrl | fullUrl: '128_128'" class="avatar-img" width="36" height="36">
<span class="entry-author-link">
<a href="users/{{user?.userId}}">{{user?.username}}</a>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component, ElementRef, Input, OnInit, Renderer2 } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { PageEvent } from '@angular/material/paginator';
import { Router } from '@angular/router';
import { finalize } from 'rxjs';
import { NotificationService } from 'src/app/common/notification.service';
import { ProgressService } from 'src/app/progress.service';
import { San11PlatformServiceService } from 'src/app/service/san11-platform-service.service';
Expand All @@ -18,7 +19,7 @@ export class DiscussionComponent implements OnInit {
@Input() displayName: string = "讨论区";
@Input() parent: string;

threads: Thread[] = [];
threads: Thread[];
pageSize = 20;
totalThreadsCount = 200;
reachedEnd = false;
Expand Down Expand Up @@ -49,18 +50,18 @@ export class DiscussionComponent implements OnInit {
pageSize: this.pageSize.toString(),
pageToken: `{ "watermark": "${watermark}" }`,
})
this.san11pkService.listThreads(request).subscribe(
(resp: ListThreadsResponse) => {
this.threads = resp.threads;
this.scrollToTop();
this.updateTotalCount(resp.threads.length < pageSize, watermark + resp.threads.length);
this.progressService.complete();
},
error => {
this.notificationService.warn(`获取讨论列表失败: ${error.statusMessage}.`);
this.progressService.complete();
}
);
this.san11pkService.listThreads(request)
.pipe(finalize(() => this.progressService.complete()))
.subscribe({
next: (resp: ListThreadsResponse) => {
this.threads = resp.threads;
this.scrollToTop();
this.updateTotalCount(resp.threads.length < pageSize, watermark + resp.threads.length);
},
error: error => {
this.notificationService.warn(`获取讨论列表失败: ${error.statusMessage}.`);
}
});
}

scrollToTop() {
Expand Down

0 comments on commit afaf083

Please sign in to comment.