Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Electron] Migrate custom nodes #1892

Merged
merged 7 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/>
<GlobalDialog />
<BlockUI full-screen :blocked="isLoading" />
<Toast />
</template>

<script setup lang="ts">
Expand All @@ -16,8 +17,11 @@ import BlockUI from 'primevue/blockui'
import ProgressSpinner from 'primevue/progressspinner'
import GlobalDialog from '@/components/dialog/GlobalDialog.vue'
import { useEventListener } from '@vueuse/core'
import { isElectron, showNativeMenu } from './utils/envUtil'
import { useToast } from 'primevue/usetoast'
import Toast, { ToastMessageOptions } from 'primevue/toast'
import { isElectron, electronAPI, showNativeMenu } from './utils/envUtil'

const toast = useToast()
const workspaceStore = useWorkspaceStore()
const isLoading = computed<boolean>(() => workspaceStore.spinner)
const handleKey = (e: KeyboardEvent) => {
Expand All @@ -42,6 +46,12 @@ onMounted(() => {
console.log('ComfyUI Front-end version:', config.app_version)

if (isElectron()) {
const electron = electronAPI()
electron['onShowToast']((config: ToastMessageOptions) => {
toast.add(config)
})
electron['loaded']()

document.addEventListener('contextmenu', showContextMenu)
}
})
Expand Down
13 changes: 0 additions & 13 deletions src/components/install/MigrationPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@
</p>
</div>
</div>
<div class="flex items-center gap-3 p-2 rounded cursor-not-allowed">
<Checkbox disabled :binary="true" />
<div>
<label class="text-neutral-200 font-medium">
{{ $t('install.customNodes') }}
<Tag severity="secondary"> {{ $t('g.comingSoon') }}... </Tag>
</label>
<p class="text-sm text-neutral-400 my-1">
{{ $t('install.customNodesDescription') }}
</p>
</div>
</div>
</div>
</div>

Expand All @@ -82,7 +70,6 @@
<script setup lang="ts">
import { ref, computed, watchEffect } from 'vue'
import { electronAPI } from '@/utils/envUtil'
import Tag from 'primevue/tag'
import InputText from 'primevue/inputtext'
import Button from 'primevue/button'
import Checkbox from 'primevue/checkbox'
Expand Down
4 changes: 2 additions & 2 deletions src/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
}
},
"customNodes": "Custom Nodes",
"customNodesDescription": "Reference custom node files from existing ComfyUI installations and install their dependencies."
"customNodesDescription": "Reinstall custom nodes from existing ComfyUI installations."
},
"serverStart": {
"reinstall": "Reinstall",
Expand Down Expand Up @@ -948,4 +948,4 @@
"VAE": "VAE",
"WEBCAM": "WEBCAM"
}
}
}
Loading