Improved Nextcloud integration

This commit is contained in:
the-djmaze 2022-10-25 11:32:47 +02:00
parent 2247be5026
commit 31d6666729
8 changed files with 16 additions and 8 deletions

View file

@ -11,17 +11,17 @@ Thank you to all contributors to SnappyMail for nextcloud:
## How to Install ## How to Install
Start within Nextcloud, and click on the "+ Apps" button in the upper-left corner dropdown menu: Start within Nextcloud, and click on the "+ Apps" button in the upper-right corner dropdown menu:
![Image1](https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/nextcloud/screenshots/help_a1.png) ![Image1](https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/nextcloud/screenshots/help_a1.png)
Then, enable the SnappyMail plugin that you will find in the "Social & communication" section: Then, enable the SnappyMail plugin that you will find in the "Social & communication" section:
![Image2](https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/nextcloud/screenshots//help_a2.png) ![Image2](https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/nextcloud/screenshots/help_a2.png)
After a quick wait, SnappyMail is installed. Now you should configure it before use: open the Nextcloud admin panel (upper-right corner dropdown menu) and go to "Additionnal settings". There, click on the "Go to SnappyMail Webmail admin panel" link. After a quick wait, SnappyMail is installed. Now you should configure it before use: open the Nextcloud admin panel (upper-right corner dropdown menu) and go to "Additionnal settings". There, click on the "Go to SnappyMail Webmail admin panel" link.
![Image3](https://github.com/pierre-alain-b/rainloop-nextcloud/blob/master/screenshots/help_a3.png) ![Image3](https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/nextcloud/screenshots/nextcloud-admin.png)
To enter SnappyMail admin area, the default login is "admin" and the default password will be generated in `[nextcloud-data]/app_snappymail/_data_/_default_/admin_password.txt`. Don't forget to change it once in the admin panel! To enter SnappyMail admin area, the default login is "admin" and the default password will be generated in `[nextcloud-data]/app_snappymail/_data_/_default_/admin_password.txt`. Don't forget to change it once in the admin panel!
@ -34,7 +34,7 @@ From that point, all instance-wide SnappyMail settings can be tweaked as you wis
SnappyMail for Nextcloud is highly configurable. But settings are available in multiple places and this can be misleading for first-time users. SnappyMail for Nextcloud is highly configurable. But settings are available in multiple places and this can be misleading for first-time users.
### SnappyMail admin settings ### SnappyMail admin settings
SnappyMail admin settings can be reached only by the Nextcloud administrator. Open the Nextcloud admin panel ("Admin" in the upper-right corner dropdown menu) and go to "Additionnal settings". There, click on the "Go to SnappyMail Webmail admin panel" link. Alternatively, you may use the following link: https://path.to.nextcloud/index.php/apps/snappymail/app/?admin. SnappyMail admin settings can be reached only by the Nextcloud administrator. Open the Nextcloud admin panel ("Admin" in the upper-right corner dropdown menu) and go to "Additionnal settings". There, click on the "Go to SnappyMail Webmail admin panel" link. Alternatively, you may use the following link: https://path.to.nextcloud/index.php/apps/snappymail/run/?admin.
SnappyMail admin settings include all settings that will apply to all SnappyMail users (default login rules, branding, management of plugins, security rules and domains). SnappyMail admin settings include all settings that will apply to all SnappyMail users (default login rules, branding, management of plugins, security rules and domains).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 7.9 KiB

Before After
Before After

View file

@ -61,10 +61,18 @@ There, click on the link to go to the SnappyMail admin panel.
<lib>xxtea</lib> <lib>xxtea</lib>
<lib>zip</lib> <lib>zip</lib>
--> -->
<nextcloud min-version="20" max-version="25" /> <nextcloud min-version="20" max-version="26" />
</dependencies> </dependencies>
<settings> <settings>
<admin>OCA\SnappyMail\Settings\AdminSettings</admin> <admin>OCA\SnappyMail\Settings\AdminSettings</admin>
<personal>OCA\SnappyMail\Settings\PersonalSettings</personal> <personal>OCA\SnappyMail\Settings\PersonalSettings</personal>
</settings> </settings>
<navigations>
<navigation>
<name>SnappyMail</name>
<route>snappymail.page.index</route>
<icon>logo-white-64x64.png</icon>
<order>4</order>
</navigation>
</navigations>
</info> </info>

View file

@ -66,19 +66,19 @@ class Application extends App implements IBootstrap
if (!\is_dir(\rtrim(\trim(\OC::$server->getSystemConfig()->getValue('datadirectory', '')), '\\/') . '/appdata_snappymail')) { if (!\is_dir(\rtrim(\trim(\OC::$server->getSystemConfig()->getValue('datadirectory', '')), '\\/') . '/appdata_snappymail')) {
return; return;
} }
/*
$container = $this->getContainer(); $container = $this->getContainer();
$container->query('OCP\INavigationManager')->add(function () use ($container) { $container->query('OCP\INavigationManager')->add(function () use ($container) {
$urlGenerator = $container->query('OCP\IURLGenerator'); $urlGenerator = $container->query('OCP\IURLGenerator');
return [ return [
'id' => 'snappymail', 'id' => 'snappymail',
'order' => 10, 'order' => 4,
'href' => $urlGenerator->linkToRoute('snappymail.page.index'), 'href' => $urlGenerator->linkToRoute('snappymail.page.index'),
'icon' => $urlGenerator->imagePath('snappymail', 'logo-white-64x64.png'), 'icon' => $urlGenerator->imagePath('snappymail', 'logo-white-64x64.png'),
'name' => \OCP\Util::getL10N('snappymail')->t('Email') 'name' => \OCP\Util::getL10N('snappymail')->t('Email')
]; ];
}); });
*/
$userSession = \OC::$server->getUserSession(); $userSession = \OC::$server->getUserSession();
$userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) { $userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) {
$config = \OC::$server->getConfig(); $config = \OC::$server->getConfig();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB