Skip to content

Commit 4c42130

Browse files
committed
PD-5452
1 parent d19c437 commit 4c42130

7 files changed

Lines changed: 15 additions & 31 deletions

File tree

projects/orcid-ui-docs/src/app/pages/orcid-ui/step-view-page.component.html

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<app-documentation-page
2+
i18n-title="@@orcidUiDocs.stepView.title"
3+
i18n-description="@@orcidUiDocs.stepView.description"
24
title="Step View"
3-
description="A reusable step shell for guided flows with title/subtitle, projected body content, optional footer projection, and primary/secondary action outputs."
5+
description="A reusable step shell for guided flows with title/subtitle, projected body content, optional footer projection, and a primary action output."
46
>
57
<div controls>
68
<p>Change these values to preview `orcid-step-view` behavior:</p>
@@ -20,11 +22,6 @@
2022
<input matInput [(ngModel)]="config.primaryLabel" />
2123
</mat-form-field>
2224

23-
<mat-form-field appearance="outline">
24-
<mat-label>Secondary action label</mat-label>
25-
<input matInput [(ngModel)]="config.secondaryLabel" />
26-
</mat-form-field>
27-
2825
<mat-checkbox [(ngModel)]="config.primaryDisabled">
2926
Disable primary action
3027
</mat-checkbox>
@@ -41,7 +38,6 @@
4138
[title]="config.title"
4239
[subtitle]="config.subtitle"
4340
[primaryLabel]="config.primaryLabel"
44-
[secondaryLabel]="config.secondaryLabel"
4541
[primaryDisabled]="config.primaryDisabled"
4642
[fullWidthActions]="config.fullWidthActions"
4743
>
@@ -64,10 +60,8 @@
6460
[title]="title"
6561
[subtitle]="subtitle"
6662
[primaryLabel]="primaryLabel"
67-
[secondaryLabel]="secondaryLabel"
6863
[primaryDisabled]="isPrimaryDisabled"
6964
(primaryAction)="onPrimary()"
70-
(secondaryAction)="onSecondary()"
7165
&gt;
7266
&lt;div&gt;Step content goes here&lt;/div&gt;
7367

@@ -85,7 +79,6 @@ <h4>Inputs</h4>
8579
<code>subtitle</code>: Optional secondary line (for step count copy).
8680
</li>
8781
<li><code>primaryLabel</code>: Optional primary button label.</li>
88-
<li><code>secondaryLabel</code>: Optional secondary button label.</li>
8982
<li><code>primaryDisabled</code>: Disables primary action.</li>
9083
<li>
9184
<code>fullWidthActions</code>: Makes action buttons stretch to width.
@@ -97,9 +90,6 @@ <h4>Outputs</h4>
9790
<li>
9891
<code>primaryAction</code>: Emitted when primary action is clicked.
9992
</li>
100-
<li>
101-
<code>secondaryAction</code>: Emitted when secondary action is clicked.
102-
</li>
10393
</ul>
10494

10595
<h4>Slots</h4>

projects/orcid-ui-docs/src/app/pages/orcid-ui/step-view-page.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class StepViewPageComponent {
2929
title: 'Enable two-factor authentication',
3030
subtitle: 'Step 1 of 2 - Authentication app',
3131
primaryLabel: 'Next step - 2FA recovery codes',
32-
secondaryLabel: '',
3332
primaryDisabled: false,
3433
fullWidthActions: true,
3534
}

projects/orcid-ui/src/lib/components/step-view/step-view.component.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@ <h2 class="orcid-step-view__title">{{ title }}</h2>
2121
class="orcid-step-view__actions"
2222
[class.orcid-step-view__actions--full]="fullWidthActions"
2323
>
24-
<button
25-
*ngIf="secondaryLabel"
26-
mat-stroked-button
27-
type="button"
28-
(click)="secondaryAction.emit()"
29-
>
30-
{{ secondaryLabel }}
31-
</button>
32-
3324
<button
3425
*ngIf="primaryLabel"
3526
mat-flat-button

projects/orcid-ui/src/lib/components/step-view/step-view.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,11 @@ export class OrcidStepViewComponent {
2828
/** Optional text for the primary action button. */
2929
@Input() primaryLabel = ''
3030

31-
/** Optional text for the secondary action button. */
32-
@Input() secondaryLabel = ''
33-
3431
/** Disables the primary action button when true. */
3532
@Input() primaryDisabled = false
3633

3734
/** Whether footer buttons should fill the container width. */
3835
@Input() fullWidthActions = true
3936

4037
@Output() primaryAction = new EventEmitter<void>()
41-
@Output() secondaryAction = new EventEmitter<void>()
4238
}

src/app/two-factor-setup/components/two-factor-enable/two-factor-enable.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
</p>
1515

1616
<div class="qr-wrapper">
17-
<img src="{{ environment.API_WEB }}2FA/qr-code.png" alt="qr code" />
17+
<img
18+
src="{{ environment.API_WEB }}2FA/qr-code.png"
19+
alt="qr code"
20+
i18n-alt="@@account.qrCodeAltText"
21+
/>
1822
</div>
1923

2024
<p class="step-copy setup-code-row">

src/app/two-factor-setup/components/two-factor-enable/two-factor-enable.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { RumJourneyEventService } from '../../../rum/service/customEvent.service
1515
import { AppEventName } from '../../../rum/app-event-names'
1616

1717
declare const runtimeEnvironment: any
18+
declare const $localize: any
1819

1920
export const clipboardTooltip: MatTooltipDefaultOptions = {
2021
showDelay: 500,
@@ -44,7 +45,8 @@ export class TwoFactorEnableComponent implements OnInit {
4445
twoFactorForm: UntypedFormGroup
4546
showTextCode = false
4647
loading = false
47-
textCodeCopiedTooltip = 'Setup code has been copied to the clipboard'
48+
textCodeCopiedTooltip =
49+
$localize`:@@account.setupCodeClipboard:Setup code has been copied to the clipboard`
4850

4951
constructor(
5052
private _twoFactorService: TwoFactorAuthenticationService,

src/app/two-factor-setup/components/two-factor-recovery-codes/two-factor-recovery-codes.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Inject, Input, OnInit } from '@angular/core'
1+
import { Component, Input, OnInit, inject } from '@angular/core'
22
import { ApplicationRoutes } from '../../../constants'
33
import { WINDOW } from '../../../cdk/window'
44
import {
@@ -10,6 +10,8 @@ import { Router } from '@angular/router'
1010
import { RumJourneyEventService } from '../../../rum/service/customEvent.service'
1111
import { AppEventName } from '../../../rum/app-event-names'
1212

13+
declare const $localize: any
14+
1315
@Component({
1416
selector: 'app-two-factor-recovery-codes',
1517
templateUrl: './two-factor-recovery-codes.component.html',
@@ -27,9 +29,9 @@ export class TwoFactorRecoveryCodesComponent implements OnInit {
2729
hasDownloadedOrCopied = false
2830

2931
tooltipClipboard = $localize`:@@account.clipboard:Backup codes have been copied to the clipboard`
32+
private window = inject<Window>(WINDOW)
3033

3134
constructor(
32-
@Inject(WINDOW) private window: Window,
3335
private router: Router,
3436
private _observability: RumJourneyEventService
3537
) {}

0 commit comments

Comments
 (0)