mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Initial NC21 support
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* @copyright 2016-2020 Matias De lellis <mati86dl@gmail.com>
|
||||
*
|
||||
* @author 2016 Matias De lellis <mati86dl@gmail.com>
|
||||
*
|
||||
* @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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use OCA\QuickNotes\AppInfo\Application;
|
||||
|
||||
$app = new Application();
|
||||
$app->register();
|
||||
@@ -5,7 +5,7 @@
|
||||
<name>Quick notes</name>
|
||||
<summary>Quick notes with a basic rich text</summary>
|
||||
<description>Quick notes with a basic rich text</description>
|
||||
<version>0.6.3</version>
|
||||
<version>0.6.4</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Matias De lellis</author>
|
||||
<namespace>QuickNotes</namespace>
|
||||
@@ -20,6 +20,6 @@
|
||||
<screenshot>https://raw.githubusercontent.com/matiasdelellis/quicknotes/master/doc/quicknotes-attachments.jpeg</screenshot>
|
||||
<screenshot>https://raw.githubusercontent.com/matiasdelellis/quicknotes/master/doc/quicknotes-shared-note.jpeg</screenshot>
|
||||
<dependencies>
|
||||
<nextcloud min-version="18" max-version="20"/>
|
||||
<nextcloud min-version="20" max-version="20"/>
|
||||
</dependencies>
|
||||
</info>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* @copyright 2016-2020 Matias De lellis <mati86dl@gmail.com>
|
||||
* @copyright 2016-2021 Matias De lellis <mati86dl@gmail.com>
|
||||
*
|
||||
* @author 2016 Matias De lellis <mati86dl@gmail.com>
|
||||
*
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user