[Desktop] Offer Troubleshoot page instead of Reinstall on start error (#2623)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
filtered
2025-02-20 02:30:23 +11:00
committed by GitHub
parent dbbe67dfcd
commit 08a6867c00
10 changed files with 26 additions and 31 deletions

View File

@@ -135,12 +135,12 @@ const filterOptions = ref([
])
/** Filter binding; can be set to show all tasks, or only errors. */
const filter = ref<MaintenanceFilter>(filterOptions.value[1])
const filter = ref<MaintenanceFilter>(filterOptions.value[0])
/** If valid, leave the validation window. */
const completeValidation = async (alertOnFail = true) => {
const completeValidation = async () => {
const isValid = await electron.Validation.complete()
if (alertOnFail && !isValid) {
if (!isValid) {
toast.add({
severity: 'error',
summary: t('g.error'),
@@ -162,18 +162,13 @@ watch(
}
)
// If we're running a fix that may resolve all issues, auto-recheck and continue if everything is OK
watch(
() => taskStore.isRunningInstallationFix,
(value, oldValue) => {
if (!value && oldValue) completeValidation(false)
}
)
onMounted(async () => {
electron.Validation.onUpdate(processUpdate)
const update = await electron.Validation.getStatus()
if (Object.values(update).some((x) => x === 'error')) {
filter.value = filterOptions.value[1]
}
processUpdate(update)
})

View File

@@ -25,9 +25,9 @@
@click="openLogs"
/>
<Button
icon="pi pi-refresh"
:label="t('serverStart.reinstall')"
@click="reinstall"
icon="pi pi-wrench"
:label="t('serverStart.troubleshoot')"
@click="troubleshoot"
/>
</div>
<Button
@@ -88,7 +88,7 @@ const terminalCreated = (
terminal.options.cursorInactiveStyle = 'block'
}
const reinstall = () => electron.reinstall()
const troubleshoot = () => electron.startTroubleshooting()
const reportIssue = () => {
window.open('https://forum.comfy.org/c/v1-feedback/', '_blank')
}