From 4531649145d8fe2a061006019ec629617f8b6718 Mon Sep 17 00:00:00 2001 From: Derek Kaser <11674153+dkaser@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:45:40 +0000 Subject: [PATCH 1/3] fix: add plugin metrics ua to query --- .../local/emhttp/plugins/tailscale/include/Tailscale/Utils.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/usr/local/emhttp/plugins/tailscale/include/Tailscale/Utils.php b/src/usr/local/emhttp/plugins/tailscale/include/Tailscale/Utils.php index 6f597e8..8abe3e2 100644 --- a/src/usr/local/emhttp/plugins/tailscale/include/Tailscale/Utils.php +++ b/src/usr/local/emhttp/plugins/tailscale/include/Tailscale/Utils.php @@ -147,6 +147,7 @@ public static function download_url(string $url): string curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_REFERER, ""); curl_setopt($ch, CURLOPT_FAILONERROR, true); + curl_setopt($ch, CURLOPT_USERAGENT, 'plugin-metrics/1.0.0'); $out = curl_exec($ch) ?: false; curl_close($ch); return strval($out); From 62eb33294bbcadd546cb6adbf34e1cbefd94f284 Mon Sep 17 00:00:00 2001 From: Derek Kaser <11674153+dkaser@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:45:57 +0000 Subject: [PATCH 2/3] fix: remove toggles from settings page --- .../emhttp/plugins/tailscale/include/Pages/Settings.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/usr/local/emhttp/plugins/tailscale/include/Pages/Settings.php b/src/usr/local/emhttp/plugins/tailscale/include/Pages/Settings.php index 8583b8f..ff59052 100644 --- a/src/usr/local/emhttp/plugins/tailscale/include/Pages/Settings.php +++ b/src/usr/local/emhttp/plugins/tailscale/include/Pages/Settings.php @@ -195,7 +195,6 @@ function requestErase(e) { if ($.cookie('tailscale_view_mode') == 'advanced') { $('.advanced').show(); - $('.basic').hide(); } $('.advancedview').switchButton({ @@ -205,8 +204,11 @@ function requestErase(e) { checked: $.cookie('tailscale_view_mode') == 'advanced' }); $('.advancedview').change(function(){ - $('.advanced').toggle('slow'); - $('.basic').toggle('slow'); + if($('.advancedview').is(':checked')) { + $('.advanced').show('slow'); + } else { + $('.advanced').hide('slow'); + } $.cookie('tailscale_view_mode', $('.advancedview').is(':checked') ? 'advanced' : 'basic', {expires:3650}); }); }); From a999d57ec7d45573e95bbe031e266147da621895 Mon Sep 17 00:00:00 2001 From: Derek Kaser <11674153+dkaser@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:52:33 +0000 Subject: [PATCH 3/3] fix: phpstan action --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1f7ce01..8d9d3b7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,6 +25,8 @@ jobs: - uses: actions/checkout@v4 - uses: php-actions/composer@v6 - uses: php-actions/phpstan@v3 + with: + version: composer commitlint: name: Commitlint