diff --git a/goofy-client/libs/ozg-file-shared/src/lib/ozg-file.model.ts b/goofy-client/libs/ozg-file-shared/src/lib/ozg-file.model.ts index dc69d3d8550d59272309f658d5dbd64795610cb8..468e0a0b98099b6340af8e3139f3762c8d001826 100644 --- a/goofy-client/libs/ozg-file-shared/src/lib/ozg-file.model.ts +++ b/goofy-client/libs/ozg-file-shared/src/lib/ozg-file.model.ts @@ -4,7 +4,7 @@ import { Resource } from '@ngxp/rest'; export interface OzgFile { name: string, size: number, - mimeType: string + contentType: string } export interface OzgFileResource extends OzgFile, Resource { } diff --git a/goofy-client/libs/ozg-file-shared/test/ozg-file.ts b/goofy-client/libs/ozg-file-shared/test/ozg-file.ts index 27df04891c80687d17fc3e5b91064a4f4115c386..82b9a62d6c58fe670b0aa769036534b93acb4d4e 100644 --- a/goofy-client/libs/ozg-file-shared/test/ozg-file.ts +++ b/goofy-client/libs/ozg-file-shared/test/ozg-file.ts @@ -8,7 +8,7 @@ export function createOzgFile(): OzgFile { return { name: faker.lorem.slug(10), size: faker.datatype.number({ min: 1024, max: 10000000000 }), - mimeType: faker.system.mimeType() + contentType: faker.lorem.word() } } diff --git a/goofy-client/libs/ozg-file/src/lib/ozg-file-container/ozg-file/ozg-file.component.html b/goofy-client/libs/ozg-file/src/lib/ozg-file-container/ozg-file/ozg-file.component.html index 9fb1a078ede82e243b0f277391be08473a3b31c7..390c77beae59b8d78f4adbbc34d682fff24c26b5 100644 --- a/goofy-client/libs/ozg-file/src/lib/ozg-file-container/ozg-file/ozg-file.component.html +++ b/goofy-client/libs/ozg-file/src/lib/ozg-file-container/ozg-file/ozg-file.component.html @@ -1,7 +1,6 @@ <div class="container" [ngClass]="{ 'deletable': deletable}" draggable="true" - data-downloadurl="application/pdf:test-dnd.pdf:#baseUrl#download/test-dnd.pdf" (dragstart)="dragStart($event)"> <button [matTooltip]="file.name" diff --git a/goofy-client/libs/ozg-file/src/lib/ozg-file-container/ozg-file/ozg-file.component.ts b/goofy-client/libs/ozg-file/src/lib/ozg-file-container/ozg-file/ozg-file.component.ts index 7e42ddb4d06ab2b12f78e482f3ae645081ab9e1b..a33a903ed798abe776018ec30893587dfcb0a3fa 100644 --- a/goofy-client/libs/ozg-file/src/lib/ozg-file-container/ozg-file/ozg-file.component.ts +++ b/goofy-client/libs/ozg-file/src/lib/ozg-file-container/ozg-file/ozg-file.component.ts @@ -37,7 +37,12 @@ export class OzgFileComponent { } dragStart(event) { - const downloadUrl = `${ this.file.mimeType }:${ this.file.name }:${ getUrl(this.file, OzgFileLinkRel.DOWNLOAD)}` + if (!!this.file.contentType || this.file.contentType === '') this.file.contentType = 'application/octet-stream'; + const downloadUrl = `${ this.file.contentType }:${ this.file.name }:${ getUrl(this.file, OzgFileLinkRel.DOWNLOAD)}` + //const downloadUrl = `${ this.file.contentType }:${ this.file.name }:${ getUrl(this.file, OzgFileLinkRel.DOWNLOAD)}` + //const downloadUrl = 'image/jpeg:Helge1.jpg:http://localhost:4300/api/ozgfiledata/13f009e2-8c81-4d69-9502-b99af959b14f' + //const downloadUrl = 'application/pdf:test-dnd.pdf:http://localhost:4300/assets/test-dnd.pdf' + //const downloadUrl = 'image/jpeg:Helge1.jpg:http://localhost:4300/assets/Helge1.jpg' console.log(downloadUrl); event.dataTransfer.setData("DownloadURL", downloadUrl); } diff --git a/goofy-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/postfach-nachricht-attachments/postfach-nachricht-attachments.component.html b/goofy-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/postfach-nachricht-attachments/postfach-nachricht-attachments.component.html index 0a441c9e2637b850ff020e914d1797baba1abc23..75ca2304cdc4600ea7103dbcfc06941b958c6897 100644 --- a/goofy-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/postfach-nachricht-attachments/postfach-nachricht-attachments.component.html +++ b/goofy-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/postfach-nachricht-attachments/postfach-nachricht-attachments.component.html @@ -1,7 +1,9 @@ <ng-container *ngIf="attachments | async as attachmentStateResource"> <goofy-client-spinner [stateResource]="attachmentStateResource"> - <goofy-client-ozg-file-container *ngFor="let attachment of attachmentStateResource.resource" [attr.data-test-id]="(attachment.name | convertForDataTest) + '-postfach-attachment'" - [file]="attachment"> - </goofy-client-ozg-file-container> + <div class="files"> + <goofy-client-ozg-file-container *ngFor="let attachment of attachmentStateResource.resource" [attr.data-test-id]="(attachment.name | convertForDataTest) + '-postfach-attachment'" + [file]="attachment"> + </goofy-client-ozg-file-container> + </div> </goofy-client-spinner> -</ng-container> \ No newline at end of file +</ng-container> diff --git a/goofy-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/postfach-nachricht-attachments/postfach-nachricht-attachments.component.scss b/goofy-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/postfach-nachricht-attachments/postfach-nachricht-attachments.component.scss index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..770ce8c840fae32961ba21955355e76911487ad0 100644 --- a/goofy-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/postfach-nachricht-attachments/postfach-nachricht-attachments.component.scss +++ b/goofy-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/postfach-nachricht-attachments/postfach-nachricht-attachments.component.scss @@ -0,0 +1,8 @@ +.files { + display: flex; + flex-wrap: wrap; + margin: 4px -4px; + flex-direction: row; + max-width: 100%; + align-items: flex-start; +} diff --git a/goofy-client/libs/postfach/src/lib/postfach-page-container/postfach-page/postfach-page-mail-list/postfach-page-mail-list.component.scss b/goofy-client/libs/postfach/src/lib/postfach-page-container/postfach-page/postfach-page-mail-list/postfach-page-mail-list.component.scss index 2ccced7198a72c220e7223de749fafb34dcb6899..3e3c9ac836af26aa6049425e19db0a0f6097576f 100644 --- a/goofy-client/libs/postfach/src/lib/postfach-page-container/postfach-page/postfach-page-mail-list/postfach-page-mail-list.component.scss +++ b/goofy-client/libs/postfach/src/lib/postfach-page-container/postfach-page/postfach-page-mail-list/postfach-page-mail-list.component.scss @@ -21,6 +21,10 @@ } } + .file { + width: 100%; + } + .body { margin: 4px 0; }