diff --git a/js/photos-dashboard.js b/js/photos-dashboard.js index 508f8db4..fab07f15 100644 Binary files a/js/photos-dashboard.js and b/js/photos-dashboard.js differ diff --git a/js/photos-dashboard.js.map b/js/photos-dashboard.js.map index 7ca67c40..2084cd42 100644 Binary files a/js/photos-dashboard.js.map and b/js/photos-dashboard.js.map differ diff --git a/js/photos-main.js b/js/photos-main.js index 6b3e1557..e14cb18f 100644 Binary files a/js/photos-main.js and b/js/photos-main.js differ diff --git a/js/photos-main.js.map b/js/photos-main.js.map index 84c6eb6e..bc8a3378 100644 Binary files a/js/photos-main.js.map and b/js/photos-main.js.map differ diff --git a/js/photos-public.js b/js/photos-public.js index ad3144d8..4f0898b0 100644 Binary files a/js/photos-public.js and b/js/photos-public.js differ diff --git a/js/photos-public.js.map b/js/photos-public.js.map index 4c59767f..3beb948c 100644 Binary files a/js/photos-public.js.map and b/js/photos-public.js.map differ diff --git a/js/photos-sidebar.js b/js/photos-sidebar.js index e06cd8c6..31c07291 100644 Binary files a/js/photos-sidebar.js and b/js/photos-sidebar.js differ diff --git a/js/photos-sidebar.js.map b/js/photos-sidebar.js.map index 2139a29d..48371424 100644 Binary files a/js/photos-sidebar.js.map and b/js/photos-sidebar.js.map differ diff --git a/js/photos-vendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-28e9d8de_mjs.js b/js/photos-vendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-28e9d8de_mjs.js index 464cf5e3..adf1cb00 100644 Binary files a/js/photos-vendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-28e9d8de_mjs.js and b/js/photos-vendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-28e9d8de_mjs.js differ diff --git a/js/photos-vendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-28e9d8de_mjs.js.map b/js/photos-vendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-28e9d8de_mjs.js.map index 94a4ed2a..349718f6 100644 Binary files a/js/photos-vendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-28e9d8de_mjs.js.map and b/js/photos-vendors-node_modules_nextcloud_upload_dist_chunks_ConflictPicker-28e9d8de_mjs.js.map differ diff --git a/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js b/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js index d1293c11..bd41423f 100644 Binary files a/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js and b/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js differ diff --git a/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js.map b/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js.map index 73ad8a37..8ac7aaee 100644 Binary files a/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js.map and b/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js.map differ diff --git a/js/photos-vendors-node_modules_vue-material-design-icons_ArrowLeft_vue-node_modules_nextcloud_upload_di-f407f6.js b/js/photos-vendors-node_modules_vue-material-design-icons_ArrowLeft_vue-node_modules_nextcloud_upload_di-f407f6.js index 9b506570..6483c7f5 100644 Binary files a/js/photos-vendors-node_modules_vue-material-design-icons_ArrowLeft_vue-node_modules_nextcloud_upload_di-f407f6.js and b/js/photos-vendors-node_modules_vue-material-design-icons_ArrowLeft_vue-node_modules_nextcloud_upload_di-f407f6.js differ diff --git a/js/photos-vendors-node_modules_vue-material-design-icons_ArrowLeft_vue-node_modules_nextcloud_upload_di-f407f6.js.map b/js/photos-vendors-node_modules_vue-material-design-icons_ArrowLeft_vue-node_modules_nextcloud_upload_di-f407f6.js.map index c2fafff7..44b3412a 100644 Binary files a/js/photos-vendors-node_modules_vue-material-design-icons_ArrowLeft_vue-node_modules_nextcloud_upload_di-f407f6.js.map and b/js/photos-vendors-node_modules_vue-material-design-icons_ArrowLeft_vue-node_modules_nextcloud_upload_di-f407f6.js.map differ diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 19c511d0..7c8cff72 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -5,6 +5,7 @@ declare(strict_types=1); * @copyright Copyright (c) 2019 John Molakvoæ * * @author John Molakvoæ + * @author Thomas Citharel * * @license AGPL-3.0-or-later * @@ -113,6 +114,7 @@ class PageController extends Controller { $this->initialState->provideInitialState('recognize', $this->appManager->isEnabledForUser('recognize') === true); $this->initialState->provideInitialState('systemtags', $this->appManager->isEnabledForUser('systemtags') === true); $this->initialState->provideInitialState('showPeopleMenuEntry', $this->config->getAppValue('photos', 'showPeopleMenuEntry', 'true') === 'true'); + $this->initialState->provideInitialState('appStoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true)); // Provide user config foreach (array_keys(UserConfigService::DEFAULT_CONFIGS) as $key) { diff --git a/src/Photos.vue b/src/Photos.vue index 4faa27ea..add3a2fa 100644 --- a/src/Photos.vue +++ b/src/Photos.vue @@ -2,6 +2,7 @@ - @copyright Copyright (c) 2019 John Molakvoæ - - @author John Molakvoæ + - @author Thomas Citharel - - @license AGPL-3.0-or-later - @@ -158,6 +159,7 @@ import videoplaceholder from './assets/video.svg' import areTagsInstalled from './services/AreTagsInstalled.js' import isMapsInstalled from './services/IsMapsInstalled.js' import isRecognizeInstalled from './services/IsRecognizeInstalled.js' +import isAppStoreEnabled from './services/IsAppStoreEnabled.js' import logger from './services/logger.js' export default { @@ -193,10 +195,10 @@ export default { showLocationMenuEntry: getCurrentUser() === null ? false - : getCurrentUser().isAdmin || isMapsInstalled, + : (getCurrentUser().isAdmin && isAppStoreEnabled) || isMapsInstalled, showPeopleMenuEntry: getCurrentUser() === null ? false - : (getCurrentUser().isAdmin && loadState('photos', 'showPeopleMenuEntry', true)) || isRecognizeInstalled, + : (getCurrentUser().isAdmin && loadState('photos', 'showPeopleMenuEntry', true) && isAppStoreEnabled) || isRecognizeInstalled, openedSettings: false, } diff --git a/src/services/IsAppStoreEnabled.js b/src/services/IsAppStoreEnabled.js new file mode 100644 index 00000000..48821e5d --- /dev/null +++ b/src/services/IsAppStoreEnabled.js @@ -0,0 +1,26 @@ +/** + * @copyright Copyright (c) 2024 Thomas Citharel + * + * @author Thomas Citharel + * + * @license AGPL-3.0-or-later + * + * 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 . + * + */ + +import { loadState } from '@nextcloud/initial-state' + +const appStoreEnabled = loadState('photos', 'appStoreEnabled') +export default appStoreEnabled