Handle all outgoing actions for the cloudron.io account in its view
This commit is contained in:
@@ -5,22 +5,17 @@
|
||||
// const subscriptionRequiredDialog = inject('subscriptionRequiredDialog');
|
||||
// subscriptionRequiredDialog.value.open();
|
||||
|
||||
import { ref, useTemplateRef } from 'vue';
|
||||
import { useTemplateRef } from 'vue';
|
||||
import { Dialog, Button } from 'pankow';
|
||||
import DashboardModel from '../models/DashboardModel.js';
|
||||
|
||||
const dashboardModel = DashboardModel.create();
|
||||
|
||||
const dialog = useTemplateRef('dialog');
|
||||
const consoleServerOrigin = ref('https://console.cloudron.io');
|
||||
|
||||
function close() {
|
||||
dialog.value.close();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
async open() {
|
||||
const [error, result] = await dashboardModel.config();
|
||||
if (error) return console.error(error);
|
||||
|
||||
consoleServerOrigin.value = result.consoleServerOrigin;
|
||||
|
||||
dialog.value.open();
|
||||
}
|
||||
});
|
||||
@@ -29,7 +24,7 @@ defineExpose({
|
||||
|
||||
<template>
|
||||
<Dialog ref="dialog" title="Subscription required" :show-x="true">
|
||||
<p>To use this feature a Cloudron subscription needs to be set up</p>
|
||||
<Button :href="`${consoleServerOrigin}/#/claim/${cloudronId}`" target="_blank">Set up</Button>
|
||||
<div style="margin-bottom: 30px; margin-top: 10px;">To use this feature a Cloudron subscription needs to be set up.</div>
|
||||
<Button href="/#/cloudron-account" @click="close()">Set up</Button>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user