1414 <component :is =" dataItemTag"
1515 class =" app-image app-image-icon"
1616 :headers =" getDataItemHeaders(`app-table-col-icon`)" >
17- <div v-if =" (listView && !app.preview) || (!listView && !screenshotLoaded)" class =" icon-settings-dark" />
17+ <div v-if =" !app?.app_api && shouldDisplayDefaultIcon" class =" icon-settings-dark" />
18+ <NcIconSvgWrapper v-else-if =" app .app_api && shouldDisplayDefaultIcon "
19+ :path =" mdiCogOutline "
20+ :size =" listView ? 24 : 48 "
21+ style =" min-width : auto ; min-height : auto ; height : 100% ;" />
1822
19- <svg v-else-if =" listView && app.preview"
23+ <svg v-else-if =" listView && app.preview && !app.app_api "
2024 width =" 32"
2125 height =" 32"
2226 viewBox =" 0 0 32 32" >
7175 <div v-if =" app.error" class =" warning" >
7276 {{ app.error }}
7377 </div >
74- <div v-if =" isLoading" class =" icon icon-loading-small" />
78+ <div v-if =" isLoading || isInitializing " class =" icon icon-loading-small" />
7579 <NcButton v-if =" app .update "
7680 type="primary"
77- :disabled =" installing || isLoading "
81+ :disabled =" installing || isLoading || ! defaultDeployDaemonAccessible || isManualInstall "
82+ :title =" updateButtonText "
7883 @click .stop =" update (app .id )" >
7984 {{ t('settings', 'Update to {update}', {update:app.update}) }}
8085 </NcButton >
8691 {{ t('settings', 'Remove') }}
8792 </NcButton >
8893 <NcButton v-if =" app .active "
89- :disabled =" installing || isLoading "
94+ :disabled =" installing || isLoading || isInitializing || isDeploying "
9095 @click .stop =" disable (app .id )" >
91- {{ t('settings','Disable') }}
96+ {{ disableButtonText }}
9297 </NcButton >
9398 <NcButton v-if =" ! app .active && (app .canInstall || app .isCompatible )"
9499 :title =" enableButtonTooltip "
95100 :aria-label =" enableButtonTooltip "
96101 type="primary"
97- :disabled =" ! app .canInstall || installing || isLoading "
102+ :disabled =" ! app .canInstall || installing || isLoading || ! defaultDeployDaemonAccessible || isInitializing || isDeploying "
98103 @click .stop =" enable (app .id )" >
99104 {{ enableButtonText }}
100105 </NcButton >
101106 <NcButton v-else-if =" ! app .active "
102107 :title =" forceEnableButtonTooltip "
103108 :aria-label =" forceEnableButtonTooltip "
104109 type="secondary"
105- :disabled =" installing || isLoading "
110+ :disabled =" installing || isLoading || ! defaultDeployDaemonAccessible "
106111 @click .stop =" forceEnable (app .id )" >
107112 {{ forceEnableButtonText }}
108113 </NcButton >
@@ -118,13 +123,17 @@ import AppLevelBadge from './AppLevelBadge.vue'
118123import AppManagement from ' ../../mixins/AppManagement.js'
119124import SvgFilterMixin from ' ../SvgFilterMixin.vue'
120125import NcButton from ' @nextcloud/vue/dist/Components/NcButton.js'
126+ import NcIconSvgWrapper from ' @nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
127+ import { mdiCogOutline } from ' @mdi/js'
128+ import { useAppApiStore } from ' ../../store/app-api-store.ts'
121129
122130export default {
123131 name: ' AppItem' ,
124132 components: {
125133 AppLevelBadge,
126134 AppScore,
127135 NcButton,
136+ NcIconSvgWrapper,
128137 },
129138 mixins: [AppManagement, SvgFilterMixin],
130139 props: {
@@ -155,7 +164,13 @@ export default {
155164 },
156165 setup () {
157166 const store = useAppsStore ()
158- return { store }
167+ const appApiStore = useAppApiStore ()
168+
169+ return {
170+ store,
171+ appApiStore,
172+ mdiCogOutline,
173+ }
159174 },
160175 data () {
161176 return {
@@ -174,6 +189,9 @@ export default {
174189 withSidebar () {
175190 return !! this .$route .params .id
176191 },
192+ shouldDisplayDefaultIcon () {
193+ return (this .listView && ! this .app .preview ) || (! this .listView && ! this .screenshotLoaded )
194+ },
177195 },
178196 watch: {
179197 ' $route.params.id' (id) {
0 commit comments