From bf15699265533b4cdb7eb76c83f8606e3681cd9e Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 24 Oct 2022 21:30:43 -0700 Subject: [PATCH] Add start page (fix #109) --- lib/Controller/ApiController.php | 3 + lib/Controller/PageController.php | 8 +- src/App.vue | 26 +++-- src/assets/banner.svg | 84 ++++++++++++++ src/components/FirstStart.vue | 176 ++++++++++++++++++++++++++++++ 5 files changed, 285 insertions(+), 12 deletions(-) create mode 100644 src/assets/banner.svg create mode 100644 src/components/FirstStart.vue diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index 9d9513e4..a2f8854f 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -716,10 +716,13 @@ class ApiController extends Controller try { $folder = null; $folderPath = $this->request->getParam('folder'); + $forcedTimelinePath = $this->request->getParam('timelinePath'); $userFolder = $this->rootFolder->getUserFolder($uid); if (null !== $folderPath) { $folder = $userFolder->get($folderPath); + } elseif (null !== $forcedTimelinePath) { + $folder = $userFolder->get($forcedTimelinePath); } else { $configPath = Exif::removeExtraSlash(Exif::getPhotosPath($this->config, $uid)); $folder = $userFolder->get($configPath); diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index d2074e03..07cf650d 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -65,8 +65,12 @@ class PageController extends Controller // Configuration $uid = $user->getUid(); - $timelinePath = \OCA\Memories\Util::getPhotosPath($this->config, $uid); - $this->initialState->provideInitialState('timelinePath', $timelinePath); + $this->initialState->provideInitialState('timelinePath', $this->config->getUserValue( + $uid, + Application::APPNAME, + 'timelinePath', + 'EMPTY' + )); $this->initialState->provideInitialState('foldersPath', $this->config->getUserValue( $uid, Application::APPNAME, diff --git a/src/App.vue b/src/App.vue index 54e0a8f5..ffab6cc3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,9 @@