From 411861c7789bdefc3cd3c51c0e89dbcde6e08086 Mon Sep 17 00:00:00 2001 From: Sebastian Steinmetz <462714+steiny2k@users.noreply.github.com> Date: Wed, 29 Apr 2020 09:57:56 +0200 Subject: Allow heic images in the photos overview Signed-off-by: Sebastian Steinmetz <462714+steiny2k@users.noreply.github.com> --- lib/AppInfo/Application.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 8125d4d5..1fc68c0d 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -33,6 +33,7 @@ class Application extends App { const MIMES = [ // 'image/png', // too rarely used for photos 'image/jpeg', + 'image/heic', // 'image/gif', // too rarely used for photos // 'image/x-xbitmap', // too rarely used for photos // 'image/bmp', // too rarely used for photos -- cgit v1.2.3 From e88fcd0854fd34fa0614a1d36ea0e9606ebca35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Mon, 13 Jul 2020 12:24:49 +0200 Subject: Bump dist & fix script loading name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- lib/Controller/PageController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index b4b0e99a..ef33403c 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -79,7 +79,7 @@ class PageController extends Controller { $this->initialStateService->provideInitialState($this->appName, 'mimes', Application::MIMES); $this->initialStateService->provideInitialState($this->appName, 'maps', $this->appManager->isEnabledForUser('maps') === true); - Util::addScript($this->appName, 'photos'); + Util::addScript($this->appName, 'photos-main'); Util::addStyle($this->appName, 'icons'); $response = new TemplateResponse($this->appName, 'main'); -- cgit v1.2.3 From b8f714a62a2d16205f24edc4760cb20a572f1f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Mon, 13 Jul 2020 12:30:53 +0200 Subject: Add php cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- lib/AppInfo/Application.php | 6 +++--- lib/Controller/AlbumsController.php | 3 ++- lib/Controller/PageController.php | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 8125d4d5..d6906d20 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -1,4 +1,5 @@ @@ -27,10 +28,9 @@ namespace OCA\Photos\AppInfo; use OCP\AppFramework\App; class Application extends App { + public const APP_ID = 'photos'; - const APP_ID = 'photos'; - - const MIMES = [ + public const MIMES = [ // 'image/png', // too rarely used for photos 'image/jpeg', // 'image/gif', // too rarely used for photos diff --git a/lib/Controller/AlbumsController.php b/lib/Controller/AlbumsController.php index fc3044b5..648ea0b2 100644 --- a/lib/Controller/AlbumsController.php +++ b/lib/Controller/AlbumsController.php @@ -1,4 +1,5 @@ @@ -109,7 +110,7 @@ class AlbumsController extends Controller { return $result; } - private function scanCurrentFolder(Folder $folder, bool $shared): iterable { + private function scanCurrentFolder(Folder $folder, bool $shared): iterable { $nodes = $folder->getDirectoryListing(); // add current folder to iterable set diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index ef33403c..effb3e07 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -1,4 +1,5 @@ @@ -37,7 +38,6 @@ use OCP\IConfig; use OCP\App\IAppManager; class PageController extends Controller { - protected $appName; /** @var IEventDispatcher */ @@ -62,7 +62,6 @@ class PageController extends Controller { $this->eventDispatcher = $eventDispatcher; $this->initialStateService = $initialStateService; $this->config = $config; - } /** -- cgit v1.2.3 From f8ba6fd428e411164a61da6efb13ef509fd035b7 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 14 Jul 2020 04:25:56 +0200 Subject: Use IBootstrap for the app Signed-off-by: Morris Jobke --- lib/AppInfo/Application.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index d6906d20..4b59bd61 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -26,8 +26,11 @@ declare(strict_types=1); namespace OCA\Photos\AppInfo; use OCP\AppFramework\App; +use OCP\AppFramework\Bootstrap\IBootContext; +use OCP\AppFramework\Bootstrap\IBootstrap; +use OCP\AppFramework\Bootstrap\IRegistrationContext; -class Application extends App { +class Application extends App implements IBootstrap { public const APP_ID = 'photos'; public const MIMES = [ @@ -49,4 +52,10 @@ class Application extends App { public function __construct() { parent::__construct(self::APP_ID); } + + public function register(IRegistrationContext $context): void { + } + + public function boot(IBootContext $context): void { + } } -- cgit v1.2.3 From 92dcc4d93cbb5b6e58b436f00406aa0751dc02e7 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 24 Jul 2020 08:37:42 +0200 Subject: Show groupfolders in shared folders Signed-off-by: Roeland Jago Douma --- lib/Controller/AlbumsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Controller/AlbumsController.php b/lib/Controller/AlbumsController.php index 648ea0b2..d047474b 100644 --- a/lib/Controller/AlbumsController.php +++ b/lib/Controller/AlbumsController.php @@ -99,7 +99,6 @@ class AlbumsController extends Controller { 'etag' => $node->getEtag(), 'fileid' => $node->getId(), 'filename' => $path, - 'etag' => $node->getEtag(), 'lastmod' => $node->getMTime(), 'mime' => $node->getMimetype(), 'size' => $node->getSize(), @@ -136,7 +135,8 @@ class AlbumsController extends Controller { } private function isShared(Node $node): bool { - return $node->getStorage()->instanceOfStorage(SharedStorage::class); + return $node->getStorage()->instanceOfStorage(SharedStorage::class) || + $node->getStorage()->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class); } private function scanFolder(Folder $folder, int $depth, bool $shared): bool { -- cgit v1.2.3