|
1 | 1 | <section> |
2 | | - <div class="container" *ngIf="studioService.render$ | async"> |
3 | | - <div class="row"> |
4 | | - <div class="col col-md-6 col-lg-9"> |
5 | | - <h2 |
6 | | - id="readalong-congratulations" |
7 | | - i18n="Congratulations message" |
8 | | - class="subtitle" |
9 | | - > |
10 | | - Congratulations! Here's your ReadAlong! |
11 | | - </h2> |
| 2 | + @if (studioService.render$ | async) { |
| 3 | + <div class="container"> |
| 4 | + <div class="row"> |
| 5 | + <div class="col col-md-6 col-lg-9"> |
| 6 | + <h2 |
| 7 | + id="readalong-congratulations" |
| 8 | + i18n="Congratulations message" |
| 9 | + class="subtitle" |
| 10 | + > |
| 11 | + Congratulations! Here's your ReadAlong! |
| 12 | + </h2> |
| 13 | + </div> |
| 14 | + <div class="col col-md-6 col-lg-3"> |
| 15 | + <ras-shared-download |
| 16 | + (downloadButtonClicked)="download($event)" |
| 17 | + ></ras-shared-download> |
| 18 | + </div> |
12 | 19 | </div> |
13 | | - <div class="col col-md-6 col-lg-3"> |
14 | | - <ras-shared-download |
15 | | - (downloadButtonClicked)="download($event)" |
16 | | - ></ras-shared-download> |
17 | | - </div> |
18 | | - </div> |
19 | 20 |
|
20 | | - <div class="row"></div> |
| 21 | + <div class="row"></div> |
21 | 22 |
|
22 | | - <div class="row" *ngIf="studioService.b64Inputs$ | async as b64Inputs"> |
23 | | - <div *ngIf="b64Inputs[0] && b64Inputs[1] && rasAsDataURL()"> |
24 | | - <read-along |
25 | | - id="readalong" |
26 | | - [language]="language" |
27 | | - #readalong |
28 | | - *ngIf="studioService.render$ | async" |
29 | | - mode="EDIT" |
30 | | - href="{{ rasAsDataURL() }}" |
31 | | - audio="{{ b64Inputs[0] }}" |
32 | | - class="hydrated" |
33 | | - > |
34 | | - <input |
35 | | - #title |
36 | | - [(ngModel)]="studioService.slots.title" |
37 | | - [ngStyle]="{ |
38 | | - 'width.ch': studioService.slots.title.length, |
39 | | - 'min-width.ch': 20, |
40 | | - }" |
41 | | - style="border: none" |
42 | | - placeholder="Enter your title here" |
43 | | - slot="read-along-header" |
44 | | - data-test-id="ra-header" |
45 | | - /> |
46 | | - <input |
47 | | - #subtitle |
48 | | - [(ngModel)]="studioService.slots.subtitle" |
49 | | - [ngStyle]="{ |
50 | | - 'width.ch': studioService.slots.subtitle.length, |
51 | | - 'min-width.ch': 20, |
52 | | - }" |
53 | | - style="border: none" |
54 | | - placeholder="Enter your subtitle here" |
55 | | - slot="read-along-subheader" |
56 | | - data-test-id="ra-subheader" |
57 | | - /> |
58 | | - </read-along> |
59 | | - </div> |
| 23 | + @if (studioService.b64Inputs$ | async; as b64Inputs) { |
| 24 | + <div class="row"> |
| 25 | + @if (b64Inputs[0] && b64Inputs[1] && rasAsDataURL()) { |
| 26 | + <div> |
| 27 | + @if (studioService.render$ | async) { |
| 28 | + <read-along |
| 29 | + id="readalong" |
| 30 | + [language]="language" |
| 31 | + #readalong |
| 32 | + mode="EDIT" |
| 33 | + href="{{ rasAsDataURL() }}" |
| 34 | + audio="{{ b64Inputs[0] }}" |
| 35 | + class="hydrated" |
| 36 | + > |
| 37 | + <input |
| 38 | + #title |
| 39 | + [(ngModel)]="studioService.slots.title" |
| 40 | + [ngStyle]="{ |
| 41 | + 'width.ch': studioService.slots.title.length, |
| 42 | + 'min-width.ch': 20, |
| 43 | + }" |
| 44 | + style="border: none" |
| 45 | + placeholder="Enter your title here" |
| 46 | + slot="read-along-header" |
| 47 | + data-test-id="ra-header" |
| 48 | + /> |
| 49 | + <input |
| 50 | + #subtitle |
| 51 | + [(ngModel)]="studioService.slots.subtitle" |
| 52 | + [ngStyle]="{ |
| 53 | + 'width.ch': studioService.slots.subtitle.length, |
| 54 | + 'min-width.ch': 20, |
| 55 | + }" |
| 56 | + style="border: none" |
| 57 | + placeholder="Enter your subtitle here" |
| 58 | + slot="read-along-subheader" |
| 59 | + data-test-id="ra-subheader" |
| 60 | + /> |
| 61 | + </read-along> |
| 62 | + } |
| 63 | + </div> |
| 64 | + } |
| 65 | + </div> |
| 66 | + } |
60 | 67 | </div> |
61 | | - </div> |
| 68 | + } |
62 | 69 | </section> |
0 commit comments