mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 12:55:56 +01:00
Include time portion in formatted datetimes when provided
This commit is contained in:
parent
d29eddc401
commit
ee30f64764
4 changed files with 8 additions and 4 deletions
|
@ -119,7 +119,11 @@ function loaded() {
|
|||
formattedContent = dateFormat.format(datetime);
|
||||
}
|
||||
|
||||
content.title = formattedContent;
|
||||
const timeGiven = content.dateTime.includes('T');
|
||||
content.title = timeGiven
|
||||
? dateTimeFormat.format(datetime)
|
||||
: dateFormat.format(datetime);
|
||||
|
||||
content.textContent = formattedContent;
|
||||
});
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.report-notes__item__header
|
||||
%span.username
|
||||
= link_to report_note.account.username, admin_account_path(report_note.account_id)
|
||||
%time.relative-formatted{ datetime: report_note.created_at.iso8601 }
|
||||
%time.relative-formatted{ datetime: report_note.created_at.iso8601, title: report_note.created_at }
|
||||
= l report_note.created_at.to_date
|
||||
|
||||
.report-notes__item__content
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
= link_to report.account.username, admin_account_path(report.account_id)
|
||||
- else
|
||||
= link_to report.account.domain, admin_instance_path(report.account.domain)
|
||||
%time.relative-formatted{ datetime: report.created_at.iso8601 }
|
||||
%time.relative-formatted{ datetime: report.created_at.iso8601, title: report.created_at }
|
||||
= l report.created_at.to_date
|
||||
.report-notes__item__content
|
||||
= simple_format(h(report.comment))
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
.report-notes__item__header
|
||||
%span.username
|
||||
= link_to @appeal.account.username, can?(:show, @appeal.account) ? admin_account_path(@appeal.account_id) : short_account_url(@appeal.account)
|
||||
%time.relative-formatted{ datetime: @appeal.created_at.iso8601 }
|
||||
%time.relative-formatted{ datetime: @appeal.created_at.iso8601, title: @appeal.created_at }
|
||||
= l @appeal.created_at.to_date
|
||||
|
||||
.report-notes__item__content
|
||||
|
|
Loading…
Reference in a new issue