Directly show setup subscription action for app updates if required
This commit is contained in:
@@ -81,10 +81,6 @@ function onAskUpdate() {
|
||||
dialog.value.open();
|
||||
}
|
||||
|
||||
function onSetupSubscription() {
|
||||
window.location.href = '/#/cloudron-account';
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
busyUpdate.value = false;
|
||||
busyCheck.value = false;
|
||||
@@ -107,10 +103,7 @@ onMounted(async () => {
|
||||
:confirm-label="$t('app.updateDialog.updateAction')"
|
||||
:confirm-active="!busyUpdate && app.updateInfo.manifest.dockerImage"
|
||||
:confirm-busy="busyUpdate"
|
||||
:alternate-label="!app.updateInfo.manifest.dockerImage && profile.isAtLeastOwner ? $t('app.updateDialog.setupSubscriptionAction') : ''"
|
||||
alternate-style="success"
|
||||
@confirm="onUpdate()"
|
||||
@alternate="onSetupSubscription()"
|
||||
>
|
||||
<div>
|
||||
<div class="text-danger" v-if="app.updateInfo.unstable">{{ $t('app.updateDialog.unstableWarning') }}</div>
|
||||
@@ -148,13 +141,13 @@ onMounted(async () => {
|
||||
<div>{{ $t('app.updateDialog.changelogHeader', { version: app.updateInfo.manifest.version }) }}</div>
|
||||
<div class="changelog" v-html="marked.parse(app.updateInfo.manifest.changelog)"></div>
|
||||
|
||||
<div class="error-label" v-if="!app.updateInfo.manifest.dockerImage">{{ $t('app.updateDialog.subscriptionExpired') }}</div>
|
||||
<div class="error-label" v-if="updateError">{{ updateError }}</div>
|
||||
|
||||
<div class="text-danger" v-if="app.updateInfo.unstable">{{ $t('app.updateDialog.unstableWarning') }}</div>
|
||||
<div class="error-label" style="margin-top: 12px" v-if="!app.updateInfo.manifest.dockerImage">{{ $t('app.updateDialog.subscriptionExpired') }}</div>
|
||||
<div class="error-label" style="margin-top: 12px" v-if="updateError">{{ updateError }}</div>
|
||||
<div class="error-label" style="margin-top: 12px" v-if="app.updateInfo.unstable">{{ $t('app.updateDialog.unstableWarning') }}</div>
|
||||
</div>
|
||||
<br/>
|
||||
<Button v-if="app.updateInfo" :danger="app.updateInfo.unstable ? true : null" :success="app.updateInfo.unstable ? null : true" @click="onAskUpdate()" :disabled="app.taskId || (app.error && app.error.details.installationState !== ISTATES.PENDING_UPDATE) || app.runState === 'stopped' || app.installationState === 'pending_update'">{{ $t('app.updateDialog.updateAction') }}</Button>
|
||||
<Button v-if="app.updateInfo && app.updateInfo.manifest.dockerImage" :danger="app.updateInfo.unstable ? true : null" :success="app.updateInfo.unstable ? null : true" @click="onAskUpdate()" :disabled="app.taskId || (app.error && app.error.details.installationState !== ISTATES.PENDING_UPDATE) || app.runState === 'stopped' || app.installationState === 'pending_update'">{{ $t('app.updateDialog.updateAction') }}</Button>
|
||||
<Button v-else-if="app.updateInfo && !app.updateInfo.manifest.dockerImage && profile.isAtLeastOwner" success href="/#/cloudron-account">{{ $t('app.updateDialog.setupSubscriptionAction') }}</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -163,12 +156,21 @@ onMounted(async () => {
|
||||
.changelog {
|
||||
max-height: 20lh;
|
||||
overflow-y: auto;
|
||||
margin-bottom: 10px;
|
||||
/*margin-bottom: 10px;*/
|
||||
padding-right: 0.5rem; /* space so scrollbar doesn’t overlap text */
|
||||
}
|
||||
|
||||
|
||||
.skip-backup {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
.changelog > ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user