Merge pull request #2575 from crazyserver/MOBILE-3523

Mobile 3523
main
Dani Palou 2020-10-26 10:09:13 +01:00 committed by GitHub
commit afa92f4d71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 61 additions and 27 deletions

View File

@ -208,7 +208,7 @@ export class AddonModDataSyncProvider extends CoreSyncBaseProvider {
}).then(() => { }).then(() => {
if (result.updated) { if (result.updated) {
// Data has been sent to server. Now invalidate the WS calls. // Data has been sent to server. Now invalidate the WS calls.
return this.dataProvider.invalidateContent(data.cmid, courseId, siteId).catch(() => { return this.dataProvider.invalidateContent(data.coursemodule, courseId, siteId).catch(() => {
// Ignore errors. // Ignore errors.
}); });
} }

View File

@ -2,16 +2,16 @@ $core-login-page-background-color: $white !default;
$core-login-page-text-color: $text-color !default; $core-login-page-text-color: $text-color !default;
$core-login-button-outline: false !default; $core-login-button-outline: false !default;
$core-login-loading-color: false !default; $core-login-loading-color: false !default;
$core-login-item-inner-background-color: $white !default; $core-login-input-item-background-color: $core-login-page-background-color !default;
$core-login-item-background-color: $white !default; $core-login-input-item-text-color: $core-login-page-text-color !default;
// Dark. // Dark.
$core-dark-login-page-background-color: $black !default; $core-dark-login-page-background-color: $black !default;
$core-dark-login-page-text-color: $core-dark-text-color !default; $core-dark-login-page-text-color: $core-dark-text-color !default;
$core-dark-login-item-inner-background-color: $core-dark-login-page-background-color !default;
$core-dark-login-item-background-color: $core-dark-login-page-background-color !default;
$core-dark-login-button-outline: $core-login-button-outline !default; $core-dark-login-button-outline: $core-login-button-outline !default;
$core-dark-login-loading-color: $core-dark-text-color !default; $core-dark-login-loading-color: $core-dark-text-color !default;
$core-dark-input-login-item-background-color: $core-dark-login-page-background-color !default;
$core-dark-input-login-item-text-color: $core-dark-login-page-text-color !default;
ion-app.app-root page-core-login-credentials, ion-app.app-root page-core-login-credentials,
ion-app.app-root page-core-login-reconnect, ion-app.app-root page-core-login-reconnect,
@ -26,6 +26,13 @@ ion-app.app-root page-core-login-site {
} }
} }
.item p, .item h2, .item h3, .list .item.core-oauth-icon .label, .text-input {
color: $core-login-page-text-color;
@include darkmode() {
color: $core-dark-login-page-text-color;
}
}
img { img {
max-width: 100%; max-width: 100%;
} }
@ -78,6 +85,22 @@ ion-app.app-root page-core-login-site {
margin-bottom: 20px; margin-bottom: 20px;
} }
.core-login-form .item,
.core-login-form .item-inner {
background-color: $core-login-input-item-background-color;
@include darkmode() {
background-color: $core-dark-input-login-item-background-color;
}
p, input {
color: $core-login-input-item-text-color;
@include darkmode() {
color: $core-dark-input-login-item-text-color;
}
}
}
ion-list.core-login-forgotten-password { ion-list.core-login-forgotten-password {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
@ -89,6 +112,8 @@ ion-app.app-root page-core-login-site {
@include darkmode() { @include darkmode() {
background: transparent; background: transparent;
} }
color: $core-login-page-text-color;
} }
} }

View File

@ -47,7 +47,7 @@
</form> </form>
<!-- Forgotten password button. --> <!-- Forgotten password button. -->
<ion-list no-lines *ngIf="showForgottenPassword" class="core-login-forgotten-password"> <ion-list no-lines *ngIf="showForgottenPassword" class="core-login-forgotten-password core-login-link">
<a ion-item text-center text-wrap (click)="forgottenPassword()" detail-none> <a ion-item text-center text-wrap (click)="forgottenPassword()" detail-none>
{{ 'core.login.forgotten' | translate }} {{ 'core.login.forgotten' | translate }}
</a> </a>

View File

@ -47,7 +47,7 @@
</form> </form>
<!-- Forgotten password button. --> <!-- Forgotten password button. -->
<ion-list no-lines *ngIf="showForgottenPassword && !isOAuth" class="core-login-forgotten-password"> <ion-list no-lines *ngIf="showForgottenPassword && !isOAuth" class="core-login-forgotten-password core-login-link">
<a ion-item text-center text-wrap (click)="forgottenPassword()" detail-none> <a ion-item text-center text-wrap (click)="forgottenPassword()" detail-none>
{{ 'core.login.forgotten' | translate }} {{ 'core.login.forgotten' | translate }}
</a> </a>

View File

@ -1,20 +1,7 @@
$core-login-reconnect-warning: $red !default;
$core-dark-login-reconnect-warning: mix($red, white, 20%) !default;
ion-app.app-root page-core-login-reconnect { ion-app.app-root page-core-login-reconnect {
.box {
.core-login-form .item {
background-color: $core-login-item-background-color;
@include darkmode() {
background-color: $core-dark-login-item-background-color;
}
}
.core-login-form .item-inner {
background-color: $core-login-item-inner-background-color;
@include darkmode() {
background-color: $core-dark-login-item-inner-background-color;
}
}
}
form .core-username.item p { form .core-username.item p {
@include padding-horizontal(8px); @include padding-horizontal(8px);
font-size: 16px; font-size: 16px;
@ -31,6 +18,10 @@ ion-app.app-root page-core-login-reconnect {
} }
.core-login-reconnect-warning { .core-login-reconnect-warning {
color: $red; color: $core-login-reconnect-warning;
@include darkmode() {
background-color: $core-dark-login-reconnect-warning;
}
} }
} }

View File

@ -94,8 +94,8 @@
</ng-container> </ng-container>
<!-- Help. --> <!-- Help. -->
<ion-list no-lines margin-top> <ion-list no-lines margin-top class="core-login-need-help core-login-link">
<a ion-item text-center text-wrap class="core-login-need-help" (click)="showHelp()" detail-none> <a ion-item text-center text-wrap (click)="showHelp()" detail-none>
{{ 'core.needhelp' | translate }} {{ 'core.needhelp' | translate }}
</a> </a>
</ion-list> </ion-list>

View File

@ -12,7 +12,8 @@ ion-app.app-root page-core-login-site {
} }
.item.item-block { .item.item-block {
&.core-login-need-help.item { &.core-login-need-help .item {
color: $core-login-page-text-color;
text-decoration: underline; text-decoration: underline;
} }
&.core-login-site-qrcode { &.core-login-site-qrcode {
@ -97,6 +98,19 @@ ion-app.app-root page-core-login-site {
text-align: center; text-align: center;
} }
.core-login-site-list-loading,
.core-login-site-nolist-loading {
.spinner circle, .spinner line {
stroke: $core-login-loading-color;
}
@include darkmode() {
.spinner circle, .spinner line {
stroke: $core-dark-login-loading-color;
}
}
}
.item.core-login-site-list-title { .item.core-login-site-list-title {
ion-label, ion-label h2.item-heading { ion-label, ion-label h2.item-heading {
margin-top: 0; margin-top: 0;
@ -123,6 +137,10 @@ ion-app.app-root page-core-login-site {
ion-thumbnail { ion-thumbnail {
box-shadow: 0 0 4px #ddd; box-shadow: 0 0 4px #ddd;
} }
color: $core-login-page-text-color;
@include darkmode() {
color: $core-dark-login-page-text-color;
}
} }