If we have app.error we always have an app.error.details object

This commit is contained in:
Johannes Zellner
2025-07-23 15:40:25 +02:00
parent f03ac0133f
commit 68a8c964ea
6 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ const props = defineProps([ 'app' ]);
const latestBackup = ref(null);
function isAppStopped() {
if (props.app.error) {
if (props.app.error.details?.installationState === ISTATES.PENDING_START) return true;
if (props.app.error.details.installationState === ISTATES.PENDING_START) return true;
else return false;
} else if (props.app.installationState === ISTATES.PENDING_START || props.app.installationState === ISTATES.PENDING_STOP) {
return props.app.installationState === ISTATES.PENDING_START;
@@ -102,7 +102,7 @@ onMounted(async () => {
<label>{{ $t('app.uninstall.startStop.title') }}</label>
<p>{{ $t('app.uninstall.startStop.description') }}</p>
<Button @click="onToggleRunState()"
:disabled="toggleRunStateBusy || app.taskId || (app.error && (app.error.details?.installationState !== 'pending_start' && app.error.details?.installationState !== 'pending_stop')) || app.installationState === 'pending_start' || app.installationState === 'pending_stop'"
:disabled="toggleRunStateBusy || app.taskId || (app.error && (app.error.details.installationState !== 'pending_start' && app.error.details.installationState !== 'pending_stop')) || app.installationState === 'pending_start' || app.installationState === 'pending_stop'"
:loading="toggleRunStateBusy || app.installationState === 'pending_start' || app.installationState === 'pending_stop'"
>
{{ $t(isAppStopped() ? 'app.uninstall.startStop.startAction' : 'app.uninstall.startStop.stopAction') }}