mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 01:09:46 +00:00
* feat: #270 Improve error view Reverting change Lint & Format PR comments Fixing typo * nit --------- Co-authored-by: Oto Ciulis <oto.ciulis@gmail.com> Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
12
src/i18n.ts
12
src/i18n.ts
@@ -53,6 +53,18 @@ const messages = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
serverStart: {
|
||||||
|
reinstall: 'Reinstall',
|
||||||
|
reportIssue: 'Report Issue',
|
||||||
|
openLogs: 'Open Logs',
|
||||||
|
process: {
|
||||||
|
'initial-state': 'Loading...',
|
||||||
|
'python-setup': 'Setting up Python Environment...',
|
||||||
|
'starting-server': 'Starting ComfyUI server...',
|
||||||
|
ready: 'Finishing...',
|
||||||
|
error: 'Unable to start ComfyUI'
|
||||||
|
}
|
||||||
|
},
|
||||||
firstTimeUIMessage:
|
firstTimeUIMessage:
|
||||||
'This is the first time you use the new UI. Choose "Menu > Use New Menu > Disabled" to restore the old UI.',
|
'This is the first time you use the new UI. Choose "Menu > Use New Menu > Disabled" to restore the old UI.',
|
||||||
download: 'Download',
|
download: 'Download',
|
||||||
|
|||||||
@@ -2,23 +2,45 @@
|
|||||||
<div
|
<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"
|
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">{{ ProgressMessages[status] }}</h2>
|
<h2 class="text-2xl font-bold">{{ t(`serverStart.process.${status}`) }}</h2>
|
||||||
|
<div
|
||||||
|
v-if="status == ProgressStatus.ERROR"
|
||||||
|
class="flex items-center my-4 gap-2"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
icon="pi pi-flag"
|
||||||
|
severity="secondary"
|
||||||
|
:label="t('serverStart.reportIssue')"
|
||||||
|
@click="reportIssue"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
icon="pi pi-file"
|
||||||
|
severity="secondary"
|
||||||
|
:label="t('serverStart.openLogs')"
|
||||||
|
@click="openLogs"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
icon="pi pi-refresh"
|
||||||
|
:label="t('serverStart.reinstall')"
|
||||||
|
@click="reinstall"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<BaseTerminal @created="terminalCreated" />
|
<BaseTerminal @created="terminalCreated" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import Button from 'primevue/button'
|
||||||
import { ref, onMounted, Ref } from 'vue'
|
import { ref, onMounted, Ref } from 'vue'
|
||||||
import BaseTerminal from '@/components/bottomPanel/tabs/terminal/BaseTerminal.vue'
|
import BaseTerminal from '@/components/bottomPanel/tabs/terminal/BaseTerminal.vue'
|
||||||
import {
|
import { ProgressStatus } from '@comfyorg/comfyui-electron-types'
|
||||||
ProgressStatus,
|
|
||||||
ProgressMessages
|
|
||||||
} from '@comfyorg/comfyui-electron-types'
|
|
||||||
import { electronAPI } from '@/utils/envUtil'
|
import { electronAPI } from '@/utils/envUtil'
|
||||||
import type { useTerminal } from '@/hooks/bottomPanelTabs/useTerminal'
|
import type { useTerminal } from '@/hooks/bottomPanelTabs/useTerminal'
|
||||||
import { Terminal } from '@xterm/xterm'
|
import { Terminal } from '@xterm/xterm'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
const electron = electronAPI()
|
const electron = electronAPI()
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const status = ref<ProgressStatus>(ProgressStatus.INITIAL_STATE)
|
const status = ref<ProgressStatus>(ProgressStatus.INITIAL_STATE)
|
||||||
let xterm: Terminal | undefined
|
let xterm: Terminal | undefined
|
||||||
@@ -44,6 +66,12 @@ const terminalCreated = (
|
|||||||
terminal.options.cursorInactiveStyle = 'block'
|
terminal.options.cursorInactiveStyle = 'block'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const reinstall = () => electron.reinstall()
|
||||||
|
const reportIssue = () => {
|
||||||
|
window.open('https://forum.comfy.org/c/v1-feedback/', '_blank')
|
||||||
|
}
|
||||||
|
const openLogs = () => electron.openLogsFolder()
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
electron.sendReady()
|
electron.sendReady()
|
||||||
electron.onProgressUpdate(updateProgress)
|
electron.onProgressUpdate(updateProgress)
|
||||||
|
|||||||
Reference in New Issue
Block a user