commit
f94719dac9
|
@ -179,10 +179,10 @@ export class CoreLoginHelperProvider {
|
||||||
} else {
|
} else {
|
||||||
this.goToSiteInitialPage();
|
this.goToSiteInitialPage();
|
||||||
}
|
}
|
||||||
}).catch((errorMessage) => {
|
}).catch((error) => {
|
||||||
if (errorMessage) {
|
if (error) {
|
||||||
// An error occurred, display the error and logout the user.
|
// An error occurred, display the error and logout the user.
|
||||||
this.domUtils.showErrorModal(errorMessage);
|
this.treatUserTokenError(siteData.siteUrl, error);
|
||||||
this.sitesProvider.logout();
|
this.sitesProvider.logout();
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
@ -647,8 +647,8 @@ export class CoreLoginHelperProvider {
|
||||||
|
|
||||||
loginUrl += '&oauthsso=' + params.id;
|
loginUrl += '&oauthsso=' + params.id;
|
||||||
|
|
||||||
if (this.appProvider.isLinux()) {
|
if (this.appProvider.isLinux() || this.appProvider.isMac()) {
|
||||||
// In Linux desktop apps, always use embedded browser.
|
// In Linux and Mac desktop apps, always use embedded browser.
|
||||||
this.utils.openInApp(loginUrl);
|
this.utils.openInApp(loginUrl);
|
||||||
} else {
|
} else {
|
||||||
// Always open it in browser because the user might have the session stored in there.
|
// Always open it in browser because the user might have the session stored in there.
|
||||||
|
|
|
@ -140,13 +140,12 @@ export class CoreDomUtilsProvider {
|
||||||
const readableSize = this.textUtils.bytesToSize(size.size, 2);
|
const readableSize = this.textUtils.bytesToSize(size.size, 2);
|
||||||
|
|
||||||
return this.showConfirm(this.translate.instant('core.course.confirmpartialdownloadsize', { size: readableSize }));
|
return this.showConfirm(this.translate.instant('core.course.confirmpartialdownloadsize', { size: readableSize }));
|
||||||
} else if (size.size >= wifiThreshold || (this.appProvider.isNetworkAccessLimited() && size.size >= limitedThreshold)) {
|
} else if (alwaysConfirm || size.size >= wifiThreshold ||
|
||||||
|
(this.appProvider.isNetworkAccessLimited() && size.size >= limitedThreshold)) {
|
||||||
message = message || 'core.course.confirmdownload';
|
message = message || 'core.course.confirmdownload';
|
||||||
const readableSize = this.textUtils.bytesToSize(size.size, 2);
|
const readableSize = this.textUtils.bytesToSize(size.size, 2);
|
||||||
|
|
||||||
return this.showConfirm(this.translate.instant(message, { size: readableSize }));
|
return this.showConfirm(this.translate.instant(message, { size: readableSize }));
|
||||||
} else if (alwaysConfirm) {
|
|
||||||
return this.showConfirm(this.translate.instant('core.areyousure'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
|
Loading…
Reference in New Issue