From 65c381abee053d4f6e4f8fc19984b89c90721217 Mon Sep 17 00:00:00 2001
From: Andrey Borysenko <andrey18106x@gmail.com>
Date: Tue, 1 Jul 2025 23:40:31 +0300
Subject: feat(settings): Deploy daemon selection support during ExApp
 installation

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
---
 .../src/components/AppAPI/DaemonSelectionModal.vue | 70 ++++++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 apps/settings/src/components/AppAPI/DaemonSelectionModal.vue

(limited to 'apps/settings/src/components/AppAPI/DaemonSelectionModal.vue')

diff --git a/apps/settings/src/components/AppAPI/DaemonSelectionModal.vue b/apps/settings/src/components/AppAPI/DaemonSelectionModal.vue
new file mode 100644
index 00000000000..2f77cd8a992
--- /dev/null
+++ b/apps/settings/src/components/AppAPI/DaemonSelectionModal.vue
@@ -0,0 +1,70 @@
+<template>
+	<div class="daemon-selection-modal">
+		<NcModal :show="show"
+			:name="t('settings', 'Daemon selection')"
+			size="normal"
+			@close="closeModal">
+			<div class="select-modal-body">
+				<h3>{{ t('settings', 'Choose Deploy Daemon for {appName}', {appName: app.name }) }}</h3>
+				<DaemonSelectionList :app="app"
+					:deploy-options="deployOptions"
+					@close="closeModal" />
+			</div>
+		</NcModal>
+	</div>
+</template>
+
+<script>
+import NcModal from '@nextcloud/vue/components/NcModal'
+import DaemonSelectionList from './DaemonSelectionList.vue'
+import { useAppsStore } from '../../store/apps-store'
+import { useAppApiStore } from '../../store/app-api-store'
+
+export default {
+	name: 'DaemonSelectionModal',
+	components: {
+		NcModal,
+		DaemonSelectionList,
+	},
+	props: {
+		show: {
+			type: Boolean,
+			required: true,
+			default: false,
+		},
+		app: {
+			type: Object,
+			required: true,
+		},
+		deployOptions: {
+			type: Object,
+			required: false,
+			default: () => ({}),
+		},
+	},
+	setup() {
+		const store = useAppsStore()
+		const appApiStore = useAppApiStore()
+
+		return {
+			store,
+			appApiStore,
+		}
+	},
+	data() {
+		return {
+			selectDaemonModal: false,
+		}
+	},
+	methods: {
+		closeModal() {
+			this.$emit('update:show', false)
+		},
+	},
+}
+</script>
+<style scoped>
+.select-modal-body h3 {
+	text-align: center;
+}
+</style>
-- 
cgit v1.2.3

