If we have app.error we always have an app.error.details object
This commit is contained in:
@@ -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') }}
|
||||
|
||||
Reference in New Issue
Block a user