diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-02-02 18:01:00 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-02-02 18:01:00 +0200 |
| commit | 753b68265f6b6bcad510dc9c39c935b56c3c407f (patch) | |
| tree | b680d11332831aeb9ea24d435a82ea97d7278e8c /src | |
| parent | 0b460098a81a04d9c8273e3c036213664cbbd3e7 (diff) | |
| download | DevHive-753b68265f6b6bcad510dc9c39c935b56c3c407f.tar DevHive-753b68265f6b6bcad510dc9c39c935b56c3c407f.tar.gz DevHive-753b68265f6b6bcad510dc9c39c935b56c3c407f.zip | |
Improved handling of attachment (file) names in post page and feed
Diffstat (limited to 'src')
3 files changed, 2 insertions, 3 deletions
diff --git a/src/DevHive.Angular/src/app/components/feed/feed.component.html b/src/DevHive.Angular/src/app/components/feed/feed.component.html index a50d9fb..6d3da5f 100644 --- a/src/DevHive.Angular/src/app/components/feed/feed.component.html +++ b/src/DevHive.Angular/src/app/components/feed/feed.component.html @@ -27,7 +27,7 @@ </div> <div class="form-attachments"> <div *ngFor="let file of files" class="form-attachment"> - {{ file.name }} + {{ file.name ? file.name : 'Attachment' }} <div class="remove-form-attachment" (click)="removeAttachment(file.name)"> ☒ </div> diff --git a/src/DevHive.Angular/src/app/components/post-page/post-page.component.html b/src/DevHive.Angular/src/app/components/post-page/post-page.component.html index 8fb998e..da9bcc9 100644 --- a/src/DevHive.Angular/src/app/components/post-page/post-page.component.html +++ b/src/DevHive.Angular/src/app/components/post-page/post-page.component.html @@ -17,7 +17,7 @@ </form> <div class="form-attachments" *ngIf="editingPost"> <div *ngFor="let file of files" class="form-attachment"> - {{ file.name }} + {{ file.name ? file.name : 'Attachment' }} <div class="remove-form-attachment" (click)="removeAttachment(file.name)"> ☒ </div> diff --git a/src/DevHive.Angular/src/app/components/post-page/post-page.component.ts b/src/DevHive.Angular/src/app/components/post-page/post-page.component.ts index cf5934e..8796f20 100644 --- a/src/DevHive.Angular/src/app/components/post-page/post-page.component.ts +++ b/src/DevHive.Angular/src/app/components/post-page/post-page.component.ts @@ -66,7 +66,6 @@ export class PostPageComponent implements OnInit { this._cloudinaryService.getFileRequest(fileURL).subscribe( (result: object) => { const file = result as File; - file.name = 'Attachment'; this.files.push(file); } ); |
