From 1d6fee8aa07b0cf5c7861b8988b42ded0a938562 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Fri, 15 Jul 2022 09:26:02 +0100 Subject: [PATCH] Fixed date zero-padding in table views - when you have a date column in a table, dates with 2 digits vs 1 digit cause the vertical alignment to be all over the place - this commit fixes the date formatting for those entries to be zero-padded --- ghost/admin/app/components/dashboard/charts/recents.hbs | 4 ++-- ghost/admin/app/components/gh-members-list-item-column.hbs | 6 +++--- ghost/admin/app/components/gh-members-list-item.hbs | 2 +- ghost/admin/app/components/members-activity/table-row.hbs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ghost/admin/app/components/dashboard/charts/recents.hbs b/ghost/admin/app/components/dashboard/charts/recents.hbs index d4f49a5357..4937739b7a 100644 --- a/ghost/admin/app/components/dashboard/charts/recents.hbs +++ b/ghost/admin/app/components/dashboard/charts/recents.hbs @@ -51,7 +51,7 @@ {{else}}
- {{moment-format (moment-site-tz post.publishedAtUTC) "D MMM YYYY HH:mm"}} + {{moment-format (moment-site-tz post.publishedAtUTC) "DD MMM YYYY HH:mm"}}
{{/if}} @@ -105,7 +105,7 @@
- {{moment-format parsedEvent.timestamp "D MMM YYYY HH:mm"}} + {{moment-format parsedEvent.timestamp "DD MMM YYYY HH:mm"}}
{{/let}} diff --git a/ghost/admin/app/components/gh-members-list-item-column.hbs b/ghost/admin/app/components/gh-members-list-item-column.hbs index e9e5565c12..8045c8d72d 100644 --- a/ghost/admin/app/components/gh-members-list-item-column.hbs +++ b/ghost/admin/app/components/gh-members-list-item-column.hbs @@ -20,7 +20,7 @@ {{else if (eq @filterColumn 'last_seen_at')}} {{#if (not (is-empty @member.lastSeenAtUTC))}} - {{moment-format (moment-site-tz @member.lastSeenAtUTC) "D MMM YYYY"}} + {{moment-format (moment-site-tz @member.lastSeenAtUTC) "DD MMM YYYY"}}
{{moment-from-now @member.lastSeenAtUTC}}
{{else}} - @@ -75,7 +75,7 @@ {{else if (eq @filterColumn 'subscriptions.start_date')}} {{#if (not (is-empty this.mostRecentSubscription.start_date))}} - {{moment-format (moment-site-tz this.mostRecentSubscription.start_date) "D MMM YYYY"}} + {{moment-format (moment-site-tz this.mostRecentSubscription.start_date) "DD MMM YYYY"}}
{{moment-from-now this.mostRecentSubscription.start_date}}
{{else}} - @@ -85,7 +85,7 @@ {{else if (eq @filterColumn 'subscriptions.current_period_end')}} {{#if (not (is-empty this.mostRecentSubscription.current_period_end))}} - {{moment-format (moment-site-tz this.mostRecentSubscription.current_period_end) "D MMM YYYY"}} + {{moment-format (moment-site-tz this.mostRecentSubscription.current_period_end) "DD MMM YYYY"}}
{{moment-from-now this.mostRecentSubscription.current_period_end}}
{{else}} - diff --git a/ghost/admin/app/components/gh-members-list-item.hbs b/ghost/admin/app/components/gh-members-list-item.hbs index 77039f9564..42cf9af6a2 100644 --- a/ghost/admin/app/components/gh-members-list-item.hbs +++ b/ghost/admin/app/components/gh-members-list-item.hbs @@ -70,7 +70,7 @@ {{#if @member.createdAtUTC}} -
{{moment-format (moment-site-tz @member.createdAtUTC) "D MMM YYYY"}}
+
{{moment-format (moment-site-tz @member.createdAtUTC) "DD MMM YYYY"}}
{{moment-from-now @member.createdAtUTC}}
{{/if}}
diff --git a/ghost/admin/app/components/members-activity/table-row.hbs b/ghost/admin/app/components/members-activity/table-row.hbs index 910a6b6917..89a3f0f806 100644 --- a/ghost/admin/app/components/members-activity/table-row.hbs +++ b/ghost/admin/app/components/members-activity/table-row.hbs @@ -30,6 +30,6 @@ -
{{moment-format event.timestamp "D MMM YYYY HH:mm"}}
+
{{moment-format event.timestamp "DD MMM YYYY HH:mm"}}
{{/let}}