fix zoom out 1080p dissapear

This commit is contained in:
Doruk 2025-06-25 17:16:31 +02:00
parent c780c2ae8b
commit 0d2c12944a
2 changed files with 2 additions and 2 deletions

View file

@ -87,7 +87,7 @@ router.get("/api/status-page/heartbeat/:slug", cache("1 minutes"), async (reques
// Get the status page to determine the heartbeat range // Get the status page to determine the heartbeat range
let statusPage = await R.findOne("status_page", " id = ? ", [ statusPageID ]); let statusPage = await R.findOne("status_page", " id = ? ", [ statusPageID ]);
let heartbeatBarDays = statusPage.heartbeat_bar_days; let heartbeatBarDays = statusPage ? (statusPage.heartbeat_bar_days || 0) : 0;
// Get max beats parameter from query string (for client-side screen width constraints) // Get max beats parameter from query string (for client-side screen width constraints)
const maxBeats = Math.min(parseInt(request.query.maxBeats) || 100, 100); const maxBeats = Math.min(parseInt(request.query.maxBeats) || 100, 100);

View file

@ -286,7 +286,7 @@ export default {
const newMaxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatHoverAreaPadding * 2)); const newMaxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatHoverAreaPadding * 2));
// If maxBeat changed and we're in configured days mode, notify parent to reload data // If maxBeat changed and we're in configured days mode, notify parent to reload data
if (newMaxBeat !== this.maxBeat && this.normalizedHeartbeatBarDays > 0) { if (newMaxBeat !== this.maxBeat && this.heartbeatBarDays > 0) {
this.maxBeat = newMaxBeat; this.maxBeat = newMaxBeat;
// Find the closest parent with reloadHeartbeatData method (StatusPage) // Find the closest parent with reloadHeartbeatData method (StatusPage)