Line data Source code
1 : <template>
2 2009 : <component :is="selectRunButton()" />
3 : </template>
4 :
5 : <script setup lang="ts">
6 : import { defineAsyncComponent } from 'vue'
7 :
8 : import { isCloud } from '@/platform/distribution/types'
9 :
10 2009 : const CloudRunButtonWrapper = defineAsyncComponent(
11 : () => import('./CloudRunButtonWrapper.vue')
12 : )
13 2009 : const ComfyQueueButton = defineAsyncComponent(
14 : () => import('./ComfyQueueButton.vue')
15 : )
16 2009 : const LocalRunButtonWrapper = defineAsyncComponent(
17 : () => import('./LocalRunButtonWrapper.vue')
18 : )
19 :
20 2009 : function selectRunButton() {
21 2009 : if (!isCloud) return LocalRunButtonWrapper
22 : return window.__CONFIG__?.subscription_required
23 : ? CloudRunButtonWrapper
24 : : ComfyQueueButton
25 : }
26 : </script>
|