diff --git a/apps/settings/src/app-types.ts b/apps/settings/src/app-types.ts index 77a1b6797f3..3ce2aa1648c 100644 --- a/apps/settings/src/app-types.ts +++ b/apps/settings/src/app-types.ts @@ -53,13 +53,6 @@ export interface IAppstoreApp { releases?: IAppstoreAppRelease[] } -export interface IAppstoreExApp extends IAppstoreApp { - daemon: IDeployDaemon, - status: IExAppStatus, - error: string, - app_api: boolean, -} - export interface IComputeDevice { id: string, label: string, @@ -90,3 +83,10 @@ export interface IExAppStatus { init_start_time: number, type: string, } + +export interface IAppstoreExApp extends IAppstoreApp { + daemon: IDeployDaemon, + status: IExAppStatus, + error: string, + app_api: boolean, +} diff --git a/apps/settings/src/components/AppList.vue b/apps/settings/src/components/AppList.vue index 6a43e55dd47..6062e61d906 100644 --- a/apps/settings/src/components/AppList.vue +++ b/apps/settings/src/components/AppList.vue @@ -168,7 +168,10 @@ export default { return this.apps.filter(app => app.update).length }, loading() { - return this.$store.getters.loading('list') + if (!this.$store.getters['appApiApps/isAppApiEnabled']) { + return this.$store.getters.loading('list') + } + return this.$store.getters.loading('list') || this.$store.getters['appApiApps/loading']('list') }, hasPendingUpdate() { return this.apps.filter(app => app.update).length > 0 @@ -177,7 +180,9 @@ export default { return this.hasPendingUpdate && this.useListView }, apps() { - const apps = this.$store.getters.getAllApps + // Exclude ExApps from the list if AppAPI is disabled + const exApps = this.$store.getters.isAppApiEnabled ? this.$store.getters['appApiApps/getAllApps'] : [] + const apps = [...this.$store.getters.getAllApps, ...exApps] .filter(app => app.name.toLowerCase().search(this.search.toLowerCase()) !== -1) .sort(function(a, b) { const sortStringA = '' + (a.active ? 0 : 1) + (a.update ? 0 : 1) + a.name @@ -304,12 +309,14 @@ export default { const limit = pLimit(1) this.apps .filter(app => app.update) - .map((app) => limit(() => { - if (app?.app_api) { - this.$store.dispatch('app_api_apps/updateApp', { appId: app.id }) - } - this.update(app.id) - })) + .map(app => limit(() => { + let type = 'updateApp' + if (app?.app_api) { + type = 'app_api_apps/updateApp' + } + this.$store.dispatch(type, { appId: app.id }) + }), + ) }, }, } diff --git a/apps/settings/src/components/AppList/AppDaemonBadge.vue b/apps/settings/src/components/AppList/AppDaemonBadge.vue index 1a46d3c7ebb..1a5cd5bbea3 100644 --- a/apps/settings/src/components/AppList/AppDaemonBadge.vue +++ b/apps/settings/src/components/AppList/AppDaemonBadge.vue @@ -16,7 +16,7 @@ import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js import { mdiFileChart } from '@mdi/js' import type { IDeployDaemon } from '../../app-types.ts' -const props = defineProps<{ +defineProps<{ daemon?: IDeployDaemon }>() diff --git a/apps/settings/src/components/AppList/AppItem.vue b/apps/settings/src/components/AppList/AppItem.vue index f44ff3a3a7d..d7c4d1bdc71 100644 --- a/apps/settings/src/components/AppList/AppItem.vue +++ b/apps/settings/src/components/AppList/AppItem.vue @@ -16,9 +16,9 @@ :headers="getDataItemHeaders(`app-table-col-icon`)">