Skip to content

Commit

Permalink
[Desktop] Fix server start view layout (#2226)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored and webfiltered committed Jan 11, 2025
1 parent 7fa762b commit 19602d7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 34 deletions.
68 changes: 35 additions & 33 deletions src/views/ServerStartView.vue
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
<template>
<BaseViewTemplate dark class="flex-col">
<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"
class="flex flex-col items-center gap-4"
>
<div class="flex items-center my-4 gap-2">
<div class="flex flex-col w-full h-full items-center">
<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"
class="flex flex-col items-center gap-4"
>
<div 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>
<Button
icon="pi pi-flag"
v-if="!terminalVisible"
icon="pi pi-search"
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"
:label="t('serverStart.showTerminal')"
@click="terminalVisible = true"
/>
</div>
<Button
v-if="!terminalVisible"
icon="pi pi-search"
severity="secondary"
:label="t('serverStart.showTerminal')"
@click="terminalVisible = true"
/>
<BaseTerminal v-show="terminalVisible" @created="terminalCreated" />
</div>
<BaseTerminal v-show="terminalVisible" @created="terminalCreated" />
</BaseViewTemplate>
</template>

Expand Down
6 changes: 5 additions & 1 deletion vite.electron.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ const mockElectronAPI: Plugin = {
getElectronVersion: () => Promise.resolve('1.0.0'),
getComfyUIVersion: () => '9.9.9',
getPlatform: () => 'win32',
changeTheme: () => {}
changeTheme: () => {},
Config: {
setWindowStyle: () => {},
getWindowStyle: () => Promise.resolve('default')
}
};`
}
]
Expand Down

0 comments on commit 19602d7

Please sign in to comment.