Show proper title/description for the new start/stop section
This commit is contained in:
@@ -7,7 +7,7 @@ const t = i18n.t;
|
||||
import { ref, onMounted, useTemplateRef } from 'vue';
|
||||
import { Button, InputDialog, Spinner } from '@cloudron/pankow';
|
||||
import { prettyLongDate } from '@cloudron/pankow/utils';
|
||||
import { APP_TYPES, RSTATES } from '../../constants.js';
|
||||
import { APP_TYPES, RSTATES, ISTATES } from '../../constants.js';
|
||||
import AppsModel from '../../models/AppsModel.js';
|
||||
|
||||
const appsModel = AppsModel.create();
|
||||
@@ -116,12 +116,18 @@ onMounted(async () => {
|
||||
<div>
|
||||
<InputDialog ref="inputDialog" />
|
||||
|
||||
<div v-if="app.type !== APP_TYPES.PROXIED">
|
||||
<div>{{ $t('app.uninstall.startStop.description') }}</div>
|
||||
<div v-if="app.type !== APP_TYPES.PROXIED && targetRunState() === TARGET_RUN_STATE.START">
|
||||
<label>{{ $t('app.start.title') }}</label>
|
||||
<div v-html="$t('app.start.description')"></div>
|
||||
<br/>
|
||||
<Button v-if="!app.progress && targetRunState() === TARGET_RUN_STATE.START" primary :loading="toggleRunStateBusy" :disabled="toggleRunStateBusy" @click="onStartApp()">{{ $t('app.uninstall.startStop.startAction') }}</Button>
|
||||
<Button v-else-if="!app.progress" primary :loading="toggleRunStateBusy" :disabled="toggleRunStateBusy" @click="onStopApp()">{{ $t('app.uninstall.startStop.stopAction') }}</Button>
|
||||
<Spinner v-else />
|
||||
<Button primary :loading="toggleRunStateBusy" :disabled="toggleRunStateBusy" @click="onStartApp()">{{ $t('app.start.action') }}</Button>
|
||||
</div>
|
||||
|
||||
<div v-if="app.type !== APP_TYPES.PROXIED && targetRunState() === TARGET_RUN_STATE.STOP">
|
||||
<label>{{ $t('app.stop.title') }}</label>
|
||||
<div v-html="$t('app.stop.description')"></div>
|
||||
<br/>
|
||||
<Button primary :loading="toggleRunStateBusy" :disabled="toggleRunStateBusy" @click="onStopApp()">{{ $t('app.stop.action') }}</Button>
|
||||
</div>
|
||||
|
||||
<hr style="margin-top: 20px"/>
|
||||
|
||||
Reference in New Issue
Block a user