diff --git a/plugins/nextcloud/index.php b/plugins/nextcloud/index.php index d629bbffbf..096a254dd0 100644 --- a/plugins/nextcloud/index.php +++ b/plugins/nextcloud/index.php @@ -4,8 +4,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin { const NAME = 'Nextcloud', - VERSION = '2.6', - RELEASE = '2022-10-21', + VERSION = '2.7', + RELEASE = '2022-10-25', CATEGORY = 'Integrations', DESCRIPTION = 'Integrate with Nextcloud v20+', REQUIRED = '2.19.0'; @@ -170,7 +170,8 @@ public function FilterAppData($bAdmin, &$aResult) : void // $sWebDAV = \OCP\Util::linkToRemote('dav'); $aResult['Nextcloud'] = [ 'UID' => $sUID, - 'WebDAV' => $sWebDAV + 'WebDAV' => $sWebDAV, + 'CalDAV' => $this->Config()->Get('plugin', 'calendar', false) // 'WebDAV_files' => $sWebDAV . '/files/' . $sUID ]; if (empty($aResult['Auth'])) { @@ -214,7 +215,10 @@ protected function configMapping() : array return array( \RainLoop\Plugins\Property::NewInstance('suggestions')->SetLabel('Suggestions') ->SetType(\RainLoop\Enumerations\PluginPropertyType::BOOL) - ->SetDefaultValue(true) + ->SetDefaultValue(true), + \RainLoop\Plugins\Property::NewInstance('calendar')->SetLabel('Enable "Put ICS in calendar"') + ->SetType(\RainLoop\Enumerations\PluginPropertyType::BOOL) + ->SetDefaultValue(false) ); } diff --git a/plugins/nextcloud/js/message.js b/plugins/nextcloud/js/message.js index 8bde31d695..4a46fd0c75 100644 --- a/plugins/nextcloud/js/message.js +++ b/plugins/nextcloud/js/message.js @@ -95,9 +95,12 @@ + '')); // https://github.com/nextcloud/calendar/issues/4684 -// attachmentsControls.append(Element.fromHTML('' -// + '' -// + '')); + let cfg = rl.settings.get('Nextcloud'); + if (cfg.CalDAV) { + attachmentsControls.append(Element.fromHTML('' + + '' + + '')); + } } const msgMenu = template.content.querySelector('#more-view-dropdown-id + menu');