Fix repair state when installation or uinstallation fails

This commit is contained in:
Johannes Zellner
2025-07-23 12:09:29 +02:00
parent c173db69a9
commit 1063dbea02
5 changed files with 89 additions and 36 deletions

View File

@@ -52,6 +52,12 @@ const isAppStopped = computed(() => {
});
function onSetView(newView) {
if (!isViewEnabled(newView, app.value.error?.details?.installationState)) {
currentView.value = 'info';
window.location.hash = `/app/${id.value}/info`;
return;
}
currentView.value = newView;
window.location.hash = `/app/${id.value}/${newView}`;
}
@@ -151,16 +157,18 @@ async function refresh() {
function isViewEnabled(view, errorState) {
if (!errorState) return true;
if (view === 'info'
|| view === 'display'
|| view === 'uninstall'
if (view === 'info' || view === 'uninstall' || view === 'eventlog') return true;
if (errorState === ISTATES.PENDING_INSTALL) return view === 'repair';
if (errorState === ISTATES.PENDING_UNINSTALL) return false;
if (view === 'display'
|| view === 'backups'
|| view === 'access'
|| view === 'proxy'
|| view === 'graphs'
|| view === 'security'
|| view === 'cron'
|| view === 'eventlog'
) return true;
if (view === 'location') {