From 05c71eb6fc756e7953e3c2a1530fc288aaad06e5 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 26 Jul 2023 22:55:50 +0200 Subject: feat(settings): Show supported apps on app settings if subscribed Signed-off-by: Ferdinand Thiessen Signed-off-by: nextcloud-command --- apps/settings/src/components/AppList.vue | 7 ++++++- apps/settings/src/constants/AppsConstants.js | 1 + apps/settings/src/views/Apps.vue | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'apps/settings') diff --git a/apps/settings/src/components/AppList.vue b/apps/settings/src/components/AppList.vue index 234fde088e1..1ce1e896558 100644 --- a/apps/settings/src/components/AppList.vue +++ b/apps/settings/src/components/AppList.vue @@ -154,7 +154,12 @@ export default { if (this.category === 'updates') { return apps.filter(app => app.update) } + if (this.category === 'supported') { + // For customers of the Nextcloud GmbH the app level will be set to `300` for apps that are supported in their subscription + return apps.filter(app => app.level === 300) + } if (this.category === 'featured') { + // An app level of `200` will be set for apps featured on the app store return apps.filter(app => app.level === 200) } // filter app store categories @@ -190,7 +195,7 @@ export default { return !this.useListView && !this.useBundleView }, useListView() { - return (this.category === 'installed' || this.category === 'enabled' || this.category === 'disabled' || this.category === 'updates' || this.category === 'featured') + return (this.category === 'installed' || this.category === 'enabled' || this.category === 'disabled' || this.category === 'updates' || this.category === 'featured' || this.category === 'supported') }, useBundleView() { return (this.category === 'app-bundles') diff --git a/apps/settings/src/constants/AppsConstants.js b/apps/settings/src/constants/AppsConstants.js index 5ede6334231..aec06aded3a 100644 --- a/apps/settings/src/constants/AppsConstants.js +++ b/apps/settings/src/constants/AppsConstants.js @@ -29,4 +29,5 @@ export const APPS_SECTION_ENUM = Object.freeze({ updates: t('settings', 'Updates'), 'app-bundles': t('settings', 'App bundles'), featured: t('settings', 'Featured apps'), + supported: t('settings', 'Supported apps'), // From subscription }) diff --git a/apps/settings/src/views/Apps.vue b/apps/settings/src/views/Apps.vue index f9f1023f928..6129bbabaad 100644 --- a/apps/settings/src/views/Apps.vue +++ b/apps/settings/src/views/Apps.vue @@ -50,6 +50,14 @@ {{ updateCount }} + + + release.translations.en.changelog }, + /** + * Check if the current instance has a support subscription from the Nextcloud GmbH + */ + isSubscribed() { + // For customers of the Nextcloud GmbH the app level will be set to `300` for apps that are supported in their subscription + return this.apps.some(app => app.level === 300) + }, }, watch: { -- cgit v1.2.3