Provide features in dashboard to injection in components
This commit is contained in:
@@ -108,6 +108,7 @@ const subscription = ref({
|
||||
});
|
||||
const config = ref({});
|
||||
const avatarUrl = ref('');
|
||||
const features = ref({});
|
||||
|
||||
function onSidebarClose() {
|
||||
sidebar.value.close();
|
||||
@@ -196,6 +197,7 @@ ProfileModel.onChange(ProfileModel.KEYS.AVATAR, (value) => {
|
||||
});
|
||||
|
||||
provide('subscriptionRequiredDialog', subscriptionRequiredDialog);
|
||||
provide('features', features);
|
||||
|
||||
onMounted(async () => {
|
||||
let [error, result] = await provisionModel.status();
|
||||
@@ -219,6 +221,7 @@ onMounted(async () => {
|
||||
[error, result] = await dashboardModel.config();
|
||||
if (error) return console.error(error);
|
||||
config.value = result;
|
||||
features.value = result.features;
|
||||
|
||||
avatarUrl.value = `https://${config.value.adminFqdn}/api/v1/cloudron/avatar`;
|
||||
window.document.title = result.cloudronName;
|
||||
|
||||
Reference in New Issue
Block a user