0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Removed All Time from the graphs in the new Dashboard

refs: https://github.com/TryGhost/Team/issues/1531
This commit is contained in:
James Morris 2022-05-11 11:06:07 +01:00
parent e87e564462
commit 97553181ce

View file

@ -18,9 +18,6 @@ const DAYS_OPTIONS = [{
}, { }, {
name: '90 Days', name: '90 Days',
value: 90 value: 90
}, {
name: 'All Time',
value: 'all'
}]; }];
const DISPLAY_OPTIONS = [{ const DISPLAY_OPTIONS = [{
@ -236,7 +233,6 @@ export default class Anchor extends Component {
} }
get chartOptions() { get chartOptions() {
let isAllTime = (this.days === 'all');
let barColor = this.feature.nightShift ? 'rgba(200, 204, 217, 0.25)' : 'rgba(200, 204, 217, 0.65)'; let barColor = this.feature.nightShift ? 'rgba(200, 204, 217, 0.25)' : 'rgba(200, 204, 217, 0.65)';
return { return {
@ -338,16 +334,11 @@ export default class Anchor extends Component {
callback: function (value, index, values) { callback: function (value, index, values) {
if (index === 0) { if (index === 0) {
document.getElementById('gh-dashboard5-anchor-date-start').innerHTML = moment(value).format(DATE_FORMAT); document.getElementById('gh-dashboard5-anchor-date-start').innerHTML = moment(value).format(DATE_FORMAT);
return value;
} }
if (index === (values.length - 1)) { if (index === (values.length - 1)) {
document.getElementById('gh-dashboard5-anchor-date-end').innerHTML = moment(value).format(DATE_FORMAT); document.getElementById('gh-dashboard5-anchor-date-end').innerHTML = moment(value).format(DATE_FORMAT);
return value;
} }
if (!isAllTime) { return value;
return value;
}
return null;
} }
} }
}] }]