MOBILE-4470 group: Improve Group selector look and feel

main
Pau Ferrer Ocaña 2024-05-08 12:42:21 +02:00
parent cacc36d336
commit f42ab61f59
3 changed files with 15 additions and 6 deletions

View File

@ -1,15 +1,19 @@
<ng-container *ngIf="groupInfo && groupInfo.groups.length > 0 && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-card class="core-info-card" *ngIf="multipleGroupsMessage && groupInfo.groups && groupInfo.groups.length > 1">
<ion-item>
<ion-item class="ion-text-wrap">
<ion-icon name="fas-circle-question" slot="start" aria-hidden="true" />
<ion-label>{{ multipleGroupsMessage }}</ion-label>
<ion-label>
<p class="item-label">{{ multipleGroupsMessage }}</p>
</ion-label>
</ion-item>
</ion-card>
<ion-item class="ion-text-wrap core-group-selector">
<ion-select [label]="(groupInfo.separateGroups ? 'core.groupsseparate': 'core.groupsvisible') | translate" [(ngModel)]=" selected"
(ionChange)="selectedChange.emit(selected)" interface="action-sheet" [cancelText]="'core.cancel' | translate"
[interfaceOptions]="{header: 'core.group' | translate}">
<ion-item class="ion-text-wrap core-group-selector" lines="full">
<ion-icon name="fas-user-group" slot="start" aria-hidden="true" />
<ion-select [(ngModel)]=" selected" (ionChange)="selectedChange.emit(selected)" interface="action-sheet"
[cancelText]="'core.cancel' | translate" [interfaceOptions]="{header: 'core.group' | translate}">
<p class="item-heading" slot="label">{{ (groupInfo.separateGroups ? 'core.groupsseparate': 'core.groupsvisible') | translate }}
</p>
<ion-select-option *ngFor="let group of groupInfo.groups" [value]=" group.id">
<core-format-text [text]="group.name" contextLevel="course" [contextInstanceId]="courseId" [wsNotFiltered]="true" />
</ion-select-option>

View File

@ -0,0 +1,4 @@
.core-group-selector ion-icon {
--webkit-margin-end: 16px;
margin-inline-end: 16px;
}

View File

@ -27,6 +27,7 @@ import { CoreGroupInfo } from '@services/groups';
@Component({
selector: 'core-group-selector',
templateUrl: 'group-selector.html',
styleUrl: 'group-selector.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CoreGroupSelectorComponent {