|
14 | 14 | <mat-card>
|
15 | 15 | <div class="star-container" fxLayout="row wrap">
|
16 | 16 | <mat-button-toggle *ngFor="let difficulty of availableDifficulties" (change)="toggleDifficulty(difficulty)"
|
17 |
| - [checked]="displayedDifficulties.includes(difficulty)" [disabled]="!fullModeUnlocked && !allTutorialsCompleted"> |
| 17 | + [checked]="displayedDifficulties.includes(difficulty)" [disabled]="restrictToTutorialsFirst && !allTutorialsCompleted"> |
18 | 18 | <label>
|
19 | 19 | <span class="fa-4x fa-layers fa-fw" style="display: block; margin: 5px;">
|
20 | 20 | <svg [style.fill]="'url(#' + difficulty + ')'" class="svg-inline--fa fa-star fa-w-18 star-border" aria-hidden="true"
|
|
38 | 38 | </label>
|
39 | 39 | </mat-button-toggle>
|
40 | 40 |
|
41 |
| - <button id="btnToggleAllDifficulties" class="mat-button" (click)="toggleAllDifficulty()" [disabled]="!fullModeUnlocked && !allTutorialsCompleted">{{(this.toggledMajorityOfDifficulties ? "BTN_HIDE_ALL" : "BTN_SHOW_ALL") | translate}}</button> |
| 41 | + <button id="btnToggleAllDifficulties" class="mat-button" (click)="toggleAllDifficulty()" [disabled]="restrictToTutorialsFirst && !allTutorialsCompleted">{{(this.toggledMajorityOfDifficulties ? "BTN_HIDE_ALL" : "BTN_SHOW_ALL") | translate}}</button> |
42 | 42 |
|
43 |
| - <mat-button-toggle (change)="toggleShowSolvedChallenges()" [checked]="showSolvedChallenges" [disabled]="!fullModeUnlocked && !allTutorialsCompleted"> |
| 43 | + <mat-button-toggle (change)="toggleShowSolvedChallenges()" [checked]="showSolvedChallenges" [disabled]="restrictToTutorialsFirst && !allTutorialsCompleted"> |
44 | 44 | <i class="fa-2x fas fa-trophy" aria-hidden="true"></i> {{"BTN_SHOW_SOLVED" | translate}}
|
45 | 45 | </mat-button-toggle>
|
46 | 46 |
|
47 | 47 | <mat-button-toggle id="btnToggleShowOnlyTutorialChallenges" (change)="toggleShowOnlyTutorialChallenges()"
|
48 |
| - [checked]="showOnlyTutorialChallenges" [disabled]="!fullModeUnlocked && !allTutorialsCompleted" |
49 |
| - [matTooltip]="fullModeUnlocked || allTutorialsCompleted ? '' : ('INFO_FULL_CHALLENGE_MODE' | translate: {num: challenges.length})" matTooltipPosition="above"> |
| 48 | + [checked]="showOnlyTutorialChallenges" [disabled]="restrictToTutorialsFirst && !allTutorialsCompleted" |
| 49 | + [matTooltip]="restrictToTutorialsFirst && !allTutorialsCompleted ? ('INFO_FULL_CHALLENGE_MODE' | translate: {num: challenges.length}) : ''" matTooltipPosition="above"> |
50 | 50 | <mat-icon>
|
51 | 51 | school
|
52 | 52 | </mat-icon>
|
53 | 53 | {{"BTN_SHOW_ONLY_TUTORIALS" | translate}}
|
54 | 54 | </mat-button-toggle>
|
55 | 55 |
|
56 |
| - <mat-button-toggle *ngIf="numDisabledChallenges > 0" (change)="toggleShowDisabledChallenges()" [checked]="showDisabledChallenges" [disabled]="!fullModeUnlocked && !allTutorialsCompleted"> |
| 56 | + <mat-button-toggle *ngIf="numDisabledChallenges > 0" (change)="toggleShowDisabledChallenges()" [checked]="showDisabledChallenges" [disabled]="restrictToTutorialsFirst && !allTutorialsCompleted"> |
57 | 57 | <i class="fa-2x fas fa-exclamation-circle" aria-hidden="true"></i> {{"BTN_SHOW_UNAVAILABLE" | translate}}
|
58 | 58 | </mat-button-toggle>
|
59 | 59 |
|
|
64 | 64 | <div class="category-container" fxLayout="row wrap">
|
65 | 65 | <mat-button-toggle class="category-toggle" appearance="legacy" *ngFor="let category of availableChallengeCategories"
|
66 | 66 | (change)="toggleShowChallengeCategory(category)"
|
67 |
| - [checked]="displayedChallengeCategories.includes(category)" [disabled]="!fullModeUnlocked && !allTutorialsCompleted"> |
| 67 | + [checked]="displayedChallengeCategories.includes(category)" [disabled]="restrictToTutorialsFirst && !allTutorialsCompleted"> |
68 | 68 | {{category}}
|
69 | 69 | </mat-button-toggle>
|
70 | 70 |
|
71 |
| - <button class="mat-button" (click)="toggleAllChallengeCategory()" [disabled]="!fullModeUnlocked && !allTutorialsCompleted">{{(this.toggledMajorityOfCategories ? "BTN_HIDE_ALL" : "BTN_SHOW_ALL") | translate}}</button> |
| 71 | + <button class="mat-button" (click)="toggleAllChallengeCategory()" [disabled]="restrictToTutorialsFirst && !allTutorialsCompleted">{{(this.toggledMajorityOfCategories ? "BTN_HIDE_ALL" : "BTN_SHOW_ALL") | translate}}</button> |
72 | 72 | </div>
|
73 | 73 |
|
74 | 74 | </mat-card>
|
|
0 commit comments