- Migrated from https://github.com/Yetangitu/owncloud-apps
- substantial bit rot accrued in 4 years of non-maintenance which made Reader unusable - Reader now works reliably on public pages - or at least it _Works For Me™_ - Refactored a substantial part of the code to comply to the "current" (ha ha) Nextcloud API - Dropped Owncloud compatibility for lack of a testing installation - Dropped IE (<11) support - Dropped compatibility with older (<20) Nextcloud versions - Dropped app-specific ajax code, now handled by SettingsController - Updated dependencies where applicable
This commit is contained in:
parent
16afbe45fe
commit
b190e180ef
137 changed files with 30984 additions and 2 deletions
51
lib/AppInfo/Application.php
Normal file
51
lib/AppInfo/Application.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2022 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\AppInfo;
|
||||
|
||||
use OCA\Files_Reader\Hooks;
|
||||
use OCA\Files_Reader\Listeners\CSPListener;
|
||||
use OCA\Files_Reader\Listeners\LoadPublicViewerListener;
|
||||
use OCA\Files_Reader\Listeners\LoadViewerListener;
|
||||
|
||||
use OCA\Viewer\Event\LoadViewer;
|
||||
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\AppFramework\Bootstrap\IBootContext;
|
||||
use OCP\AppFramework\Bootstrap\IBootstrap;
|
||||
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
||||
use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
|
||||
use OCP\Security\CSP\AddContentSecurityPolicyEvent;
|
||||
|
||||
class Application extends App implements IBootstrap {
|
||||
public const APP_ID = 'files_reader';
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct(self::APP_ID);
|
||||
}
|
||||
|
||||
public function register(IRegistrationContext $context): void {
|
||||
$context->registerEventListener(LoadViewer::class, LoadViewerListener::class);
|
||||
$context->registerEventListener(BeforeTemplateRenderedEvent::class, LoadPublicViewerListener::class);
|
||||
$context->registerEventListener(AddContentSecurityPolicyEvent::class, CSPListener::class);
|
||||
}
|
||||
|
||||
public function registerPersonalSettings() {
|
||||
\OCP\App::registerPersonal(self::APP_ID, 'personal');
|
||||
}
|
||||
|
||||
public function boot(IBootContext $context): void {
|
||||
Hooks::register();
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue