metered billing app fixes

This commit is contained in:
Čarodej
2022-02-11 17:02:17 +01:00
parent 3fd43936e7
commit eb948f9000
13 changed files with 109 additions and 66 deletions
@@ -54,7 +54,7 @@
<ImageInput @input="$updateImage('/admin/settings', 'app_og_image', app.og_image)" :image="$getImage(app.og_image)" v-model="app.og_image" />
</AppInputText>
<AppInputText :title="$t('app_touch_icon')" :description="$t('app_touch_icon_description')">
<AppInputText :title="$t('app_touch_icon')" :description="$t('app_touch_icon_description')" :is-last="true">
<ImageInput @input="$updateImage('/admin/settings', 'app_touch_icon', app.touch_icon)" :image="$getImage(app.touch_icon)" v-model="app.touch_icon" />
</AppInputText>
</div>
@@ -1,7 +1,7 @@
<template>
<PageTab :is-loading="isLoading">
<!--Store & Upload-->
<div class="card shadow-card">
<div v-if="app" class="card shadow-card">
<FormLabel>
{{ $t('Storage & Upload') }}
</FormLabel>
@@ -55,7 +55,7 @@
</div>
<!--Other Settings-->
<div class="card shadow-card">
<div v-if="app" class="card shadow-card">
<FormLabel>
{{ $t('Application') }}
</FormLabel>
@@ -88,7 +88,7 @@
</div>
<!-- ReCaptcha -->
<div class="card shadow-card">
<div v-if="app" class="card shadow-card">
<FormLabel icon="shield">
{{ $t('reCaptcha') }}
</FormLabel>
+16 -2
View File
@@ -22,7 +22,13 @@
{{ data.app.license }}
</ColorLabel>
</a>
<a href="https://bit.ly/VueFileManager-survey" target="_blank" class="bg-theme-100 ml-8 inline-block hidden items-center rounded-lg py-1.5 px-3 md:flex">
<b v-if="data.app.license === 'extended'" class="mr-4 inline-block">
<span class="text-sm font-bold"> {{ $t('Subscription') }}: </span>
<ColorLabel color="purple">
{{ config.subscriptionType }}
</ColorLabel>
</b>
<a href="https://bit.ly/VueFileManager-survey" target="_blank" class="bg-theme-100 lg:ml-4 ml-8 inline-block hidden items-center rounded-lg py-1.5 px-3 md:flex">
<thumbs-up-icon size="15" class="vue-feather text-theme mr-2.5" />
<span class="text-theme text-sm font-bold">
{{ $t('Write a Feedback') }}
@@ -31,6 +37,11 @@
</div>
</div>
<div v-if="config.subscriptionType === 'metered' && config.isEmptyPlans" class="p-5 bg-rose-200 rounded-xl shadow-card mb-6 flex items-center">
<alert-octagon-icon size="18" class="vue-feather text-rose-700 mr-4 shrink-0"/>
<p class="text-sm text-rose-700">As you installed app with metered subscription type, you have to <router-link :to="{name: 'CreateMeteredPlan'}" class="font-bold underline text-sm">create your plan</router-link> as soon as possible to prevent new user registration without automatically assigned subscription plan.</p>
</div>
<!--Metric widgets-->
<div class="mb-2 md:mb-6 md:flex md:space-x-6">
<div class="card mb-4 w-full shadow-card md:mb-0">
@@ -144,7 +155,7 @@
<script>
import WidgetLatestRegistrations from '../../components/Admin/WidgetLatestRegistrations'
import ColorLabel from '../../components/Others/ColorLabel'
import { ChevronRightIcon, ThumbsUpIcon } from 'vue-feather-icons'
import { AlertOctagonIcon, ChevronRightIcon, ThumbsUpIcon } from 'vue-feather-icons'
import WidgetWrapper from '../../components/Admin/WidgetWrapper'
import Spinner from '../../components/FilesView/Spinner'
import FormLabel from '../../components/Others/Forms/FormLabel'
@@ -152,13 +163,16 @@ import BarChart from '../../components/UI/BarChart'
import { mapGetters } from 'vuex'
import axios from 'axios'
import WidgetLatestTransactions from '../../components/Admin/WidgetLatestTransactions'
import InfoBox from "../../components/Others/Forms/InfoBox";
export default {
name: 'Dashboard',
components: {
InfoBox,
WidgetLatestTransactions,
WidgetLatestRegistrations,
ChevronRightIcon,
AlertOctagonIcon,
WidgetWrapper,
ThumbsUpIcon,
ColorLabel,
@@ -175,7 +175,7 @@ export default {
InfoBox,
},
computed: {
...mapGetters(['currencyList', 'intervalList']),
...mapGetters(['currencyList', 'intervalList', 'config']),
},
data() {
return {
@@ -273,6 +273,7 @@ export default {
}
})
.catch((error) => {
console.log(error);
events.$emit('toaster', {
type: 'danger',
message: this.$t('popup_error.title'),
+2 -2
View File
@@ -186,12 +186,12 @@
</td>
<td class="px-3 md:px-1">
<span class="text-sm font-bold">
{{ row.data.meta.usages.featureEstimates.storage.usage }}
{{ row.data.meta.usages ? row.data.meta.usages.featureEstimates.storage.usage : '-' }}
</span>
</td>
<td class="px-3 md:px-1">
<span class="text-sm font-bold">
{{ row.data.meta.usages.costEstimate }}
{{ row.data.meta.usages ? row.data.meta.usages.costEstimate : '-' }}
</span>
</td>
<td class="px-3 md:px-1">