diff --git a/data/promote.telegram.org/css/promote.css b/data/promote.telegram.org/css/promote.css index 553b3fdfdc..00e43eb9d0 100644 --- a/data/promote.telegram.org/css/promote.css +++ b/data/promote.telegram.org/css/promote.css @@ -1805,6 +1805,10 @@ a.pr-account-button-wrap:focus { } .pr-form .pr-form-content-wrap { width: 100%; + margin: 0 auto; +} +.pr-form-column .pr-form-content-wrap { + max-width: 460px; } .pr-form .pr-form-content { width: 100%; @@ -2252,6 +2256,17 @@ body.rtl .pr-sort-marker { padding-top: 24px; padding-bottom: 24px; } +.pr-cell-in:before { + content: ''; + display: inline-block; + width: 7px; + height: 5px; + margin: 0 10px 0 3px; + border: solid #aaa; + border-width: 0 0 1px 1px; + position: relative; + top: -3px; +} .pr-no-tme-link { color: #999; font-style: italic; diff --git a/data/promote.telegram.org/js/health.js b/data/promote.telegram.org/js/health.js index b21682f52b..17bb59b030 100644 --- a/data/promote.telegram.org/js/health.js +++ b/data/promote.telegram.org/js/health.js @@ -114,12 +114,28 @@ function statsFormat(period) { case 'hour': return statsFormatHour; + case 'week': + return statsFormatWeek; + + case 'month': + return statsFormatMonth; + case 'day': default: return null; } } +function statsTooltipFormat(period) { + switch (period) { + case 'week': + return statsFormatWeekFull; + case 'month': + return statsFormatMonthFull; + } + return statsFormat(period); +} + function formatNumber(number, decimals, decPoint, thousandsSep) { number = (number + '').replace(/[^0-9+\-Ee.]/g, '') var n = !isFinite(+number) ? 0 : +number @@ -169,7 +185,7 @@ function statsFormatAmount(value, currency) { decimals++; } var amount_str = formatNumber(value / 1000000, decimals, '.', ','); - return (currency || '€') + ' ' + amount_str; + return (currency || '€') + ' ' + amount_str; } function statsFormat5min(time) { @@ -181,6 +197,49 @@ function statsFormatHour(time) { return statShortMonths[date.getUTCMonth()] + ', ' + date.getUTCDate() + ' ' + date.toUTCString().match(/(\d+:\d+):/)[1]; } +function statsFormatPeriod(time, days) { + var dt = new Date(time), + de = new Date(time + (days - 1) * 86400000); + var dtm = dt.getUTCMonth(), dem = de.getUTCMonth(), + dtd = dt.getUTCDate(), ded = de.getUTCDate(); + + if (dtm == dem) { + return dtd + '-' + ded + ' ' + statShortMonths[dtm]; + } else { + return dtd + ' ' + statShortMonths[dtm] + ' - ' + ded + ' ' + statShortMonths[dem]; + } +} + +function statsFormatPeriodFull(time, days) { + var dt = new Date(time), + de = new Date(time + (days - 1) * 86400000); + var dty = dt.getUTCFullYear(), dey = de.getUTCFullYear(), + dtm = dt.getUTCMonth(), dem = de.getUTCMonth(), + dtd = dt.getUTCDate(), ded = de.getUTCDate(); + + if (dty != dey) { + return dtd + ' ' + statShortMonths[dtm] + ' ' + dty + ' – ' + ded + ' ' + statShortMonths[dem] + ' ' + dey; + } else { + return dtd + ' ' + statShortMonths[dtm] + ' – ' + ded + ' ' + statShortMonths[dem] + ' ' + dey; + } +} + +function statsFormatWeek(time) { + return statsFormatPeriod(time, 7); +} + +function statsFormatWeekFull(time) { + return statsFormatPeriodFull(time, 7); +} + +function statsFormatMonth(time) { + return statsFormatPeriod(time, 30); +} + +function statsFormatMonthFull(time) { + return statsFormatPeriodFull(time, 30); +} + function statsFormatTooltipValue(val) { if (val.toLocaleString) { return val.toLocaleString(); diff --git a/data/tsf.telegram.org/css/health.css b/data/tsf.telegram.org/css/health.css index f4bb62efd6..bf32bfd8d1 100644 --- a/data/tsf.telegram.org/css/health.css +++ b/data/tsf.telegram.org/css/health.css @@ -460,12 +460,14 @@ i.hl-menu-bar:last-child { /*font-style: italic;*/ } .hl-dropdown .dropdown-menu > li > a:hover, -.hl-dropdown .dropdown-menu > li > a:focus { +.hl-dropdown .dropdown-menu > li > a:focus, +.hl-dropdown .dropdown-menu > li.active > a { background-color: #f4f4f4; color: #222; } .dark .hl-dropdown .dropdown-menu > li > a:hover, -.dark .hl-dropdown .dropdown-menu > li > a:focus { +.dark .hl-dropdown .dropdown-menu > li > a:focus, +.dark .hl-dropdown .dropdown-menu > li.active > a { background-color: #4D5561; color: #fff; } @@ -510,6 +512,18 @@ i.hl-menu-bar:last-child { .hl-dropdown a.dropdown-toggle > .checkbox-item .checkbox:disabled ~ .checkbox-label { color: #a8a8a8; } +.hl-dropdown .dropdown-menu > li.subitem > a:before { + content: ''; + display: inline-block; + width: 7px; + height: 5px; + margin: 0 10px 0 3px; + border: solid #aaa; + border-width: 0 0 1px 1px; + position: relative; + top: -3px; +} + .hl-select-dropdown { position: relative;