diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c4aa35..88db257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.6.4]: 2021-03-18 +- Initial Nextcloud 21 support. +- Add new api for uploading attachments. For now only used in the Android + client. +- Update Portuguese (Brazil) thanks to flaviove. + ## [0.6.3]: 2020-10-31 - Fix thumbnail when pretty url is disabled. Issue #48 - Update French translation thanks to Thovi98 diff --git a/appinfo/app.php b/appinfo/app.php deleted file mode 100644 index 211c992..0000000 --- a/appinfo/app.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * @author 2016 Matias De lellis - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -use OCA\QuickNotes\AppInfo\Application; - -$app = new Application(); -$app->register(); \ No newline at end of file diff --git a/appinfo/info.xml b/appinfo/info.xml index 2aed82a..0d4ec6d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Quick notes Quick notes with a basic rich text Quick notes with a basic rich text - 0.6.3 + 0.6.4 agpl Matias De lellis QuickNotes @@ -20,6 +20,6 @@ https://raw.githubusercontent.com/matiasdelellis/quicknotes/master/doc/quicknotes-attachments.jpeg https://raw.githubusercontent.com/matiasdelellis/quicknotes/master/doc/quicknotes-shared-note.jpeg - + diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 719d758..fae1df2 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -1,6 +1,6 @@ + * @copyright 2016-2021 Matias De lellis * * @author 2016 Matias De lellis * @@ -23,13 +23,16 @@ namespace OCA\QuickNotes\AppInfo; use OCP\AppFramework\App; +use OCP\AppFramework\Bootstrap\IBootstrap; +use OCP\AppFramework\Bootstrap\IBootContext; +use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\IL10N; use OCP\IURLGenerator; use OCP\IServerContainer; -class Application extends App { +class Application extends App implements IBootstrap { /** @var string */ public const APP_ID = 'quicknotes'; @@ -41,31 +44,27 @@ class Application extends App { parent::__construct(self::APP_ID, $urlParams); } - public function register(): void { - $this->registerNavigationEntry(); - $this->registerCapabilities(); + public function register(IRegistrationContext $context): void { + $context->registerCapability(Capabilities::class); } - private function registerNavigationEntry(): void { - $container = $this->getContainer(); - $server = $container->getServer(); + public function boot(IBootContext $context): void { + $server = $context->getServerContainer(); + $this->registerNavigationEntry($server); + } - $server->getNavigationManager()->add(static function () use ($container) { - $urlGenerator = $container->query(IURLGenerator::class); - $l10n = $container->query(IL10N::class); + private function registerNavigationEntry(IServerContainer $server): void { + $server->getNavigationManager()->add(static function () use ($server) { + $urlGenerator = $server->getURLGenerator(); + $l10n = $server->getL10N(self::APP_ID); return [ - 'id' => 'quicknotes', + 'id' => self::APP_ID, 'order' => 10, 'href' => $urlGenerator->linkToRoute('quicknotes.page.index'), - 'icon' => $urlGenerator->imagePath('quicknotes', 'app.svg'), - 'name' => $l10n->t('Quick notes'), + 'icon' => $urlGenerator->imagePath(self::APP_ID, 'app.svg'), + 'name' => $l10n->t('Quick notes') ]; }); } - private function registerCapabilities(): void { - $container = $this->getContainer(); - $container->registerCapability(Capabilities::class); - } - } \ No newline at end of file