MOBILE-3624 core: Fix migration linting problems

main
Pau Ferrer Ocaña 2020-12-15 10:27:16 +01:00
parent 497c164626
commit 8e3da0a108
24 changed files with 117 additions and 90 deletions

View File

@ -41,5 +41,5 @@ gulp.task('push', (done) => {
gulp.task('default', gulp.parallel('lang')); gulp.task('default', gulp.parallel('lang'));
gulp.task('watch', () => { gulp.task('watch', () => {
gulp.watch(langsPaths, { interval: 500 }, gulp.parallel('lang')); gulp.watch(paths.lang, { interval: 500 }, gulp.parallel('lang'));
}); });

View File

@ -231,7 +231,7 @@ export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implem
protected async fetchContent(): Promise<void> { protected async fetchContent(): Promise<void> {
const config = this.block.configsRecord || {}; const config = this.block.configsRecord || {};
const showCategories = config && config.displaycategories && config.displaycategories.value == '1'; const showCategories = config?.displaycategories?.value == '1';
const courses = await CoreCoursesHelper.instance.getUserCoursesWithOptions(this.sort, undefined, undefined, showCategories); const courses = await CoreCoursesHelper.instance.getUserCoursesWithOptions(this.sort, undefined, undefined, showCategories);
@ -257,26 +257,26 @@ export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implem
this.showFilter = false; this.showFilter = false;
this.showFilters.all = this.getShowFilterValue( this.showFilters.all = this.getShowFilterValue(
!config || config.displaygroupingall.value == '1', !config || config.displaygroupingall?.value == '1',
this.courses.all.length === 0, this.courses.all.length === 0,
); );
// Do not show allincludinghiddenif config it's not present (before 3.8). // Do not show allincludinghiddenif config it's not present (before 3.8).
this.showFilters.allincludinghidden = this.showFilters.allincludinghidden =
this.getShowFilterValue( this.getShowFilterValue(
config.displaygroupingallincludinghidden.value == '1', config?.displaygroupingallincludinghidden?.value == '1',
this.courses.allincludinghidden.length === 0, this.courses.allincludinghidden.length === 0,
); );
this.showFilters.inprogress = this.getShowFilterValue( this.showFilters.inprogress = this.getShowFilterValue(
!config || config.displaygroupinginprogress.value == '1', !config || config.displaygroupinginprogress?.value == '1',
this.courses.inprogress.length === 0, this.courses.inprogress.length === 0,
); );
this.showFilters.past = this.getShowFilterValue( this.showFilters.past = this.getShowFilterValue(
!config || config.displaygroupingpast.value == '1', !config || config.displaygroupingpast?.value == '1',
this.courses.past.length === 0, this.courses.past.length === 0,
); );
this.showFilters.future = this.getShowFilterValue( this.showFilters.future = this.getShowFilterValue(
!config || config.displaygroupingfuture.value == '1', !config || config.displaygroupingfuture?.value == '1',
this.courses.future.length === 0, this.courses.future.length === 0,
); );
@ -285,24 +285,22 @@ export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implem
this.showFilters.hidden = this.getShowFilterValue( this.showFilters.hidden = this.getShowFilterValue(
this.showSelectorFilter && typeof courses[0].hidden != 'undefined' && this.showSelectorFilter && typeof courses[0].hidden != 'undefined' &&
(!config || config.displaygroupinghidden.value == '1'), (!config || config.displaygroupinghidden?.value == '1'),
this.courses.hidden.length === 0, this.courses.hidden.length === 0,
); );
this.showFilters.favourite = this.getShowFilterValue( this.showFilters.favourite = this.getShowFilterValue(
this.showSelectorFilter && typeof courses[0].isfavourite != 'undefined' && this.showSelectorFilter && typeof courses[0].isfavourite != 'undefined' &&
(!config || (config.displaygroupingstarred && config.displaygroupingstarred.value == '1') || (!config || config.displaygroupingstarred?.value == '1' || config.displaygroupingfavourites?.value == '1'),
(config.displaygroupingfavourites && config.displaygroupingfavourites.value == '1')),
this.courses.favourite.length === 0, this.courses.favourite.length === 0,
); );
this.showFilters.custom = this.getShowFilterValue( this.showFilters.custom = this.getShowFilterValue(
this.showSelectorFilter && config?.displaygroupingcustomfield.value == '1' && this.showSelectorFilter && config?.displaygroupingcustomfield?.value == '1' && !!config?.customfieldsexport?.value,
!!config?.customfieldsexport && !!config?.customfieldsexport.value,
false, false,
); );
if (this.showFilters.custom == 'show') { if (this.showFilters.custom == 'show') {
this.customFilter = CoreTextUtils.instance.parseJSON(config.customfieldsexport.value, []); this.customFilter = CoreTextUtils.instance.parseJSON(config?.customfieldsexport?.value, []);
} else { } else {
this.customFilter = []; this.customFilter = [];
} }

View File

@ -6,7 +6,10 @@
<core-loading [hideUntil]="loaded" class="core-loading-center"> <core-loading [hideUntil]="loaded" class="core-loading-center">
<ng-container *ngIf="mainMenuBlock"> <ng-container *ngIf="mainMenuBlock">
<ion-item class="ion-text-wrap" *ngIf="mainMenuBlock.summary"> <ion-item class="ion-text-wrap" *ngIf="mainMenuBlock.summary">
<core-format-text [text]="mainMenuBlock.summary" [component]="component" [componentId]="siteHomeId" contextLevel="course" [contextInstanceId]="siteHomeId"></core-format-text> <ion-label>
<core-format-text [text]="mainMenuBlock.summary" [component]="component" [componentId]="siteHomeId"
contextLevel="course" [contextInstanceId]="siteHomeId"></core-format-text>
</ion-label>
</ion-item> </ion-item>
<!--<core-course-module *ngFor="let module of mainMenuBlock.modules" [module]="module" [courseId]="siteHomeId" [downloadEnabled]="downloadEnabled" [section]="mainMenuBlock"></core-course-module>--> <!--<core-course-module *ngFor="let module of mainMenuBlock.modules" [module]="module" [courseId]="siteHomeId" [downloadEnabled]="downloadEnabled" [section]="mainMenuBlock"></core-course-module>-->

View File

@ -103,7 +103,7 @@ export class AddonCourseCompletionProvider {
userId = userId || site.getUserId(); userId = userId || site.getUserId();
this.logger.debug('Get completion for course ' + courseId + ' and user ' + userId); this.logger.debug('Get completion for course ' + courseId + ' and user ' + userId);
const data: CoreCompletionGetCourseCompletionStatusWSParams = { const data: AddonCourseCompletionGetCourseCompletionStatusWSParams = {
courseid: courseId, courseid: courseId,
userid: userId, userid: userId,
}; };
@ -112,7 +112,7 @@ export class AddonCourseCompletionProvider {
preSets.updateFrequency = preSets.updateFrequency || CoreSite.FREQUENCY_SOMETIMES; preSets.updateFrequency = preSets.updateFrequency || CoreSite.FREQUENCY_SOMETIMES;
preSets.cacheErrors = ['notenroled']; preSets.cacheErrors = ['notenroled'];
const result: CoreCompletionGetCourseCompletionStatusWSResponse = const result: AddonCourseCompletionGetCourseCompletionStatusWSResponse =
await site.read('core_completion_get_course_completion_status', data, preSets); await site.read('core_completion_get_course_completion_status', data, preSets);
if (result.completionstatus) { if (result.completionstatus) {
return result.completionstatus; return result.completionstatus;
@ -253,7 +253,7 @@ export class AddonCourseCompletionProvider {
async markCourseAsSelfCompleted(courseId: number, siteId?: string): Promise<void> { async markCourseAsSelfCompleted(courseId: number, siteId?: string): Promise<void> {
const site = await CoreSites.instance.getSite(siteId); const site = await CoreSites.instance.getSite(siteId);
const params: CoreCompletionMarkCourseSelfCompletedWSParams = { const params: AddonCourseCompletionMarkCourseSelfCompletedWSParams = {
courseid: courseId, courseid: courseId,
}; };
@ -292,7 +292,7 @@ export type AddonCourseCompletionCourseCompletionStatus = {
/** /**
* Params of core_completion_get_course_completion_status WS. * Params of core_completion_get_course_completion_status WS.
*/ */
export type CoreCompletionGetCourseCompletionStatusWSParams = { export type AddonCourseCompletionGetCourseCompletionStatusWSParams = {
courseid: number; // Course ID. courseid: number; // Course ID.
userid: number; // User ID. userid: number; // User ID.
}; };
@ -300,7 +300,7 @@ export type CoreCompletionGetCourseCompletionStatusWSParams = {
/** /**
* Data returned by core_completion_get_course_completion_status WS. * Data returned by core_completion_get_course_completion_status WS.
*/ */
export type CoreCompletionGetCourseCompletionStatusWSResponse = { export type AddonCourseCompletionGetCourseCompletionStatusWSResponse = {
completionstatus: AddonCourseCompletionCourseCompletionStatus; // Course status. completionstatus: AddonCourseCompletionCourseCompletionStatus; // Course status.
warnings?: CoreWSExternalWarning[]; warnings?: CoreWSExternalWarning[];
}; };
@ -308,6 +308,6 @@ export type CoreCompletionGetCourseCompletionStatusWSResponse = {
/** /**
* Params of core_completion_mark_course_self_completed WS. * Params of core_completion_mark_course_self_completed WS.
*/ */
export type CoreCompletionMarkCourseSelfCompletedWSParams = { export type AddonCourseCompletionMarkCourseSelfCompletedWSParams = {
courseid: number; // Course ID. courseid: number; // Course ID.
}; };

View File

@ -1,11 +1,13 @@
<ion-list [id]="uniqueId" role="menu"> <ion-list [id]="uniqueId" role="menu">
<ion-list-header *ngIf="title">{{title}}</ion-list-header> <ion-list-header *ngIf="title">
<ion-label>{{title}}</ion-label>
</ion-list-header>
<ion-item class="ion-text-wrap" *ngFor="let item of items" core-link [capture]="item.captureLink" [autoLogin]="item.autoLogin" <ion-item class="ion-text-wrap" *ngFor="let item of items" core-link [capture]="item.captureLink" [autoLogin]="item.autoLogin"
[href]="item.href" (click)="itemClicked($event, item)" [attr.aria-label]="item.ariaAction" [hidden]="item.hidden" [href]="item.href" (click)="itemClicked($event, item)" [attr.aria-label]="item.ariaAction" [hidden]="item.hidden"
[detail]="(item.href && !item.iconAction) || null" role="menuitem"> [detail]="(item.href && !item.iconAction) || null" role="menuitem">
<ion-icon *ngIf="item.iconDescription" [name]="item.iconDescription" [attr.aria-label]="item.ariaDescription" slot="start"> <ion-icon *ngIf="item.iconDescription" [name]="item.iconDescription" [attr.aria-label]="item.ariaDescription" slot="start">
</ion-icon> </ion-icon>
<core-format-text [clean]="true" [text]="item.content" [filter]="false"></core-format-text> <ion-label><core-format-text [clean]="true" [text]="item.content" [filter]="false"></core-format-text></ion-label>
<ion-icon *ngIf="(item.href || item.action) && item.iconAction && item.iconAction != 'spinner'" [name]="item.iconAction" <ion-icon *ngIf="(item.href || item.action) && item.iconAction && item.iconAction != 'spinner'" [name]="item.iconAction"
[class.icon-slash]="item.iconSlash" slot="end"> [class.icon-slash]="item.iconSlash" slot="end">
</ion-icon> </ion-icon>

View File

@ -6,7 +6,7 @@
padding: 0 calc(var(--padding-start) / 2); padding: 0 calc(var(--padding-start) / 2);
position: absolute; position: absolute;
right: 0; right: 0;
bottom: calc(var(--padding-bottom) / 2); bottom: 8px;
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
z-index: 3; z-index: 3;

View File

@ -10,8 +10,10 @@
<core-loading [hideUntil]="loaded"> <core-loading [hideUntil]="loaded">
<ion-list> <ion-list>
<ion-item class="ion-text-wrap"> <ion-item class="ion-text-wrap">
<p class="item-heading">{{ 'core.contentlinks.chooseaccounttoopenlink' | translate }}</p> <ion-label>
<p>{{ url }}</p> <p class="item-heading">{{ 'core.contentlinks.chooseaccounttoopenlink' | translate }}</p>
<p>{{ url }}</p>
</ion-label>
</ion-item> </ion-item>
<ion-item *ngFor="let site of sites" (click)="siteClicked(site.id)" detail="false"> <ion-item *ngFor="let site of sites" (click)="siteClicked(site.id)" detail="false">
<ion-avatar slot="start"> <ion-avatar slot="start">
@ -19,12 +21,16 @@
alt="{{ 'core.pictureof' | translate:{$a: site.fullName} }}" role="presentation" alt="{{ 'core.pictureof' | translate:{$a: site.fullName} }}" role="presentation"
onError="this.src='assets/img/user-avatar.png'"> onError="this.src='assets/img/user-avatar.png'">
</ion-avatar> </ion-avatar>
<h2>{{site.fullName}}</h2> <ion-label>
<p><core-format-text [text]="site.siteName" clean="true" [siteId]="site.id"></core-format-text></p> <h2>{{site.fullName}}</h2>
<p>{{site.siteUrl}}</p> <p><core-format-text [text]="site.siteName" clean="true" [siteId]="site.id"></core-format-text></p>
<p>{{site.siteUrl}}</p>
</ion-label>
</ion-item> </ion-item>
<ion-item> <ion-item>
<ion-button expand="block" (click)="cancel()">{{ 'core.login.cancel' | translate }}</ion-button> <ion-label>
<ion-button expand="block" (click)="cancel()">{{ 'core.login.cancel' | translate }}</ion-button>
</ion-label>
</ion-item> </ion-item>
</ion-list> </ion-list>
</core-loading> </core-loading>

View File

@ -213,7 +213,7 @@ export class CoreCoursesCourseProgressComponent implements OnInit, OnDestroy {
}, },
event: e, event: e,
}); });
popover.present(); await popover.present();
const action = await popover.onDidDismiss<string>(); const action = await popover.onDidDismiss<string>();

View File

@ -15,17 +15,19 @@
<ion-content class="ion-padding"> <ion-content class="ion-padding">
<form (ngSubmit)="submitPassword($event)" #enrolPasswordForm> <form (ngSubmit)="submitPassword($event)" #enrolPasswordForm>
<ion-item> <ion-item>
<core-show-password [name]="'password'"> <ion-label>
<ion-input <core-show-password [name]="'password'">
class="ion-text-wrap core-ioninput-password" <ion-input
name="password" class="ion-text-wrap core-ioninput-password"
type="password" name="password"
placeholder="{{ 'core.courses.password' | translate }}" type="password"
[(ngModel)]="password" placeholder="{{ 'core.courses.password' | translate }}"
[core-auto-focus] [(ngModel)]="password"
[clearOnEdit]="false"> [core-auto-focus]
</ion-input> [clearOnEdit]="false">
</core-show-password> </ion-input>
</core-show-password>
</ion-label>
</ion-item> </ion-item>
<div class="ion-padding"> <div class="ion-padding">
<ion-button expand="block" [disabled]="!password" type="submit">{{ 'core.courses.enrolme' | translate }}</ion-button> <ion-button expand="block" [disabled]="!password" type="submit">{{ 'core.courses.enrolme' | translate }}</ion-button>

View File

@ -52,7 +52,7 @@
<h2>{{contact.fullname}}</h2> <h2>{{contact.fullname}}</h2>
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item-divider></ion-item-divider> <ion-item-divider><ion-label></ion-label></ion-item-divider>
</ng-container> </ng-container>
<ion-item class="ion-text-wrap" *ngIf="course.customfields"> <ion-item class="ion-text-wrap" *ngIf="course.customfields">

View File

@ -107,7 +107,7 @@ export class CoreEmulatorCaptureHelperProvider {
componentProps: params, componentProps: params,
}); });
modal.present(); await modal.present();
const result = await modal.onDidDismiss(); const result = await modal.onDidDismiss();

View File

@ -420,7 +420,7 @@ export class CoreFileUploaderHelperProvider {
header: title ? title : Translate.instance.instant('core.fileuploader.' + (upload ? 'uploadafile' : 'selectafile')), header: title ? title : Translate.instance.instant('core.fileuploader.' + (upload ? 'uploadafile' : 'selectafile')),
buttons: buttons, buttons: buttons,
}); });
this.actionSheet.present(); await this.actionSheet.present();
// Call afterRender for each button. // Call afterRender for each button.
setTimeout(() => { setTimeout(() => {

View File

@ -130,7 +130,7 @@ export class CoreFileUploaderProvider {
backdropDismiss: false, backdropDismiss: false,
}); });
modal.present(); await modal.present();
const result = await modal.onWillDismiss(); const result = await modal.onWillDismiss();

View File

@ -31,17 +31,21 @@
<form ion-list [formGroup]="credForm" (ngSubmit)="login($event)" class="core-login-form" #credentialsForm> <form ion-list [formGroup]="credForm" (ngSubmit)="login($event)" class="core-login-form" #credentialsForm>
<ion-item *ngIf="siteChecked && !isBrowserSSO"> <ion-item *ngIf="siteChecked && !isBrowserSSO">
<ion-input type="text" name="username" placeholder="{{ 'core.login.username' | translate }}" <ion-label>
formControlName="username" autocapitalize="none" autocorrect="off" autocomplete="username" enterkeyhint="next" <ion-input type="text" name="username" placeholder="{{ 'core.login.username' | translate }}"
required="true"></ion-input> formControlName="username" autocapitalize="none" autocorrect="off" autocomplete="username" enterkeyhint="next"
required="true"></ion-input>
</ion-label>
</ion-item> </ion-item>
<ion-item *ngIf="siteChecked && !isBrowserSSO" class="ion-margin-bottom"> <ion-item *ngIf="siteChecked && !isBrowserSSO" class="ion-margin-bottom">
<core-show-password [name]="'password'"> <ion-label>
<ion-input name="password" type="password" placeholder="{{ 'core.login.password' | translate }}" <core-show-password [name]="'password'">
formControlName="password" [clearOnEdit]="false" autocomplete="current-password" enterkeyhint="go" <ion-input name="password" type="password" placeholder="{{ 'core.login.password' | translate }}"
required="true"> formControlName="password" [clearOnEdit]="false" autocomplete="current-password" enterkeyhint="go"
</ion-input> required="true">
</core-show-password> </ion-input>
</core-show-password>
</ion-label>
</ion-item> </ion-item>
<ion-button expand="block" type="submit" [disabled]="siteChecked && !isBrowserSSO && !credForm.valid" <ion-button expand="block" type="submit" [disabled]="siteChecked && !isBrowserSSO && !credForm.valid"
class="ion-margin core-login-login-button"> class="ion-margin core-login-login-button">

View File

@ -10,13 +10,13 @@
<ion-content> <ion-content>
<ion-list lines="none"> <ion-list lines="none">
<ion-item class="ion-text-wrap"> <ion-item class="ion-text-wrap">
{{ 'core.login.passwordforgotteninstructions2' | translate }} <ion-label>{{ 'core.login.passwordforgotteninstructions2' | translate }}</ion-label>
</ion-item> </ion-item>
</ion-list> </ion-list>
<ion-card> <ion-card>
<form ion-list [formGroup]="myForm" (ngSubmit)="resetPassword($event)" #resetPasswordForm> <form ion-list [formGroup]="myForm" (ngSubmit)="resetPassword($event)" #resetPasswordForm>
<ion-item-divider class="ion-text-wrap"> <ion-item-divider class="ion-text-wrap">
{{ 'core.login.searchby' | translate }} <ion-label>{{ 'core.login.searchby' | translate }}</ion-label>
</ion-item-divider> </ion-item-divider>
<ion-radio-group formControlName="field"> <ion-radio-group formControlName="field">
<ion-item> <ion-item>
@ -29,9 +29,11 @@
</ion-item> </ion-item>
</ion-radio-group> </ion-radio-group>
<ion-item> <ion-item>
<ion-input type="text" name="value" placeholder="{{ 'core.login.usernameoremail' | translate }}" <ion-label>
formControlName="value" autocapitalize="none" autocorrect="off" [core-auto-focus]="autoFocus"> <ion-input type="text" name="value" placeholder="{{ 'core.login.usernameoremail' | translate }}"
</ion-input> formControlName="value" autocapitalize="none" autocorrect="off" [core-auto-focus]="autoFocus">
</ion-input>
</ion-label>
</ion-item> </ion-item>
<ion-button type="submit" class="ion-margin" expand="block" [disabled]="!myForm.valid"> <ion-button type="submit" class="ion-margin" expand="block" [disabled]="!myForm.valid">
{{ 'core.courses.search' | translate }} {{ 'core.courses.search' | translate }}

View File

@ -39,12 +39,14 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item class="ion-margin-bottom"> <ion-item class="ion-margin-bottom">
<core-show-password [name]="'password'"> <ion-label>
<ion-input class="core-ioninput-password" name="password" type="password" <core-show-password [name]="'password'">
placeholder="{{ 'core.login.password' | translate }}" formControlName="password" [clearOnEdit]="false" <ion-input class="core-ioninput-password" name="password" type="password"
autocomplete="current-password" enterkeyhint="go" required="true"> placeholder="{{ 'core.login.password' | translate }}" formControlName="password" [clearOnEdit]="false"
</ion-input> autocomplete="current-password" enterkeyhint="go" required="true">
</core-show-password> </ion-input>
</core-show-password>
</ion-label>
</ion-item> </ion-item>
<ion-grid class="ion-padding"> <ion-grid class="ion-padding">
<ion-row> <ion-row>

View File

@ -74,7 +74,11 @@
</ng-container> </ng-container>
<ion-item *ngIf="siteSelector == 'url'" lines="none"> <ion-item *ngIf="siteSelector == 'url'" lines="none">
<ion-button expand="block" [disabled]="!siteForm.valid" text-wrap>{{ 'core.login.connect' | translate }}</ion-button> <ion-label>
<ion-button expand="block" [disabled]="!siteForm.valid" text-wrap>
{{ 'core.login.connect' | translate }}
</ion-button>
</ion-label>
</ion-item> </ion-item>
</form> </form>

View File

@ -20,9 +20,9 @@
<p>{{ siteUrl }}</p> <p>{{ siteUrl }}</p>
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item-divider></ion-item-divider> <ion-item-divider><ion-label></ion-label></ion-item-divider>
<ion-item class="ion-text-center" *ngIf="(!handlers || !handlers.length) && !handlersLoaded"> <ion-item class="ion-text-center" *ngIf="(!handlers || !handlers.length) && !handlersLoaded">
<ion-spinner></ion-spinner> <ion-label><ion-spinner></ion-spinner></ion-label>
</ion-item> </ion-item>
<ion-item button *ngFor="let handler of handlers" [ngClass]="['core-moremenu-handler', handler.class || '']" <ion-item button *ngFor="let handler of handlers" [ngClass]="['core-moremenu-handler', handler.class || '']"
(click)="openHandler(handler)" title="{{ handler.title | translate }}" detail="true" detail> (click)="openHandler(handler)" title="{{ handler.title | translate }}" detail="true" detail>
@ -83,7 +83,7 @@
<h2>{{ logoutLabel | translate }}</h2> <h2>{{ logoutLabel | translate }}</h2>
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item-divider></ion-item-divider> <ion-item-divider><ion-label></ion-label></ion-item-divider>
<ion-item button router-direction="forward" routerLink="settings" <ion-item button router-direction="forward" routerLink="settings"
title="{{ 'core.settings.appsettings' | translate }}" detail> title="{{ 'core.settings.appsettings' | translate }}" detail>
<ion-icon name="fas-cogs" slot="start"></ion-icon> <ion-icon name="fas-cogs" slot="start"></ion-icon>

View File

@ -21,7 +21,7 @@
(click)="historyClicked($event, item.searchedtext)" tabindex="1" detail> (click)="historyClicked($event, item.searchedtext)" tabindex="1" detail>
<ion-icon name="fas-history" slot="start"> <ion-icon name="fas-history" slot="start">
</ion-icon> </ion-icon>
{{item.searchedtext}} <ion-label>{{item.searchedtext}}</ion-label>
</ion-item> </ion-item>
</ion-list> </ion-list>
</form> </form>

View File

@ -24,9 +24,11 @@
<ion-segment [(ngModel)]="selectedFontSize" (ionChange)="fontSizeChanged()" color="primary" item-content> <ion-segment [(ngModel)]="selectedFontSize" (ionChange)="fontSizeChanged()" color="primary" item-content>
<ion-segment-button *ngFor="let fontSize of fontSizes" [value]="fontSize.size" <ion-segment-button *ngFor="let fontSize of fontSizes" [value]="fontSize.size"
[ngStyle]="{'font-size.px': fontSize.style}"> [ngStyle]="{'font-size.px': fontSize.style}">
{{ 'core.settings.fontsizecharacter' | translate }} <ion-label>
<!-- Empty element styled with the largest font size, so all buttons share a common baseline. --> {{ 'core.settings.fontsizecharacter' | translate }}
<span [ngStyle]="{'font-size.px': fontSizes[fontSizes.length - 1].style}"></span> <!-- Empty element styled with the largest font size, so all buttons share a common baseline. -->
<span [ngStyle]="{'font-size.px': fontSizes[fontSizes.length - 1].style}"></span>
</ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
</ion-item> </ion-item>

View File

@ -24,7 +24,7 @@
<p>{{ siteUrl }}</p> <p>{{ siteUrl }}</p>
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item-divider></ion-item-divider> <ion-item-divider><ion-label></ion-label></ion-item-divider>
<ion-item *ngIf="isIOS" <ion-item *ngIf="isIOS"
(click)="openHandler('CoreSharedFilesListPage', {manage: true, siteId: siteId, hideSitePicker: true})" (click)="openHandler('CoreSharedFilesListPage', {manage: true, siteId: siteId, hideSitePicker: true})"
[title]="'core.sharedfiles.sharedfiles' | translate" [title]="'core.sharedfiles.sharedfiles' | translate"

View File

@ -13,7 +13,7 @@
<core-loading [hideUntil]="userLoaded"> <core-loading [hideUntil]="userLoaded">
<ion-list *ngIf="user"> <ion-list *ngIf="user">
<ion-item-group *ngIf="hasContact"> <ion-item-group *ngIf="hasContact">
<ion-item-divider>{{ 'core.user.contact' | translate}}</ion-item-divider> <ion-item-divider><ion-label>{{ 'core.user.contact' | translate}}</ion-label></ion-item-divider>
<ion-item class="ion-text-wrap" *ngIf="user.email"> <ion-item class="ion-text-wrap" *ngIf="user.email">
<ion-label> <ion-label>
<h2>{{ 'core.user.email' | translate }}</h2> <h2>{{ 'core.user.email' | translate }}</h2>
@ -60,7 +60,7 @@
</ion-item> </ion-item>
</ion-item-group> </ion-item-group>
<ion-item-group *ngIf="hasDetails"> <ion-item-group *ngIf="hasDetails">
<ion-item-divider>{{ 'core.userdetails' | translate}}</ion-item-divider> <ion-item-divider><ion-label>{{ 'core.userdetails' | translate}}</ion-label></ion-item-divider>
<ion-item class="ion-text-wrap" *ngIf="user.url"> <ion-item class="ion-text-wrap" *ngIf="user.url">
<ion-label> <ion-label>
<h2>{{ 'core.user.webpage' | translate}}</h2> <h2>{{ 'core.user.webpage' | translate}}</h2>
@ -80,7 +80,7 @@
</core-user-profile-field> </core-user-profile-field>
</ion-item-group> </ion-item-group>
<ion-item-group *ngIf="user.description"> <ion-item-group *ngIf="user.description">
<ion-item-divider>{{ 'core.user.description' | translate}}</ion-item-divider> <ion-item-divider><ion-label>{{ 'core.user.description' | translate}}</ion-label></ion-item-divider>
<ion-item class="ion-text-wrap"> <ion-item class="ion-text-wrap">
<ion-label> <ion-label>
<p><core-format-text [text]="user.description" contextLevel="user" [contextInstanceId]="user.id"> <p><core-format-text [text]="user.description" contextLevel="user" [contextInstanceId]="user.id">

View File

@ -34,7 +34,7 @@
<ion-row class="ion-no-padding justify-content-between" <ion-row class="ion-no-padding justify-content-between"
*ngIf="communicationHandlers && communicationHandlers.length"> *ngIf="communicationHandlers && communicationHandlers.length">
<ion-col *ngFor="let handler of communicationHandlers" class="ion-align-self-center ion-text-center"> <ion-col *ngFor="let handler of communicationHandlers" class="ion-align-self-center ion-text-center">
<a (click)="handlerClicked($event, handler)" [ngClass]="['core-user-profile-handler', handler.class]" <a (click)="handlerClicked($event, handler)" [ngClass]="['core-user-profile-handler', handler.class || '']"
title="{{handler.title | translate}}"> title="{{handler.title | translate}}">
<ion-icon [name]="handler.icon" slot="start"></ion-icon> <ion-icon [name]="handler.icon" slot="start"></ion-icon>
<p>{{handler.title | translate}}</p> <p>{{handler.title | translate}}</p>
@ -56,11 +56,11 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item class="ion-text-center core-loading-handlers" *ngIf="isLoadingHandlers"> <ion-item class="ion-text-center core-loading-handlers" *ngIf="isLoadingHandlers">
<ion-spinner></ion-spinner> <ion-label><ion-spinner></ion-spinner></ion-label>
</ion-item> </ion-item>
<ion-item button *ngFor="let handler of newPageHandlers" class="ion-text-wrap" (click)="handlerClicked($event, handler)" <ion-item button *ngFor="let handler of newPageHandlers" class="ion-text-wrap" (click)="handlerClicked($event, handler)"
[ngClass]="['core-user-profile-handler', handler.class]" [hidden]="handler.hidden" [ngClass]="['core-user-profile-handler', handler.class || '']" [hidden]="handler.hidden"
title="{{ handler.title | translate }}" detail> title="{{ handler.title | translate }}" detail>
<ion-icon *ngIf="handler.icon" [name]="handler.icon" slot="start"></ion-icon> <ion-icon *ngIf="handler.icon" [name]="handler.icon" slot="start"></ion-icon>
<ion-label> <ion-label>
@ -69,15 +69,17 @@
</ion-item> </ion-item>
<ion-item *ngIf="actionHandlers && actionHandlers.length"> <ion-item *ngIf="actionHandlers && actionHandlers.length">
<ion-button *ngFor="let handler of actionHandlers" expand="block" fill="outline" <ion-label>
[ngClass]="['core-user-profile-handler', handler.class]" (click)="handlerClicked($event, handler)" <ion-button *ngFor="let handler of actionHandlers" expand="block" fill="outline"
[hidden]="handler.hidden" title="{{ handler.title | translate }}" [disabled]="handler.spinner"> [ngClass]="['core-user-profile-handler', handler.class || '']" (click)="handlerClicked($event, handler)"
<ion-icon *ngIf="handler.icon" [name]="handler.icon" slot="start"></ion-icon> [hidden]="handler.hidden" title="{{ handler.title | translate }}" [disabled]="handler.spinner">
<ion-label> <ion-icon *ngIf="handler.icon" [name]="handler.icon" slot="start"></ion-icon>
<span>{{ handler.title | translate }}</span> <ion-label>
</ion-label> <span>{{ handler.title | translate }}</span>
<ion-spinner *ngIf="handler.spinner"></ion-spinner> </ion-label>
</ion-button> <ion-spinner *ngIf="handler.spinner"></ion-spinner>
</ion-button>
</ion-label>
</ion-item> </ion-item>
</ion-list> </ion-list>

View File

@ -1574,7 +1574,7 @@ export class CoreDomUtilsProvider {
cssClass: cssClass, cssClass: cssClass,
}); });
loader.present(); await loader.present();
return loader; return loader;
} }