diff --git a/alfa-client/libs/design-component/src/lib/button-with-spinner/button-with-spinner.component.ts b/alfa-client/libs/design-component/src/lib/button-with-spinner/button-with-spinner.component.ts index 6c59b452f070c1e223b856648918ea40befa4a01..119c79897d9e3d630c9ebc7c82706f2b34be6e6a 100644 --- a/alfa-client/libs/design-component/src/lib/button-with-spinner/button-with-spinner.component.ts +++ b/alfa-client/libs/design-component/src/lib/button-with-spinner/button-with-spinner.component.ts @@ -26,11 +26,7 @@ import { CommonModule } from '@angular/common'; import { Component, EventEmitter, Input, Output } from '@angular/core'; import { ButtonComponent, ErrorMessageComponent, buttonVariants } from '@ods/system'; import { VariantProps } from 'class-variance-authority'; -import { - StateResource, - createEmptyStateResource, - isLoaded, -} from 'libs/tech-shared/src/lib/resource/resource.util'; +import { StateResource, createEmptyStateResource, isLoaded } from 'libs/tech-shared/src/lib/resource/resource.util'; import { isNil } from 'lodash-es'; type ButtonVariants = VariantProps<typeof buttonVariants>; @@ -48,6 +44,7 @@ type ButtonVariants = VariantProps<typeof buttonVariants>; [size]="size" [type]="type" [dataTestId]="dataTestId" + [dataTestClass]="dataTestClass" [isLoading]="isLoading" [disabled]="disabled" (clickEmitter)="clickEmitter.emit()" @@ -61,6 +58,7 @@ export class ButtonWithSpinnerComponent { } @Input() text: string = ''; @Input() dataTestId: string = ''; + @Input() dataTestClass: string = ''; @Input() variant: ButtonVariants['variant'] = 'primary'; @Input() size: ButtonVariants['size'] = 'medium'; @Input() disabled: boolean = false; diff --git a/alfa-client/libs/design-system/src/assets/autorenew.svg b/alfa-client/libs/design-system/src/assets/autorenew.svg new file mode 100644 index 0000000000000000000000000000000000000000..34605a00a450ff848e5e7e65f2a828243c09efae --- /dev/null +++ b/alfa-client/libs/design-system/src/assets/autorenew.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path + d="M5.1 16.05C4.73333 15.4167 4.45833 14.7667 4.275 14.1C4.09167 13.4333 4 12.75 4 12.05C4 9.81667 4.775 7.91667 6.325 6.35C7.875 4.78333 9.76667 4 12 4H12.175L10.575 2.4L11.975 1L15.975 5L11.975 9L10.575 7.6L12.175 6H12C10.3333 6 8.91667 6.5875 7.75 7.7625C6.58333 8.9375 6 10.3667 6 12.05C6 12.4833 6.05 12.9083 6.15 13.325C6.25 13.7417 6.4 14.15 6.6 14.55L5.1 16.05ZM12.025 23L8.025 19L12.025 15L13.425 16.4L11.825 18H12C13.6667 18 15.0833 17.4125 16.25 16.2375C17.4167 15.0625 18 13.6333 18 11.95C18 11.5167 17.95 11.0917 17.85 10.675C17.75 10.2583 17.6 9.85 17.4 9.45L18.9 7.95C19.2667 8.58333 19.5417 9.23333 19.725 9.9C19.9083 10.5667 20 11.25 20 11.95C20 14.1833 19.225 16.0833 17.675 17.65C16.125 19.2167 14.2333 20 12 20H11.825L13.425 21.6L12.025 23Z" /> +</svg> \ No newline at end of file diff --git a/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.html b/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.html index 376672b17ee1a2dc6861a152405c4ccd1ddeddf3..5c4fdf62b555bf742f274e27ee4e2745b8b3b567 100644 --- a/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.html +++ b/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.html @@ -27,13 +27,13 @@ <span data-test-class="mail-send-error-text">{{ message }}</span> <ods-icon name="error" fill="error" data-test-class="mail-send-error-icon" /> </div> -<!-- TODO Eigene Component fuer den Button --> -<ozgcloud-stroked-button-with-spinner +<ods-button-with-spinner + class="mb-2" dataTestClass="resend-nachricht-button" + variant="outline" text="Erneut versuchen" - icon="autorenew" [stateResource]="resendPostfachMailStateResource" (clickEmitter)="resend.emit()" > -</ozgcloud-stroked-button-with-spinner> -<!-- --> + <ods-icon icon name="autorenew" /> +</ods-button-with-spinner> diff --git a/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.scss b/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.scss index e4f67423dc137a4d148352d202a4152e8c5ede09..b75a59d754b7ef0969badf5583e62efaf2d60b84 100644 --- a/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.scss +++ b/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.scss @@ -35,8 +35,3 @@ margin: 8px 0 16px; } - -ozgcloud-stroked-button-with-spinner { - display: block; - margin-bottom: 8px; -} diff --git a/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.spec.ts b/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.spec.ts index 68fb6193ea7574ee0985905831e00d034fa7ee6c..b507c6f235eb33002097c73330eee3c8a8e0b741 100644 --- a/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.spec.ts +++ b/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list/postfach-mail/outgoing-mail/outgoing-mail-error-container/outgoing-mail-error/outgoing-mail-error.component.spec.ts @@ -22,8 +22,8 @@ * unter der Lizenz sind dem Lizenztext zu entnehmen. */ import { notExistsAsHtmlElement } from '@alfa-client/test-utils'; -import { OzgcloudStrokedButtonWithSpinnerComponent } from '@alfa-client/ui'; import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ButtonWithSpinnerComponent } from '@ods/component'; import { IconComponent } from '@ods/system'; import { createPostfachMailResource } from 'libs/postfach-shared/test/postfach'; import { getDataTestIdOf } from 'libs/tech-shared/test/data-test'; @@ -38,11 +38,7 @@ describe('OutgoingMailFailedComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ - OutgoingMailErrorComponent, - MockComponent(OzgcloudStrokedButtonWithSpinnerComponent), - MockComponent(IconComponent), - ], + declarations: [OutgoingMailErrorComponent, MockComponent(ButtonWithSpinnerComponent), MockComponent(IconComponent)], }).compileComponents(); });