Go out to claim route on subscription setup dialog
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
<script setup>
|
||||
|
||||
import { ref, onMounted, useTemplateRef } from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { Button, Spinner } from 'pankow';
|
||||
import { prettyDate } from 'pankow/utils';
|
||||
import Section from '../components/Section.vue';
|
||||
import SettingsItem from '../components/SettingsItem.vue';
|
||||
import CloudronRegistrationDialog from '../components/CloudronRegistrationDialog.vue';
|
||||
import AppstoreModel from '../models/AppstoreModel.js';
|
||||
import DashboardModel from '../models/DashboardModel.js';
|
||||
|
||||
@@ -24,11 +23,6 @@ const planName = ref('');
|
||||
const cancelAt = ref(0);
|
||||
const status = ref('');
|
||||
|
||||
const registrationDialog = useTemplateRef('registrationDialog');
|
||||
function onOpenRegistrationDialog() {
|
||||
registrationDialog.value.open();
|
||||
}
|
||||
|
||||
async function refresh() {
|
||||
const [error, result] = await appstoreModel.getSubscription();
|
||||
if (error) {
|
||||
@@ -62,8 +56,6 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<CloudronRegistrationDialog ref="registrationDialog" @success="refresh()"/>
|
||||
|
||||
<Section :title="$t('settings.appstoreAccount.title')">
|
||||
<!-- TODO: Show plan info -->
|
||||
|
||||
@@ -103,7 +95,7 @@ onMounted(async () => {
|
||||
{{ $t('settings.appstoreAccount.description') }}
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<Button @click="onOpenRegistrationDialog()">{{ $t('settings.appstoreAccount.setupAction') }}</Button>
|
||||
<Button :href="`${consoleServerOrigin}/#/cloudron/${cloudronId}?email=${encodeURIComponent(email)}`" target="_blank">{{ $t('settings.appstoreAccount.setupAction') }}</Button>
|
||||
</div>
|
||||
</SettingsItem>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user