diff --git a/src/app/components/loading/core-loading.html b/src/app/components/loading/core-loading.html index da4887db0..986f383f9 100644 --- a/src/app/components/loading/core-loading.html +++ b/src/app/components/loading/core-loading.html @@ -1,10 +1,10 @@
- +

{{message}}

-
\ No newline at end of file + diff --git a/src/app/components/loading/loading.scss b/src/app/components/loading/loading.scss index afe335a58..b8289607b 100644 --- a/src/app/components/loading/loading.scss +++ b/src/app/components/loading/loading.scss @@ -1,67 +1,43 @@ -ion-app.app-root { - core-loading { - // @todo @include core-transition(height, 200ms); +:host { + position: static; + -webkit-transition: height 200ms ease-in-out; + transition: height 200ms ease-in-out; - .core-loading-container { - width: 100%; + > .core-loading-container { + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + display: table; + height: 100%; + width: 100%; + text-align: center; + clear: both; + z-index: 3; + margin: 0; + padding: 10px 0 0 0; + background-color: rgba(255, 255, 255, 0.26); + -webkit-transition: all 200ms ease-in-out; + transition: all 200ms ease-in-out; + + .core-loading-spinner { + display: table-cell; text-align: center; - padding-top: 10px; - clear: both; - /* @todo @include darkmode() { - color: $core-dark-text-color; - } */ - } - - .core-loading-content { - display: inline; - padding-bottom: 1px; /* This makes height be real */ - } - - &.core-loading-noheight .core-loading-content { - height: auto; - } - - &.safe-area-page { - padding-left: 0 !important; - padding-right: 0 !important; - - > .core-loading-content > *:not[padding], - > .core-loading-content-loading > *:not[padding] { - // @todo @include safe-area-padding-horizontal(0px, 0px); - } + vertical-align: middle; } } - .scroll-content > core-loading, - ion-content > .scroll-content > core-loading, - core-tab core-loading, - .core-loading-center { - position: static !important; + .core-loading-content { + display: inline; + padding-bottom: 1px; /* This makes height be real */ } - .scroll-content > core-loading, - ion-content > .scroll-content > core-loading, - core-tab core-loading, - .core-loading-center, - core-loading.core-loading-loaded { + &.core-loading-noheight .core-loading-content { + height: auto; + } + + &.core-loading-loaded { position: relative; - - > .core-loading-container { - position: absolute; - // @todo @include position(0, 0, 0, 0); - display: table; - height: 100%; - width: 100%; - z-index: 1; - margin: 0; - padding: 0; - clear: both; - - .core-loading-spinner { - display: table-cell; - text-align: center; - vertical-align: middle; - } - } } } diff --git a/src/app/components/show-password/core-show-password.html b/src/app/components/show-password/core-show-password.html index d90db3f49..ef0ac0ce1 100644 --- a/src/app/components/show-password/core-show-password.html +++ b/src/app/components/show-password/core-show-password.html @@ -1,4 +1,4 @@ - - - + + + diff --git a/src/app/components/show-password/show-password.scss b/src/app/components/show-password/show-password.scss index 26188a26b..1f98c810c 100644 --- a/src/app/components/show-password/show-password.scss +++ b/src/app/components/show-password/show-password.scss @@ -1,38 +1,35 @@ -ion-app.app-root core-show-password { - padding: 0px; - width: 100%; - position: relative; +:host { + display: contents; - ion-input input.text-input { - // @todo @include padding(null, 47px, null, null); - } - - .button[icon-only] { + ion-button { background: transparent; - // @todo padding: 0 ($content-padding / 2); + padding: 0 calc(var(--padding-start) / 2); position: absolute; - // @todo @include position(null, 0, $content-padding / 2, null); + right: 0; + bottom: calc(var(--padding-bottom) / 2); margin-top: 0; margin-bottom: 0; - } - - .core-ioninput-password { - padding-top: 0; - padding-bottom: 0; + z-index: 3; } } -ion-app.app-root.md { - .item-label-stacked core-show-password .button[icon-only] { - bottom: 0; - } +::slotted(ion-input) { + --padding-end: 47px !important; } -ion-app.app-root.ios { - .item-label-stacked core-show-password .button[icon-only] { - bottom: -5px; - } - core-show-password .button[icon-only] { - bottom: 0; - } +:host-context([dir="rtl"]) ion-button { + left: 0; + right: unset; +} + +:host-context(.md.item-label.stacked) ion-button { + bottom: 0; +} + +:host-context(.iositem-label.stacked) ion-button { + bottom: -5px; +} + +:host-context(.ios) ion-button { + bottom: 0; } diff --git a/src/app/components/show-password/show-password.ts b/src/app/components/show-password/show-password.ts index 6cec76522..d90cf3615 100644 --- a/src/app/components/show-password/show-password.ts +++ b/src/app/components/show-password/show-password.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { Component, OnInit, AfterViewInit, Input, ElementRef, ContentChild } from '@angular/core'; +import { Component, OnInit, AfterViewInit, Input, ElementRef, ContentChild, ViewEncapsulation } from '@angular/core'; import { IonInput } from '@ionic/angular'; import { CoreApp } from '@services/app'; @@ -29,7 +29,7 @@ import { CoreUtils } from '@services/utils/utils'; * * Example: * - * + * * * */ @@ -37,6 +37,7 @@ import { CoreUtils } from '@services/utils/utils'; selector: 'core-show-password', templateUrl: 'core-show-password.html', styleUrls: ['show-password.scss'], + encapsulation: ViewEncapsulation.ShadowDom, }) export class CoreShowPasswordComponent implements OnInit, AfterViewInit { diff --git a/src/app/lang/en.json b/src/app/lang/en.json index 00ce91b93..c02aec243 100644 --- a/src/app/lang/en.json +++ b/src/app/lang/en.json @@ -2,6 +2,7 @@ "back": "Back", "browser": "Browser", "copiedtoclipboard": "Text copied to clipboard", + "loading": "Loading", "no": "No", "offline": "Offline", "ok": "OK", diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index 7eeea14b8..2ccd08508 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -340,6 +340,7 @@ "core.courses.sendpaymentbutton": "Send payment via PayPal", "core.courses.show": "Restore to view", "core.courses.totalcoursesearchresults": "Total courses: {{$a}}", + "core.loading": "Loading", "core.login.auth_email": "Email-based self-registration", "core.login.authenticating": "Authenticating", "core.login.cancel": "Cancel",