Commit 68de3ac1 authored by Mike Greiling's avatar Mike Greiling

display system timezone underneath activity calendar

parent 037b3729
...@@ -151,12 +151,17 @@ export default class UserTabs { ...@@ -151,12 +151,17 @@ export default class UserTabs {
const calendarPath = $calendarWrap.data('calendarPath'); const calendarPath = $calendarWrap.data('calendarPath');
const calendarActivitiesPath = $calendarWrap.data('calendarActivitiesPath'); const calendarActivitiesPath = $calendarWrap.data('calendarActivitiesPath');
const utcOffset = $calendarWrap.data('utcOffset'); const utcOffset = $calendarWrap.data('utcOffset');
let utcFormatted = 'UTC';
if (utcOffset !== 0) {
utcFormatted = `UTC${utcOffset > 0 ? '+' : ''}${(utcOffset / 3600)}`;
}
$.ajax({ $.ajax({
dataType: 'json', dataType: 'json',
url: calendarPath, url: calendarPath,
success: (activityData) => { success: (activityData) => {
$calendarWrap.html(CALENDAR_TEMPLATE); $calendarWrap.html(CALENDAR_TEMPLATE);
$calendarWrap.find('.calendar-hint').append(`(Timezone: ${utcFormatted})`);
// eslint-disable-next-line no-new // eslint-disable-next-line no-new
new ActivityCalendar('.js-contrib-calendar', activityData, calendarActivitiesPath, utcOffset); new ActivityCalendar('.js-contrib-calendar', activityData, calendarActivitiesPath, utcOffset);
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
margin-top: -23px; margin-top: -23px;
float: right; float: right;
font-size: 12px; font-size: 12px;
direction: ltr;
} }
.pika-single.gitlab-theme { .pika-single.gitlab-theme {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment