4646 <span slot =" noResult" >{{ t('settings', 'No results') }}</span >
4747 </NcSelect >
4848 </div >
49- <div class =" app-details__actions-manage" >
50- <input
51- v-if =" app.update"
52- class =" update primary"
53- type =" button"
54- :value =" t('settings', 'Update to {version}', { version: app.update })"
55- :disabled =" installing || isLoading || isManualInstall"
56- @click =" update(app.id)" >
57- <input
58- v-if =" app.canUnInstall"
59- class =" uninstall"
60- type =" button"
61- :value =" t('settings', 'Remove')"
62- :disabled =" installing || isLoading"
63- @click =" remove(app.id, removeData)" >
64- <input
65- v-if =" app.active"
66- class =" enable"
67- type =" button"
68- :value =" disableButtonText"
69- :disabled =" installing || isLoading || isInitializing || isDeploying"
70- @click =" disable(app.id)" >
71- <input
72- v-if =" !app.active && (app.canInstall || app.isCompatible)"
73- :title =" enableButtonTooltip"
74- :aria-label =" enableButtonTooltip"
75- class =" enable primary"
76- type =" button"
77- :value =" enableButtonText"
78- :disabled =" !app.canInstall || installing || isLoading || !defaultDeployDaemonAccessible || isInitializing || isDeploying"
79- @click =" enableButtonAction" >
80- <input
81- v-else-if =" !app.active && !app.canInstall"
82- :title =" forceEnableButtonTooltip"
83- :aria-label =" forceEnableButtonTooltip"
84- class =" enable force"
85- type =" button"
86- :value =" forceEnableButtonText"
87- :disabled =" installing || isLoading"
88- @click =" forceEnable(app.id)" >
89- <NcButton
90- v-if =" app?.app_api && (app.canInstall || app.isCompatible)"
91- :aria-label =" t('settings', 'Advanced deploy options')"
92- variant =" secondary"
93- @click =" () => showDeployOptionsModal = true" >
94- <template #icon >
95- <NcIconSvgWrapper :path =" mdiToyBrickPlusOutline" />
96- </template >
97- {{ t('settings', 'Deploy options') }}
98- </NcButton >
99- </div >
100- <p v-if =" !defaultDeployDaemonAccessible" class =" warning" >
101- {{ t('settings', 'Default Deploy daemon is not accessible') }}
102- </p >
103- <NcCheckboxRadioSwitch
104- v-if =" app.canUnInstall"
105- :model-value =" removeData"
106- :disabled =" installing || isLoading || !defaultDeployDaemonAccessible"
107- @update:modelValue =" toggleRemoveData" >
108- {{ t('settings', 'Delete data on remove') }}
109- </NcCheckboxRadioSwitch >
11049 </div >
11150
11251 <ul class =" app-details__dependencies" >
208147 </div >
209148 </div >
210149
211- <AppDeployOptionsModal
212- v-if =" app?.app_api"
213- :show.sync =" showDeployOptionsModal"
214- :app =" app" />
215150 <DaemonSelectionDialog
216151 v-if =" app?.app_api"
217152 :show.sync =" showSelectDaemonModal"
222157</template >
223158
224159<script >
225- import { mdiBugOutline , mdiFeatureSearchOutline , mdiStar , mdiTextBoxOutline , mdiTooltipQuestionOutline , mdiToyBrickPlusOutline } from ' @mdi/js'
160+ import { mdiBugOutline , mdiFeatureSearchOutline , mdiStar , mdiTextBoxOutline , mdiTooltipQuestionOutline } from ' @mdi/js'
226161import { subscribe , unsubscribe } from ' @nextcloud/event-bus'
227162import NcAppSidebarTab from ' @nextcloud/vue/components/NcAppSidebarTab'
228163import NcButton from ' @nextcloud/vue/components/NcButton'
229- import NcCheckboxRadioSwitch from ' @nextcloud/vue/components/NcCheckboxRadioSwitch'
230164import NcDateTime from ' @nextcloud/vue/components/NcDateTime'
231165import NcIconSvgWrapper from ' @nextcloud/vue/components/NcIconSvgWrapper'
232166import NcSelect from ' @nextcloud/vue/components/NcSelect'
233167import DaemonSelectionDialog from ' ../AppAPI/DaemonSelectionDialog.vue'
234- import AppDeployOptionsModal from ' ./AppDeployOptionsModal.vue'
235168import AppManagement from ' ../../mixins/AppManagement.js'
236169import { useAppApiStore } from ' ../../store/app-api-store.js'
237170import { useAppsStore } from ' ../../store/apps-store.js'
@@ -245,8 +178,6 @@ export default {
245178 NcDateTime,
246179 NcIconSvgWrapper,
247180 NcSelect,
248- NcCheckboxRadioSwitch,
249- AppDeployOptionsModal,
250181 DaemonSelectionDialog,
251182 },
252183
@@ -274,15 +205,12 @@ export default {
274205 mdiStar,
275206 mdiTextBoxOutline,
276207 mdiTooltipQuestionOutline,
277- mdiToyBrickPlusOutline,
278208 }
279209 },
280210
281211 data () {
282212 return {
283213 groupCheckedAppsData: false ,
284- removeData: false ,
285- showDeployOptionsModal: false ,
286214 showSelectDaemonModal: false ,
287215 deployOptions: null ,
288216 }
@@ -409,29 +337,10 @@ export default {
409337 },
410338
411339 methods: {
412- toggleRemoveData () {
413- this .removeData = ! this .removeData
414- },
415-
416340 showSelectionModal (deployOptions = null ) {
417341 this .deployOptions = deployOptions
418342 this .showSelectDaemonModal = true
419343 },
420-
421- async enableButtonAction () {
422- if (! this .app ? .app_api ) {
423- this .enable (this .app .id )
424- return
425- }
426- await this .appApiStore .fetchDockerDaemons ()
427- if (this .appApiStore .dockerDaemons .length === 1 && this .app .needsDownload ) {
428- this .enable (this .app .id , this .appApiStore .dockerDaemons [0 ])
429- } else if (this .app .needsDownload ) {
430- this .showSelectionModal ()
431- } else {
432- this .enable (this .app .id , this .app .daemon )
433- }
434- },
435344 },
436345}
437346< / script>
@@ -440,21 +349,6 @@ export default {
440349.app - details {
441350 padding: 20px ;
442351
443- & __actions {
444- // app management
445- & - manage {
446- // if too many, shrink them and ellipsis
447- display: flex;
448- align- items: center;
449- input {
450- flex: 0 1 auto;
451- min- width: 0 ;
452- text- overflow: ellipsis;
453- white- space: nowrap;
454- overflow: hidden;
455- }
456- }
457- }
458352 & __authors {
459353 color: var (-- color- text- maxcontrast);
460354 }
@@ -498,19 +392,6 @@ export default {
498392 }
499393}
500394
501- .force {
502- color: var (-- color- text- error);
503- border- color: var (-- color- border- error);
504- background: var (-- color- main- background);
505- }
506-
507- .force : hover,
508- .force : active {
509- color: var (-- color- main- background);
510- border- color: var (-- color- border- error) ! important;
511- background: var (-- color- error);
512- }
513-
514395.missing - dependencies {
515396 list- style: initial;
516397 list- style- type: initial;
0 commit comments