diff --git a/appinfo/routes.php b/appinfo/routes.php index 926c21d5..89b1f481 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -21,7 +21,7 @@ return [ ['name' => 'Page#videos', 'url' => '/videos', 'verb' => 'GET'], ['name' => 'Page#archive', 'url' => '/archive', 'verb' => 'GET'], ['name' => 'Page#thisday', 'url' => '/thisday', 'verb' => 'GET'], - ['name' => 'Page#locations', 'url' => '/locations', 'verb' => 'GET'], + ['name' => 'Page#map', 'url' => '/map', 'verb' => 'GET'], // Routes with params w(['name' => 'Page#folder', 'url' => '/folders/{path}', 'verb' => 'GET'], 'path'), @@ -66,6 +66,8 @@ return [ ['name' => 'Places#places', 'url' => '/api/places', 'verb' => 'GET'], ['name' => 'Places#preview', 'url' => '/api/places/preview/{id}', 'verb' => 'GET'], + ['name' => 'Map#clusters', 'url' => '/api/map/clusters', 'verb' => 'GET'], + ['name' => 'Archive#archive', 'url' => '/api/archive/{id}', 'verb' => 'PATCH'], ['name' => 'Image#preview', 'url' => '/api/image/preview/{id}', 'verb' => 'GET'], @@ -81,8 +83,6 @@ return [ ['name' => 'Download#file', 'url' => '/api/download/{handle}', 'verb' => 'GET'], ['name' => 'Download#one', 'url' => '/api/stream/{fileid}', 'verb' => 'GET'], - ['name' => 'Location#clusters', 'url' => '/api/locations/clusters', 'verb' => 'GET'], - // Config API ['name' => 'Other#setUserConfig', 'url' => '/api/config/{key}', 'verb' => 'PUT'], diff --git a/lib/Controller/LocationController.php b/lib/Controller/MapController.php similarity index 94% rename from lib/Controller/LocationController.php rename to lib/Controller/MapController.php index ea674afa..3470c1b9 100644 --- a/lib/Controller/LocationController.php +++ b/lib/Controller/MapController.php @@ -26,7 +26,7 @@ namespace OCA\Memories\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\JSONResponse; -class LocationController extends ApiBase +class MapController extends ApiBase { /** * @NoAdminRequired @@ -35,13 +35,6 @@ class LocationController extends ApiBase */ public function clusters(): JSONResponse { - // Get the folder to show - try { - $uid = $this->getUID(); - } catch (\Exception $e) { - return new JSONResponse(['message' => $e->getMessage()], Http::STATUS_PRECONDITION_FAILED); - } - // Get the folder to show $root = null; diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index e2ec6b72..365d4296 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -84,7 +84,6 @@ class PageController extends Controller // Apps enabled $this->initialState->provideInitialState('systemtags', true === $this->appManager->isEnabledForUser('systemtags')); - $this->initialState->provideInitialState('maps', true === $this->appManager->isEnabledForUser('maps')); $this->initialState->provideInitialState('recognize', \OCA\Memories\Util::recognizeIsEnabled($this->appManager)); $this->initialState->provideInitialState('facerecognitionInstalled', \OCA\Memories\Util::facerecognitionIsInstalled($this->appManager)); $this->initialState->provideInitialState('facerecognitionEnabled', \OCA\Memories\Util::facerecognitionIsEnabled($this->config, $uid)); @@ -243,7 +242,7 @@ class PageController extends Controller * * @NoCSRFRequired */ - public function locations() + public function map() { return $this->main(); } diff --git a/src/App.vue b/src/App.vue index 1cf69ce9..9a752b77 100644 --- a/src/App.vue +++ b/src/App.vue @@ -151,7 +151,7 @@ export default defineComponent({ }, removeNavGap(): boolean { - return this.$route.name === "locations"; + return this.$route.name === "map"; }, }, @@ -263,23 +263,17 @@ export default defineComponent({ title: t("memories", "Places"), if: this.config_placesGis > 0, }, + { + name: "map", + icon: MapIcon, + title: t("memories", "Map"), + }, { name: "tags", icon: TagsIcon, title: t("memories", "Tags"), if: this.config_tagsEnabled, }, - { - name: "maps", - icon: MapIcon, - title: t("memories", "Maps"), - if: this.config_mapsEnabled, - }, - { - name: "locations", - icon: MapIcon, - title: t("memories", "Locations"), - }, ]; }, diff --git a/src/components/SplitTimeline.vue b/src/components/SplitTimeline.vue index c18856ff..ba22e078 100644 --- a/src/components/SplitTimeline.vue +++ b/src/components/SplitTimeline.vue @@ -12,7 +12,7 @@