mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-10-06 03:44:56 +08:00
Make calendar integration optional for #569
Due to bug in Nextcloud Calendar
This commit is contained in:
parent
4fa931f631
commit
3903a37b64
2 changed files with 14 additions and 7 deletions
|
@ -4,8 +4,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = 'Nextcloud',
|
NAME = 'Nextcloud',
|
||||||
VERSION = '2.6',
|
VERSION = '2.7',
|
||||||
RELEASE = '2022-10-21',
|
RELEASE = '2022-10-25',
|
||||||
CATEGORY = 'Integrations',
|
CATEGORY = 'Integrations',
|
||||||
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
||||||
REQUIRED = '2.19.0';
|
REQUIRED = '2.19.0';
|
||||||
|
@ -170,7 +170,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
// $sWebDAV = \OCP\Util::linkToRemote('dav');
|
// $sWebDAV = \OCP\Util::linkToRemote('dav');
|
||||||
$aResult['Nextcloud'] = [
|
$aResult['Nextcloud'] = [
|
||||||
'UID' => $sUID,
|
'UID' => $sUID,
|
||||||
'WebDAV' => $sWebDAV
|
'WebDAV' => $sWebDAV,
|
||||||
|
'CalDAV' => $this->Config()->Get('plugin', 'calendar', false)
|
||||||
// 'WebDAV_files' => $sWebDAV . '/files/' . $sUID
|
// 'WebDAV_files' => $sWebDAV . '/files/' . $sUID
|
||||||
];
|
];
|
||||||
if (empty($aResult['Auth'])) {
|
if (empty($aResult['Auth'])) {
|
||||||
|
@ -214,7 +215,10 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
return array(
|
return array(
|
||||||
\RainLoop\Plugins\Property::NewInstance('suggestions')->SetLabel('Suggestions')
|
\RainLoop\Plugins\Property::NewInstance('suggestions')->SetLabel('Suggestions')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::BOOL)
|
->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)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,9 +95,12 @@
|
||||||
+ '</span>'));
|
+ '</span>'));
|
||||||
|
|
||||||
// https://github.com/nextcloud/calendar/issues/4684
|
// https://github.com/nextcloud/calendar/issues/4684
|
||||||
// attachmentsControls.append(Element.fromHTML('<span data-bind="visible: nextcloudICS" data-icon="📅">'
|
let cfg = rl.settings.get('Nextcloud');
|
||||||
// + '<span class="g-ui-link" data-bind="click: nextcloudSaveICS" data-i18n="NEXTCLOUD/SAVE_ICS"></span>'
|
if (cfg.CalDAV) {
|
||||||
// + '</span>'));
|
attachmentsControls.append(Element.fromHTML('<span data-bind="visible: nextcloudICS" data-icon="📅">'
|
||||||
|
+ '<span class="g-ui-link" data-bind="click: nextcloudSaveICS" data-i18n="NEXTCLOUD/SAVE_ICS"></span>'
|
||||||
|
+ '</span>'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const msgMenu = template.content.querySelector('#more-view-dropdown-id + menu');
|
const msgMenu = template.content.querySelector('#more-view-dropdown-id + menu');
|
||||||
|
|
Loading…
Add table
Reference in a new issue