Skip to content

Commit

Permalink
[Electron] Add version number to error state
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Nov 26, 2024
1 parent 244578d commit 7ca46bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default {
'python-setup': 'Setting up Python Environment...',
'starting-server': 'Starting ComfyUI server...',
ready: 'Finishing...',
error: 'Unable to start ComfyUI'
error: 'Unable to start ComfyUI Desktop'
}
},
serverConfig: {
Expand Down
13 changes: 10 additions & 3 deletions src/views/ServerStartView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
<div
class="font-sans flex flex-col justify-center items-center h-screen m-0 text-neutral-300 bg-neutral-900 dark-theme pointer-events-auto"
>
<h2 class="text-2xl font-bold">{{ t(`serverStart.process.${status}`) }}</h2>
<h2 class="text-2xl font-bold">
{{ t(`serverStart.process.${status}`) }}
<span v-if="status === ProgressStatus.ERROR">
v{{ electronVersion }}
</span>
</h2>
<div
v-if="status == ProgressStatus.ERROR"
v-if="status === ProgressStatus.ERROR"
class="flex items-center my-4 gap-2"
>
<Button
Expand Down Expand Up @@ -43,6 +48,7 @@ const electron = electronAPI()
const { t } = useI18n()
const status = ref<ProgressStatus>(ProgressStatus.INITIAL_STATE)
const electronVersion = ref<string>('')
let xterm: Terminal | undefined
const updateProgress = ({ status: newStatus }: { status: ProgressStatus }) => {
Expand Down Expand Up @@ -72,9 +78,10 @@ const reportIssue = () => {
}
const openLogs = () => electron.openLogsFolder()
onMounted(() => {
onMounted(async () => {
electron.sendReady()
electron.onProgressUpdate(updateProgress)
electronVersion.value = await electron.getElectronVersion()
})
</script>

Expand Down

0 comments on commit 7ca46bd

Please sign in to comment.