Add dashboard widget to show the latest notes. Issue #51

p.s: I would like to be able to select a particular tag to show, but
none of the dashboard widgets are configurable.

I hate increasing the app size from 300k to almost 3 mb for something
so simple, but we must adapt to the majority and use vue here.
This commit is contained in:
Matias De lellis
2022-05-25 10:29:20 -03:00
parent e6d52bfa5a
commit b6db15d8d2
14 changed files with 21727 additions and 308 deletions

View File

@@ -1,6 +1,6 @@
<?php declare(strict_types=1);
/*
* @copyright 2016-2021 Matias De lellis <mati86dl@gmail.com>
* @copyright 2016-2022 Matias De lellis <mati86dl@gmail.com>
*
* @author 2016 Matias De lellis <mati86dl@gmail.com>
*
@@ -27,6 +27,8 @@ use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IServerContainer;
@@ -48,6 +50,11 @@ class Application extends App implements IBootstrap {
public function register(IRegistrationContext $context): void {
$context->registerSearchProvider(NoteSearchProvider::class);
$context->registerCapability(Capabilities::class);
$context->registerDashboardWidget(DashboardWidget::class);
$context->registerEventListener(
BeforeTemplateRenderedEvent::class,
BeforeTemplateRenderedListener::class
);
}
public function boot(IBootContext $context): void {