diff --git a/src/components/empty-box/empty-box.scss b/src/components/empty-box/empty-box.scss
index 2dbb4f072..14b4e1b93 100644
--- a/src/components/empty-box/empty-box.scss
+++ b/src/components/empty-box/empty-box.scss
@@ -33,6 +33,7 @@ ion-app.app-root core-empty-box {
img {
height: 125px;
width: 145px;
+ margin: 0 auto;
}
p {
font-size: 120%;
diff --git a/src/components/empty-box/empty-box.ts b/src/components/empty-box/empty-box.ts
index a1b95fcc5..0d9fdd7ec 100644
--- a/src/components/empty-box/empty-box.ts
+++ b/src/components/empty-box/empty-box.ts
@@ -28,6 +28,8 @@ export class CoreEmptyBoxComponent {
@Input() message: string; // Message to display.
@Input() icon?: string; // Name of the icon to use.
@Input() image?: string; // Image source. If an icon is provided, image won't be used.
+ @Input() inline?: boolean; // If this has to be shown inline instead of occupying whole page.
+ // If image or icon is not supplied, it's true by default.
constructor() {
// Nothing to do.
diff --git a/src/core/courses/components/course-progress/course-progress.scss b/src/core/courses/components/course-progress/course-progress.scss
index 3546320be..241553bd5 100644
--- a/src/core/courses/components/course-progress/course-progress.scss
+++ b/src/core/courses/components/course-progress/course-progress.scss
@@ -48,6 +48,15 @@ ion-app.app-root core-courses-course-progress {
.label {
@include margin(0, 0, 0, null);
}
+ ion-item-divider .label-md {
+ @extend .label-md;
+ }
+ ion-item-divider .label-wp {
+ @extend .label-wp;
+ }
+ ion-item-divider .label-ios {
+ @extend .label-ios;
+ }
}
button {
diff --git a/src/lang/en.json b/src/lang/en.json
index 4e165a8b6..0217f3484 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -1,6 +1,7 @@
{
"accounts": "Accounts",
"add": "Add",
+ "all": "All",
"agelocationverification": "Age and location verification",
"allparticipants": "All participants",
"android": "Android",
diff --git a/src/providers/utils/time.ts b/src/providers/utils/time.ts
index 8ab41f1f9..e1fb8aca1 100644
--- a/src/providers/utils/time.ts
+++ b/src/providers/utils/time.ts
@@ -163,4 +163,21 @@ export class CoreTimeUtilsProvider {
getLocalizedDateFormat(localizedFormat: any): string {
return moment.localeData().longDateFormat(localizedFormat);
}
+
+ /**
+ * For a given timestamp get the midnight value in the user's timezone.
+ *
+ * The calculation is performed relative to the user's midnight timestamp
+ * for today to ensure that timezones are preserved.
+ *
+ * @param {number} [timestamp] The timestamp to calculate from. If not defined, return today's midnight.
+ * @return {number} The midnight value of the user's timestamp.
+ */
+ getMidnightForTimestamp(timestamp?: number): number {
+ if (timestamp) {
+ return moment(timestamp * 1000).startOf('day').unix();
+ } else {
+ return moment().startOf('day').unix();
+ }
+ }
}