diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-01-13 17:32:57 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-06 14:49:29 +0200 |
commit | 29a7f7f6efd2a9791fdcfb9f9f7e862bafd8da82 (patch) | |
tree | 720d2c59461777dd8a4a4d57d06738ce55066f22 /apps/files_trashbin/lib/AppInfo/Application.php | |
parent | 8eb95052945c478a71d910090c7b1105f9256a4e (diff) | |
download | nextcloud-server-29a7f7f6efd2a9791fdcfb9f9f7e862bafd8da82.tar.gz nextcloud-server-29a7f7f6efd2a9791fdcfb9f9f7e862bafd8da82.zip |
feat(files_trashbin): migrate to vue
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_trashbin/lib/AppInfo/Application.php')
-rw-r--r-- | apps/files_trashbin/lib/AppInfo/Application.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/apps/files_trashbin/lib/AppInfo/Application.php b/apps/files_trashbin/lib/AppInfo/Application.php index 41466a865ac..461eade6802 100644 --- a/apps/files_trashbin/lib/AppInfo/Application.php +++ b/apps/files_trashbin/lib/AppInfo/Application.php @@ -26,8 +26,10 @@ namespace OCA\Files_Trashbin\AppInfo; use OCA\DAV\Connector\Sabre\Principal; +use OCA\Files\Event\LoadAdditionalScriptsEvent; use OCA\Files_Trashbin\Capabilities; use OCA\Files_Trashbin\Expiration; +use OCA\Files_Trashbin\Listeners\LoadAdditionalScripts; use OCA\Files_Trashbin\Trash\ITrashManager; use OCA\Files_Trashbin\Trash\TrashManager; use OCA\Files_Trashbin\UserMigration\TrashbinMigrator; @@ -55,6 +57,11 @@ class Application extends App implements IBootstrap { $context->registerServiceAlias('principalBackend', Principal::class); $context->registerUserMigrator(TrashbinMigrator::class); + + $context->registerEventListener( + LoadAdditionalScriptsEvent::class, + LoadAdditionalScripts::class + ); } public function boot(IBootContext $context): void { @@ -68,18 +75,6 @@ class Application extends App implements IBootstrap { \OCP\Util::connectHook('OC_Filesystem', 'post_write', 'OCA\Files_Trashbin\Hooks', 'post_write_hook'); // pre and post-rename, disable trash logic for the copy+unlink case \OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Trashbin\Trashbin', 'ensureFileScannedHook'); - - \OCA\Files\App::getNavigationManager()->add(function () { - $l = \OC::$server->getL10N(self::APP_ID); - return [ - 'id' => 'trashbin', - 'appname' => self::APP_ID, - 'script' => 'list.php', - 'order' => 50, - 'name' => $l->t('Deleted files'), - 'classes' => 'pinned', - ]; - }); } public function registerTrashBackends(IServerContainer $serverContainer, ILogger $logger, IAppManager $appManager, ITrashManager $trashManager) { |