From a8380713e0044d755115b1a1799a3454872dd8bb Mon Sep 17 00:00:00 2001 From: Nikolai Shcherbin Date: Sat, 31 Aug 2024 02:27:48 +0300 Subject: [PATCH] Updates for Elgg 6 --- README.md | 2 +- composer.json | 9 ++++++--- elgg-plugin.php | 8 +------- vendor/mod.lnk | Bin 1099 -> 0 bytes .../default/forms/admin/indieweb/indieauth.php | 3 +-- views/default/forms/admin/indieweb/settings.js | 15 --------------- .../default/forms/admin/indieweb/settings.mjs | 17 +++++++++++++++++ 7 files changed, 26 insertions(+), 28 deletions(-) delete mode 100644 vendor/mod.lnk delete mode 100644 views/default/forms/admin/indieweb/settings.js create mode 100644 views/default/forms/admin/indieweb/settings.mjs diff --git a/README.md b/README.md index 663e870..395538d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ IndieWeb ========= -![Elgg 5.1](https://img.shields.io/badge/Elgg-5.1-purple.svg?style=flat-square) +![Elgg 6.0](https://img.shields.io/badge/Elgg-6.0-purple.svg?style=flat-square) IndieWeb integration for Elgg diff --git a/composer.json b/composer.json index 7bace54..8846758 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,10 @@ "config": { "fxp-asset": { "enabled": false - } + }, + "allow-plugins": { + "composer/installers": false + } }, "require": { "php": "^8.2", @@ -41,9 +44,9 @@ } ], "conflict": { - "elgg/elgg": "<5.1" + "elgg/elgg": "<6.0" }, "support": { - "source": "https://wzm.me" + "source": "https://github.com/RiverVanRain/indieweb" } } diff --git a/elgg-plugin.php b/elgg-plugin.php index cc7b537..1ab543c 100644 --- a/elgg-plugin.php +++ b/elgg-plugin.php @@ -23,7 +23,7 @@ return [ 'plugin' => [ 'name' => 'IndieWeb', - 'version' => '1.2.0', + 'version' => '2.0.0', ], 'bootstrap' => \Elgg\IndieWeb\Bootstrap::class, @@ -208,12 +208,6 @@ 'controller' => \Elgg\IndieWeb\IndieAuth\Actions\Token\SaveAction::class, 'access' => 'admin', ], - //core - /* - 'blog/save' => [ - 'controller' => \Elgg\IndieWeb\Actions\Blog\SaveAction::class, - ], - */ ], //EVENTS diff --git a/vendor/mod.lnk b/vendor/mod.lnk deleted file mode 100644 index 77f25e35447d47e94d976fe096ec8748770abcf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1099 zcmah|ZAepL6n-{uXcxT9f7EmP%ef(z%-AOz5XUv_OcU z4-!k$A2}!}>yKv8pCDlvl&*y6pGBD9k0^@Hxx2fO2%eYcoU?c5ecto&UN-Q1y_%aR4Dd+7ZYc;Hf(`-}Cl|cEZ5h7tk{pV8rQ@qs zUbpf6JUoyPM7OK~BPtZm?=^SE45m;hghGYSS@pq{;2YS@1+V0*TQVagFJKE?3e$qu z+@&{3`9OifG~~T3W%%0coLOs@ZWX3Svrfv0ju6jrg(t}uE+d}y=4QaEGKE#9GkaEJ zvc-bL)Q)CaK#E$Q(KlbKhdIg;NbdsTVZI_?SfMtSIG+T#m?DU>$O3iL$PbA0DhB%i<4obawG<6-jR> zuPghdt9Jj^!?YD0=EgA+Q6;HJ0lRMV>|2kz%%^EySe7T+~&o|3N>P@;4J;W3}8_z@HAka1N5AxsjQIMK~;2Nt<9NILIp!ibm?DD7tu 0, 'checked' => (bool) $entity->enable_indieauth_endpoint, 'switch' => true, - 'onchange' => 'indieauthEndpoint();', 'id' => 'enable_indieauth_endpoint', ], ], diff --git a/views/default/forms/admin/indieweb/settings.js b/views/default/forms/admin/indieweb/settings.js deleted file mode 100644 index 89d7f17..0000000 --- a/views/default/forms/admin/indieweb/settings.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(require) { - var $ = require('jquery'); - - indieauthEndpoint = function() { - if ($('#enable_indieauth_endpoint').is(':checked')) { - $('#settings-indieauth-keys').show(); - $('#settings-indieauth-external').hide(); - } else { - $('#settings-indieauth-keys').hide(); - $('#settings-indieauth-external').show(); - } - }; - - indieauthEndpoint(); -}); diff --git a/views/default/forms/admin/indieweb/settings.mjs b/views/default/forms/admin/indieweb/settings.mjs new file mode 100644 index 0000000..a9c711e --- /dev/null +++ b/views/default/forms/admin/indieweb/settings.mjs @@ -0,0 +1,17 @@ +import $ from 'jquery'; + +const indieauthEndpoint = () => { + if ($('#enable_indieauth_endpoint').is(':checked')) { + $('#settings-indieauth-keys').show(); + $('#settings-indieauth-external').hide(); + } else { + $('#settings-indieauth-keys').hide(); + $('#settings-indieauth-external').show(); + } +}; + +indieauthEndpoint(); + +$(document).ready(() => { + $('#enable_indieauth_endpoint').change(indieauthEndpoint); +});