@frigear-nu/subscriptions 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +9 -4
- package/dist/runtime/app/components/SubscriptionPlans.d.vue.ts +4 -4
- package/dist/runtime/app/components/SubscriptionPlans.vue +4 -1
- package/dist/runtime/app/components/SubscriptionPlans.vue.d.ts +4 -4
- package/dist/runtime/app/components/SubscriptionStatus.d.vue.ts +7 -2
- package/dist/runtime/app/components/SubscriptionStatus.vue +25 -22
- package/dist/runtime/app/components/SubscriptionStatus.vue.d.ts +7 -2
- package/dist/runtime/app/components/Users/Admin/Membership.d.vue.ts +3 -3
- package/dist/runtime/app/components/Users/Admin/Membership.vue +90 -94
- package/dist/runtime/app/components/Users/Admin/Membership.vue.d.ts +3 -3
- package/dist/runtime/app/composables/useSubscription.d.ts +8 -1
- package/dist/runtime/app/pages/cancel.d.vue.ts +1 -1
- package/dist/runtime/app/pages/cancel.vue +7 -15
- package/dist/runtime/app/pages/cancel.vue.d.ts +1 -1
- package/dist/runtime/app/pages/membership.d.vue.ts +1 -1
- package/dist/runtime/app/pages/membership.vue +21 -23
- package/dist/runtime/app/pages/membership.vue.d.ts +1 -1
- package/dist/runtime/app/pages/success.d.vue.ts +1 -1
- package/dist/runtime/app/pages/success.vue +7 -17
- package/dist/runtime/app/pages/success.vue.d.ts +1 -1
- package/dist/runtime/app/tabs/Membership.d.vue.ts +3 -3
- package/dist/runtime/app/tabs/Membership.vue +26 -21
- package/dist/runtime/app/tabs/Membership.vue.d.ts +3 -3
- package/dist/runtime/app/widgets/AdminCurrentSubscription.d.vue.ts +1 -1
- package/dist/runtime/app/widgets/AdminCurrentSubscription.vue +9 -5
- package/dist/runtime/app/widgets/AdminCurrentSubscription.vue.d.ts +1 -1
- package/dist/runtime/app/widgets/MembershipSummary.d.vue.ts +3 -0
- package/dist/runtime/app/widgets/MembershipSummary.vue +36 -0
- package/dist/runtime/app/widgets/MembershipSummary.vue.d.ts +3 -0
- package/dist/runtime/i18n/lang/da.json +16 -4
- package/dist/runtime/i18n/lang/en.json +16 -4
- package/dist/runtime/menus.js +3 -5
- package/dist/runtime/server/db/schema.postgresql.d.ts +240 -0
- package/dist/runtime/server/db/schema.postgresql.js +22 -0
- package/package.json +18 -18
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const __VLS_export: import("
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const __VLS_export: import("
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
@@ -9,27 +9,25 @@ const { loggedIn } = useUserSession();
|
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</UPage>
|
|
34
|
-
</UContainer>
|
|
12
|
+
<div class="flex flex-col gap-6">
|
|
13
|
+
<SubscriptionStatus v-if="isActive" />
|
|
14
|
+
<div
|
|
15
|
+
v-else-if="loggedIn"
|
|
16
|
+
class="flex flex-col gap-1"
|
|
17
|
+
>
|
|
18
|
+
<h2 class="text-highlighted text-lg font-semibold">
|
|
19
|
+
{{ t("status.heroTitle", "Join the team today") }}
|
|
20
|
+
</h2>
|
|
21
|
+
<p class="text-muted text-sm">
|
|
22
|
+
{{ t("status.heroDescription", "Set up your membership to get started!") }}
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
<h2
|
|
26
|
+
v-if="cancelsAt"
|
|
27
|
+
class="text-highlighted text-lg font-semibold"
|
|
28
|
+
>
|
|
29
|
+
{{ t("plans.resubscribe", "Resubscribe") }}
|
|
30
|
+
</h2>
|
|
31
|
+
<SubscriptionPlans confirm-change />
|
|
32
|
+
</div>
|
|
35
33
|
</template>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const __VLS_export: import("
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const __VLS_export: import("
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import SubscriptionStatus from "../components/SubscriptionStatus.vue";
|
|
3
2
|
import { useSubscription } from "../composables/useSubscription";
|
|
4
3
|
defineOptions({ name: "SubscriptionSuccessPage" });
|
|
5
4
|
const t = useModuleT("subscriptions.success");
|
|
6
5
|
const { refresh, isActive } = useSubscription();
|
|
6
|
+
const { localize } = useLocaleLink();
|
|
7
7
|
const membership = useRuntimeConfig().public.subscriptions?.pages?.membership;
|
|
8
8
|
const MAX_ATTEMPTS = 40;
|
|
9
9
|
const INTERVAL_MS = 3e3;
|
|
@@ -20,20 +20,10 @@ onMounted(async () => {
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/>
|
|
30
|
-
<SubscriptionStatus />
|
|
31
|
-
<UButton
|
|
32
|
-
v-if="membership"
|
|
33
|
-
:to="membership"
|
|
34
|
-
:label="t('continue', 'Continue')"
|
|
35
|
-
/>
|
|
36
|
-
</UPageBody>
|
|
37
|
-
</UPage>
|
|
38
|
-
</UContainer>
|
|
23
|
+
<UEmpty
|
|
24
|
+
:icon="isActive ? 'i-lucide-circle-check' : 'i-lucide-loader-circle'"
|
|
25
|
+
:title="t('title', 'Thank you!')"
|
|
26
|
+
:description="isActive ? t('activeBody', 'Your subscription is now active.') : t('body', 'Your subscription is being activated. This can take a few seconds.')"
|
|
27
|
+
:actions="membership ? [{ label: t('back', 'Back to membership'), to: localize(membership) }] : []"
|
|
28
|
+
/>
|
|
39
29
|
</template>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const __VLS_export: import("
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
@@ -5,10 +5,10 @@ type __VLS_Props = {
|
|
|
5
5
|
email: string;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
declare const __VLS_export: import("
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
refresh: () => any;
|
|
10
|
-
}, string, import("
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
11
|
onRefresh?: (() => any) | undefined;
|
|
12
|
-
}>, {}, {}, {}, {}, string, import("
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
export default _default;
|
|
@@ -5,14 +5,16 @@ const props = defineProps({
|
|
|
5
5
|
});
|
|
6
6
|
const emit = defineEmits(["refresh"]);
|
|
7
7
|
const t = useModuleT("subscriptions.admin");
|
|
8
|
+
const format = useFormat();
|
|
9
|
+
const UBadge = resolveComponent("UBadge");
|
|
8
10
|
const { data: history, refresh: refreshHistory, status } = useLazyFetch(
|
|
9
11
|
() => `/api/admin/users/${props.user.id}/subscriptions`,
|
|
10
12
|
{ key: () => `admin-subscriptions-${props.user.id}` }
|
|
11
13
|
);
|
|
12
|
-
const date = (value) =>
|
|
14
|
+
const date = (value) => format.date(value) || "\u2013";
|
|
13
15
|
const columns = computed(() => [
|
|
14
16
|
{ accessorKey: "planKey", header: t("history.plan", "Plan"), cell: ({ row }) => row.original.planKey ?? row.original.priceId },
|
|
15
|
-
{ accessorKey: "status", header: t("history.status", "Status") },
|
|
17
|
+
{ accessorKey: "status", header: t("history.status", "Status"), cell: ({ row }) => h(UBadge, { label: row.original.status, variant: "subtle", color: statusColor(row.original.status) }) },
|
|
16
18
|
{ accessorKey: "source", header: t("history.source", "Source"), cell: ({ row }) => row.original.source === "manual" ? t("free", "Free of charge") : t("paid", "Paid (Stripe)") },
|
|
17
19
|
{ accessorKey: "currentPeriodStart", header: t("history.started", "Started"), cell: ({ row }) => date(row.original.currentPeriodStart) },
|
|
18
20
|
{ accessorKey: "currentPeriodEnd", header: t("history.periodEnd", "Period end"), cell: ({ row }) => date(row.original.currentPeriodEnd) },
|
|
@@ -25,29 +27,32 @@ async function changed() {
|
|
|
25
27
|
</script>
|
|
26
28
|
|
|
27
29
|
<template>
|
|
28
|
-
<div class="flex flex-col gap-
|
|
29
|
-
<
|
|
30
|
+
<div class="flex flex-col gap-4">
|
|
31
|
+
<SectionCard :title="t('membership', 'Membership')">
|
|
30
32
|
<UsersAdminMembership
|
|
31
33
|
:user="user"
|
|
32
34
|
@refresh="changed"
|
|
33
35
|
/>
|
|
34
|
-
</
|
|
36
|
+
</SectionCard>
|
|
35
37
|
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
<SectionCard
|
|
39
|
+
:title="t('history.title', 'Subscription history')"
|
|
40
|
+
flush
|
|
41
|
+
>
|
|
42
|
+
<UTable
|
|
43
|
+
:data="history?.subscriptions ?? []"
|
|
44
|
+
:columns="columns"
|
|
45
|
+
:loading="status === 'pending'"
|
|
46
|
+
:ui="tableUi({ tr: '' })"
|
|
47
|
+
>
|
|
48
|
+
<template #empty>
|
|
49
|
+
<UEmpty
|
|
50
|
+
variant="naked"
|
|
51
|
+
icon="i-lucide-badge-check"
|
|
52
|
+
:title="t('history.empty', 'No subscriptions yet.')"
|
|
53
|
+
/>
|
|
54
|
+
</template>
|
|
55
|
+
</UTable>
|
|
56
|
+
</SectionCard>
|
|
52
57
|
</div>
|
|
53
58
|
</template>
|
|
@@ -5,10 +5,10 @@ type __VLS_Props = {
|
|
|
5
5
|
email: string;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
declare const __VLS_export: import("
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
refresh: () => any;
|
|
10
|
-
}, string, import("
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
11
|
onRefresh?: (() => any) | undefined;
|
|
12
|
-
}>, {}, {}, {}, {}, string, import("
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
export default _default;
|
|
@@ -6,6 +6,6 @@ type __VLS_Props = {
|
|
|
6
6
|
} | null;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_export: import("
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -7,17 +7,21 @@ const t = useModuleT("subscriptions.admin");
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
|
-
<
|
|
10
|
+
<StatCard
|
|
11
11
|
:label="t('currentSubscription', 'Current subscription')"
|
|
12
|
+
icon="i-lucide-badge-check"
|
|
12
13
|
:empty="t('none', 'No active membership.')"
|
|
13
14
|
>
|
|
14
|
-
<template
|
|
15
|
+
<template
|
|
16
|
+
v-if="user.subscription"
|
|
17
|
+
#default
|
|
18
|
+
>
|
|
15
19
|
<UBadge
|
|
16
20
|
variant="subtle"
|
|
17
|
-
:color="
|
|
21
|
+
:color="statusColor(user.subscription.status)"
|
|
18
22
|
:label="user.subscription.planKey ?? user.subscription.status"
|
|
19
23
|
/>
|
|
20
|
-
<span class="text-muted">{{ user.subscription.status }}</span>
|
|
24
|
+
<span class="text-muted text-sm font-normal">{{ user.subscription.status }}</span>
|
|
21
25
|
</template>
|
|
22
|
-
</
|
|
26
|
+
</StatCard>
|
|
23
27
|
</template>
|
|
@@ -6,6 +6,6 @@ type __VLS_Props = {
|
|
|
6
6
|
} | null;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_export: import("
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { usePlans } from "../composables/usePlans";
|
|
3
|
+
import { useSubscription } from "../composables/useSubscription";
|
|
4
|
+
defineOptions({ name: "SubscriptionsMembershipSummary" });
|
|
5
|
+
const t = useModuleT("subscriptions.overview");
|
|
6
|
+
const ts = useModuleT("subscriptions.status");
|
|
7
|
+
const tp = useModuleT("subscriptions.catalog");
|
|
8
|
+
const format = useFormat();
|
|
9
|
+
const { localize } = useLocaleLink();
|
|
10
|
+
const { plans } = usePlans();
|
|
11
|
+
const { subscription, plan, status, isActive, cancelsAt } = useSubscription();
|
|
12
|
+
const membership = useRuntimeConfig().public.subscriptions?.pages?.membership;
|
|
13
|
+
const planLabel = computed(() => {
|
|
14
|
+
if (!plan.value) return "";
|
|
15
|
+
return tp(`${plan.value}.label`, plans.value.find((p) => p.key === plan.value)?.label ?? plan.value);
|
|
16
|
+
});
|
|
17
|
+
const hint = computed(() => {
|
|
18
|
+
const end = subscription.value?.currentPeriodEnd;
|
|
19
|
+
if (!end) return void 0;
|
|
20
|
+
const date = format.date(end);
|
|
21
|
+
if (subscription.value?.source === "manual") return ts("freeUntil", "Free membership until {date}", { date });
|
|
22
|
+
return cancelsAt.value ? ts("cancels", "Ends on {date}", { date }) : ts("renews", "Renews on {date}", { date });
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<StatCard
|
|
28
|
+
:label="t('label', 'Membership')"
|
|
29
|
+
icon="i-lucide-credit-card"
|
|
30
|
+
:to="membership ? localize(membership) : void 0"
|
|
31
|
+
:loading="status === 'pending' && !subscription"
|
|
32
|
+
:value="isActive ? planLabel : void 0"
|
|
33
|
+
:hint="isActive ? hint : void 0"
|
|
34
|
+
:empty="t('none', 'No active membership')"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"confirmDowngrade": "Hvis du nedgraderer, kører dit nuværende abonnement til næste forfaldsdato, hvorefter det skifter.",
|
|
21
21
|
"subscribeTo": "Du abonnerer nu på:",
|
|
22
22
|
"changeTitle": "Opdatér abonnement",
|
|
23
|
-
"checkoutTitle": "Bliv medlem"
|
|
23
|
+
"checkoutTitle": "Bliv medlem",
|
|
24
|
+
"confirmResume": "Dit medlemskab fornyes som hidtil."
|
|
24
25
|
},
|
|
25
26
|
"interval": {
|
|
26
27
|
"day": "dag",
|
|
@@ -61,12 +62,12 @@
|
|
|
61
62
|
"title": "Tak!",
|
|
62
63
|
"body": "Dit abonnement bliver aktiveret. Det kan tage et par sekunder.",
|
|
63
64
|
"activeBody": "Dit abonnement er aktiveret.",
|
|
64
|
-
"
|
|
65
|
+
"back": "Tilbage til medlemskab"
|
|
65
66
|
},
|
|
66
67
|
"cancel": {
|
|
67
68
|
"title": "Betaling annulleret",
|
|
68
69
|
"body": "Der blev ikke foretaget ændringer, og du er ikke blevet opkrævet.",
|
|
69
|
-
"back": "Tilbage til
|
|
70
|
+
"back": "Tilbage til medlemskab"
|
|
70
71
|
},
|
|
71
72
|
"errors": {
|
|
72
73
|
"checkout": "Kunne ikke starte betalingen.",
|
|
@@ -113,7 +114,18 @@
|
|
|
113
114
|
"started": "Startet",
|
|
114
115
|
"periodEnd": "Periodeslut",
|
|
115
116
|
"ended": "Afsluttet"
|
|
116
|
-
}
|
|
117
|
+
},
|
|
118
|
+
"type": "Type",
|
|
119
|
+
"validUntil": "Gyldigt til",
|
|
120
|
+
"status": "Status",
|
|
121
|
+
"revokeTitle": "Fjern det gratis medlemskab for {name}?",
|
|
122
|
+
"revokeBody": "Brugeren mister medlemsfordelene med det samme. Et betalt abonnement påvirkes ikke.",
|
|
123
|
+
"revokeConfirm": "Fjern gratis medlemskab"
|
|
124
|
+
},
|
|
125
|
+
"overview": {
|
|
126
|
+
"label": "Medlemskab",
|
|
127
|
+
"none": "Intet aktivt medlemskab",
|
|
128
|
+
"manage": "Administrér medlemskab"
|
|
117
129
|
}
|
|
118
130
|
}
|
|
119
131
|
}
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"confirmDowngrade": "If you downgrade, your current subscription runs until the next due date, then switches.",
|
|
21
21
|
"subscribeTo": "You will now subscribe to:",
|
|
22
22
|
"changeTitle": "Update subscription",
|
|
23
|
-
"checkoutTitle": "Get a membership"
|
|
23
|
+
"checkoutTitle": "Get a membership",
|
|
24
|
+
"confirmResume": "Your membership will keep renewing as before."
|
|
24
25
|
},
|
|
25
26
|
"interval": {
|
|
26
27
|
"day": "day",
|
|
@@ -61,12 +62,12 @@
|
|
|
61
62
|
"title": "Thank you!",
|
|
62
63
|
"body": "Your subscription is being activated. This can take a few seconds.",
|
|
63
64
|
"activeBody": "Your subscription is now active.",
|
|
64
|
-
"
|
|
65
|
+
"back": "Back to membership"
|
|
65
66
|
},
|
|
66
67
|
"cancel": {
|
|
67
68
|
"title": "Checkout canceled",
|
|
68
69
|
"body": "No changes were made and you have not been charged.",
|
|
69
|
-
"back": "Back to
|
|
70
|
+
"back": "Back to membership"
|
|
70
71
|
},
|
|
71
72
|
"errors": {
|
|
72
73
|
"checkout": "Failed to start checkout.",
|
|
@@ -113,7 +114,18 @@
|
|
|
113
114
|
"started": "Started",
|
|
114
115
|
"periodEnd": "Period end",
|
|
115
116
|
"ended": "Ended"
|
|
116
|
-
}
|
|
117
|
+
},
|
|
118
|
+
"type": "Type",
|
|
119
|
+
"validUntil": "Valid until",
|
|
120
|
+
"status": "Status",
|
|
121
|
+
"revokeTitle": "Revoke the free membership of {name}?",
|
|
122
|
+
"revokeBody": "They lose the membership benefits right away. A paid subscription is not affected.",
|
|
123
|
+
"revokeConfirm": "Revoke free membership"
|
|
124
|
+
},
|
|
125
|
+
"overview": {
|
|
126
|
+
"label": "Membership",
|
|
127
|
+
"none": "No active membership",
|
|
128
|
+
"manage": "Manage membership"
|
|
117
129
|
}
|
|
118
130
|
}
|
|
119
131
|
}
|
package/dist/runtime/menus.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineMenuItem, defineMenuSource, extendMenuItem } from "@frigear-nu/me
|
|
|
2
2
|
export default defineMenuSource(() => {
|
|
3
3
|
const config = useRuntimeConfig().public.subscriptions;
|
|
4
4
|
if (config?.pages?.membership) {
|
|
5
|
-
|
|
5
|
+
extendMenuItem("account", defineMenuItem({
|
|
6
6
|
id: "subscription",
|
|
7
7
|
label: "Subscription",
|
|
8
8
|
labelKey: "subscriptions.menu.subscription.label",
|
|
@@ -10,9 +10,7 @@ export default defineMenuSource(() => {
|
|
|
10
10
|
descriptionKey: "subscriptions.menu.subscription.description",
|
|
11
11
|
icon: "i-lucide-credit-card",
|
|
12
12
|
to: config.pages.membership,
|
|
13
|
-
order:
|
|
14
|
-
});
|
|
15
|
-
extendMenuItem("account", item);
|
|
16
|
-
extendMenuItem("dashboard.account", item);
|
|
13
|
+
order: 15
|
|
14
|
+
}));
|
|
17
15
|
}
|
|
18
16
|
});
|