MOBILE-4638 chore: Adapt icons to match LMS on MDL-82497
parent
a1c547badd
commit
361fa4ee98
|
@ -96,7 +96,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
|
||||||
groupMessagingEnabled: boolean;
|
groupMessagingEnabled: boolean;
|
||||||
isGroup = false;
|
isGroup = false;
|
||||||
members: {[id: number]: AddonMessagesConversationMember} = {}; // Members that wrote a message, indexed by ID.
|
members: {[id: number]: AddonMessagesConversationMember} = {}; // Members that wrote a message, indexed by ID.
|
||||||
favouriteIcon = 'fa-star';
|
favouriteIcon = 'fas-star';
|
||||||
deleteIcon = 'fas-trash';
|
deleteIcon = 'fas-trash';
|
||||||
blockIcon = 'fas-user-lock';
|
blockIcon = 'fas-user-lock';
|
||||||
addRemoveIcon = 'fas-user-plus';
|
addRemoveIcon = 'fas-user-plus';
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<ion-icon *ngIf="question.input.correctIcon" class="core-correct-icon ion-align-self-center" slot="end"
|
<ion-icon *ngIf="question.input.correctIcon" class="core-correct-icon ion-align-self-center" slot="end"
|
||||||
[name]="question.input.correctIcon" [color]="[question.input.correctIconColor]" />
|
[name]="question.input.correctIcon" [color]="[question.input.correctIconColor]" [ariaLabel]="question.input.correctIconLabel" />
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<!-- Display unit options after the answer input. -->
|
<!-- Display unit options after the answer input. -->
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
|
|
||||||
@if (dragDisabled) {
|
@if (dragDisabled) {
|
||||||
@if (item.correctClass === 'correct') {
|
@if (item.correctClass === 'correct') {
|
||||||
<ion-icon name="fas-check" slot="start" />
|
<ion-icon name="fas-check-double" slot="start" [ariaLabel]="'core.question.correct' | translate" color="success" />
|
||||||
} @else if (item.correctClass === 'incorrect') {
|
} @else if (item.correctClass === 'incorrect') {
|
||||||
<ion-icon name="fas-xmark" slot="start" />
|
<ion-icon name="fas-xmark" slot="start" [ariaLabel]="'core.question.incorrect' | translate" color="danger" />
|
||||||
} @else if (item.correctClass.startsWith('partial')) {
|
} @else if (item.correctClass.startsWith('partial')) {
|
||||||
<ion-icon name="far-square-check" slot="start" />
|
<ion-icon name="fas-check" slot="start" [ariaLabel]="'core.question.partiallycorrect' | translate" color="warning" />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,9 @@ export class AddonQtypeOrderingComponent extends CoreQuestionBaseComponent<Addon
|
||||||
this.question.items = itemsElements.map(element => {
|
this.question.items = itemsElements.map(element => {
|
||||||
// Remove correctness icons from the content.
|
// Remove correctness icons from the content.
|
||||||
const itemContentEl = element.querySelector<HTMLElement>('[data-itemcontent]');
|
const itemContentEl = element.querySelector<HTMLElement>('[data-itemcontent]');
|
||||||
itemContentEl?.querySelector('.icon.fa-check, .icon.fa-remove, .icon.fa-check-square')?.remove();
|
itemContentEl?.querySelector(
|
||||||
|
'.icon.fa-check, .icon.fa-remove, .icon.fa-check-square, .icon.fa-check-double, .icon.fa-xmark',
|
||||||
|
)?.remove();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: element.id,
|
id: element.id,
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
[attr.name]="question.input.name" [value]="question.input.value" autocorrect="off" [disabled]="question.input.readOnly"
|
[attr.name]="question.input.name" [value]="question.input.value" autocorrect="off" [disabled]="question.input.readOnly"
|
||||||
[label]="'addon.mod_quiz.answercolon' | translate" />
|
[label]="'addon.mod_quiz.answercolon' | translate" />
|
||||||
<ion-icon *ngIf="question.input.correctIcon" class="core-correct-icon" slot="end" [name]="question.input.correctIcon"
|
<ion-icon *ngIf="question.input.correctIcon" class="core-correct-icon" slot="end" [name]="question.input.correctIcon"
|
||||||
[color]="[question.input.correctIconColor]" />
|
[color]="[question.input.correctIconColor]" [ariaLabel]="question.input.correctIconLabel" />
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<div class="core-audio-recorder--control">
|
<div class="core-audio-recorder--control">
|
||||||
<ion-button shape="round" fill="clear" [ariaLabel]="'core.fileuploader.stoprecording' | translate"
|
<ion-button shape="round" fill="clear" [ariaLabel]="'core.fileuploader.stoprecording' | translate"
|
||||||
(click)="stopRecording()">
|
(click)="stopRecording()">
|
||||||
<ion-icon slot="icon-only" name="fa-check" />
|
<ion-icon slot="icon-only" name="fas-check" aria-hidden="true" />
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -553,7 +553,11 @@ export class CoreGradesHelperProvider {
|
||||||
row.itemtype = 'agg_sum';
|
row.itemtype = 'agg_sum';
|
||||||
row.icon = 'moodle-agg-sum';
|
row.icon = 'moodle-agg-sum';
|
||||||
row.iconAlt = Translate.instant('core.grades.aggregatesum');
|
row.iconAlt = Translate.instant('core.grades.aggregatesum');
|
||||||
} else if (text.indexOf('/outcomes') > -1 || text.indexOf('fa-tasks') > -1 || text.indexOf('fa-list-check') > -1) {
|
} else if (
|
||||||
|
text.indexOf('/outcomes') > -1 ||
|
||||||
|
text.indexOf('fa-tasks') > -1 ||
|
||||||
|
text.indexOf('fa-list-check') > -1
|
||||||
|
) {
|
||||||
row.itemtype = 'outcome';
|
row.itemtype = 'outcome';
|
||||||
row.icon = 'fas-list-check';
|
row.icon = 'fas-list-check';
|
||||||
row.iconAlt = Translate.instant('core.grades.outcome');
|
row.iconAlt = Translate.instant('core.grades.outcome');
|
||||||
|
@ -561,9 +565,14 @@ export class CoreGradesHelperProvider {
|
||||||
row.itemtype = 'category';
|
row.itemtype = 'category';
|
||||||
row.icon = 'fas-folder';
|
row.icon = 'fas-folder';
|
||||||
row.iconAlt = Translate.instant('core.grades.category');
|
row.iconAlt = Translate.instant('core.grades.category');
|
||||||
} else if (text.indexOf('/manual_item') > -1 || text.indexOf('fa-square-o') > -1) {
|
} else if (
|
||||||
|
text.indexOf('/manual_item') > -1 ||
|
||||||
|
text.indexOf('fa-square-o') > -1 ||
|
||||||
|
text.indexOf('fa-pencil-square-o') > -1 ||
|
||||||
|
text.indexOf('fa-pen-to-square') > -1
|
||||||
|
) {
|
||||||
row.itemtype = 'manual';
|
row.itemtype = 'manual';
|
||||||
row.icon = 'far-square';
|
row.icon = 'fas-pen-to-square';
|
||||||
row.iconAlt = Translate.instant('core.grades.manualitem');
|
row.iconAlt = Translate.instant('core.grades.manualitem');
|
||||||
} else if (text.indexOf('/calc') > -1 || text.indexOf('fa-calculator') > -1) {
|
} else if (text.indexOf('/calc') > -1 || text.indexOf('fa-calculator') > -1) {
|
||||||
row.itemtype = 'calc';
|
row.itemtype = 'calc';
|
||||||
|
|
|
@ -113,7 +113,7 @@ export class CoreMainMenuProvider {
|
||||||
const id = url + '#' + type;
|
const id = url + '#' + type;
|
||||||
if (!icon) {
|
if (!icon) {
|
||||||
// Icon not defined, use default one.
|
// Icon not defined, use default one.
|
||||||
icon = type == 'embedded' ? 'fa-expand' : 'fa-link'; // @todo Find a better icon for embedded.
|
icon = type == 'embedded' ? 'fas-expand' : 'fas-link'; // @todo Find a better icon for embedded.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!map[id]) {
|
if (!map[id]) {
|
||||||
|
|
|
@ -494,18 +494,22 @@ export class CoreQuestionBaseComponent<T extends AddonModQuizQuestion = AddonMod
|
||||||
question.input.correctClass = 'core-question-incorrect';
|
question.input.correctClass = 'core-question-incorrect';
|
||||||
question.input.correctIcon = 'fas-xmark';
|
question.input.correctIcon = 'fas-xmark';
|
||||||
question.input.correctIconColor = CoreIonicColorNames.DANGER;
|
question.input.correctIconColor = CoreIonicColorNames.DANGER;
|
||||||
|
question.input.correctIconLabel = 'core.question.incorrect';
|
||||||
} else if (input.classList.contains('correct')) {
|
} else if (input.classList.contains('correct')) {
|
||||||
question.input.correctClass = 'core-question-correct';
|
question.input.correctClass = 'core-question-correct';
|
||||||
question.input.correctIcon = 'fas-check';
|
question.input.correctIcon = 'fas-check-double';
|
||||||
question.input.correctIconColor = CoreIonicColorNames.SUCCESS;
|
question.input.correctIconColor = CoreIonicColorNames.SUCCESS;
|
||||||
|
question.input.correctIconLabel = 'core.question.correct';
|
||||||
} else if (input.classList.contains('partiallycorrect')) {
|
} else if (input.classList.contains('partiallycorrect')) {
|
||||||
question.input.correctClass = 'core-question-partiallycorrect';
|
question.input.correctClass = 'core-question-partiallycorrect';
|
||||||
question.input.correctIcon = 'fas-square-check';
|
question.input.correctIcon = 'fas-check';
|
||||||
question.input.correctIconColor = CoreIonicColorNames.WARNING;
|
question.input.correctIconColor = CoreIonicColorNames.WARNING;
|
||||||
|
question.input.correctIconLabel = 'core.question.partiallycorrect';
|
||||||
} else {
|
} else {
|
||||||
question.input.correctClass = '';
|
question.input.correctClass = '';
|
||||||
question.input.correctIcon = '';
|
question.input.correctIcon = '';
|
||||||
question.input.correctIconColor = '';
|
question.input.correctIconColor = '';
|
||||||
|
question.input.correctIconLabel = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (question.input.isInline) {
|
if (question.input.isInline) {
|
||||||
|
@ -829,6 +833,7 @@ export type AddonModQuizQuestionTextInput = {
|
||||||
correctClass?: string;
|
correctClass?: string;
|
||||||
correctIcon?: string;
|
correctIcon?: string;
|
||||||
correctIconColor?: string;
|
correctIconColor?: string;
|
||||||
|
correctIconLabel?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -61,7 +61,7 @@ export class CoreSearchGlobalSearchResultComponent implements OnChanges {
|
||||||
*/
|
*/
|
||||||
private computeRenderedIcon(): string | null {
|
private computeRenderedIcon(): string | null {
|
||||||
return this.result.module?.name === 'forum' && this.result.module.area === 'post'
|
return this.result.module?.name === 'forum' && this.result.module.area === 'post'
|
||||||
? 'fa-message'
|
? 'fas-message'
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue