Skip to content

Commit

Permalink
Updates for Elgg 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai Shcherbin committed Aug 30, 2024
1 parent 2aedc51 commit a838071
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"config": {
"fxp-asset": {
"enabled": false
}
},
"allow-plugins": {
"composer/installers": false
}
},
"require": {
"php": "^8.2",
Expand All @@ -41,9 +44,9 @@
}
],
"conflict": {
"elgg/elgg": "<5.1"
"elgg/elgg": "<6.0"
},
"support": {
"source": "https://wzm.me"
"source": "https://github.com/RiverVanRain/indieweb"
}
}
8 changes: 1 addition & 7 deletions elgg-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
return [
'plugin' => [
'name' => 'IndieWeb',
'version' => '1.2.0',
'version' => '2.0.0',
],

'bootstrap' => \Elgg\IndieWeb\Bootstrap::class,
Expand Down Expand Up @@ -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
Expand Down
Binary file removed vendor/mod.lnk
Binary file not shown.
3 changes: 1 addition & 2 deletions views/default/forms/admin/indieweb/indieauth.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

elgg_require_js('forms/admin/indieweb/settings');
elgg_import_esm('forms/admin/indieweb/settings');

$entity = elgg_get_plugin_from_id('indieweb');

Expand Down Expand Up @@ -28,7 +28,6 @@
'default' => 0,
'checked' => (bool) $entity->enable_indieauth_endpoint,
'switch' => true,
'onchange' => 'indieauthEndpoint();',
'id' => 'enable_indieauth_endpoint',
],
],
Expand Down
15 changes: 0 additions & 15 deletions views/default/forms/admin/indieweb/settings.js

This file was deleted.

17 changes: 17 additions & 0 deletions views/default/forms/admin/indieweb/settings.mjs
Original file line number Diff line number Diff line change
@@ -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);
});

0 comments on commit a838071

Please sign in to comment.