Skip to content

Commit

Permalink
Fixes (#66)
Browse files Browse the repository at this point in the history
* fix: remove iframe border

* fix: vmstats query

* fix: disable charts polling

---------

Co-authored-by: Andrei Ioniță <hi@andrei.io>
  • Loading branch information
gheorghelupu17 and andreiio authored Nov 23, 2024
1 parent 7e10f9d commit 727c39f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/Livewire/Charts/TurnoutAreaChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down
2 changes: 2 additions & 0 deletions app/Livewire/Charts/TurnoutPopulationPyramidChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/VoteMonitorStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion resources/js/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default () => ({

copy() {
const code =
`<iframe id="${this.id}" src="${this.url}" style="width:100%;height:100vh"></iframe>` +
`<iframe id="${this.id}" src="${this.url}" style="width:100%;height:100vh;border:0;"></iframe>` +
`<script src="https://cdn.jsdelivr.net/npm/@iframe-resizer/parent@5.3.2"></script>` +
`<script>iframeResize({license:'GPLv3'},'#${this.id}');</script>`;

Expand Down

0 comments on commit 727c39f

Please sign in to comment.