From 727c39f3a74235d276df1f2cb3f21463b8e92cc9 Mon Sep 17 00:00:00 2001 From: Lupu Gheorghe <46172059+gheorghelupu17@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:02:10 +0200 Subject: [PATCH] Fixes (#66) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: remove iframe border * fix: vmstats query * fix: disable charts polling --------- Co-authored-by: Andrei Ioniță --- app/Livewire/Charts/TurnoutAreaChart.php | 2 ++ app/Livewire/Charts/TurnoutPopulationPyramidChart.php | 2 ++ app/Livewire/VoteMonitorStats.php | 2 +- resources/js/embed.js | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Charts/TurnoutAreaChart.php b/app/Livewire/Charts/TurnoutAreaChart.php index 1f302b0..229b838 100644 --- a/app/Livewire/Charts/TurnoutAreaChart.php +++ b/app/Livewire/Charts/TurnoutAreaChart.php @@ -21,6 +21,8 @@ class TurnoutAreaChart extends ChartWidget protected static ?string $maxHeight = '300px'; + protected static ?string $pollingInterval = null; + public function getHeading(): Htmlable { return new HtmlString(view('components.chart-heading', [ diff --git a/app/Livewire/Charts/TurnoutPopulationPyramidChart.php b/app/Livewire/Charts/TurnoutPopulationPyramidChart.php index f0559e9..5162939 100644 --- a/app/Livewire/Charts/TurnoutPopulationPyramidChart.php +++ b/app/Livewire/Charts/TurnoutPopulationPyramidChart.php @@ -29,6 +29,8 @@ class TurnoutPopulationPyramidChart extends ChartWidget protected static ?string $maxHeight = '300px'; + protected static ?string $pollingInterval = null; + public function getHeading(): Htmlable { return new HtmlString(view('components.chart-heading', [ diff --git a/app/Livewire/VoteMonitorStats.php b/app/Livewire/VoteMonitorStats.php index a2923de..eaf1875 100644 --- a/app/Livewire/VoteMonitorStats.php +++ b/app/Livewire/VoteMonitorStats.php @@ -29,7 +29,7 @@ public function stats(): array #[Computed] protected function count(): int { - return \count($this->stats()); + return \count($this->stats); } public function gridColumns(): string diff --git a/resources/js/embed.js b/resources/js/embed.js index d68e668..025353c 100644 --- a/resources/js/embed.js +++ b/resources/js/embed.js @@ -9,7 +9,7 @@ export default () => ({ copy() { const code = - `` + + `` + `` + ``;