@live-change/billing-frontend 0.8.93 → 0.8.95
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/front/src/logic/topUp.js +6 -0
- package/front/src/pages/TopUp.vue +22 -3
- package/front/vite.config.ts +4 -0
- package/package.json +38 -38
- package/server/app.config.js +5 -0
- package/server/services.list.js +2 -0
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="selectedTopUp">
|
|
4
|
+
<h1>{{ offer }}</h1>
|
|
5
|
+
<h2>{{ anyTopUpPrice }}</h2>
|
|
6
|
+
<pre>{{ billingClientConfig.topUpOffers }}</pre>
|
|
7
|
+
</div>
|
|
8
|
+
<NotFound v-else />
|
|
9
|
+
</div>
|
|
5
10
|
</template>
|
|
6
11
|
|
|
7
12
|
<script setup>
|
|
@@ -9,6 +14,10 @@
|
|
|
9
14
|
|
|
10
15
|
import { defineProps, toRefs, computed, inject } from 'vue'
|
|
11
16
|
|
|
17
|
+
import { NotFound } from '@live-change/url-frontend'
|
|
18
|
+
|
|
19
|
+
import { startTopUp } from '../logic/topUp.js'
|
|
20
|
+
|
|
12
21
|
const props = defineProps({
|
|
13
22
|
value: {
|
|
14
23
|
type: Number,
|
|
@@ -40,6 +49,16 @@
|
|
|
40
49
|
const anyTopUpPrice = computed(() => billingClientConfig?.anyTopUpPrices
|
|
41
50
|
?.find(price => price.currency === currency.value))
|
|
42
51
|
|
|
52
|
+
const selectedTopUp = computed(() => offer.value || anyTopUpPrice.value)
|
|
53
|
+
|
|
54
|
+
const workingZone = inject('workingZone')
|
|
55
|
+
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
const topUp = selectedTopUp.value
|
|
58
|
+
workingZone.addPromise('topUp', async () => {
|
|
59
|
+
await startTopUp(topUp)
|
|
60
|
+
})
|
|
61
|
+
})
|
|
43
62
|
|
|
44
63
|
</script>
|
|
45
64
|
|
package/front/vite.config.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import dotenv from 'dotenv'
|
|
2
|
+
dotenv.config()
|
|
3
|
+
|
|
1
4
|
import { defineConfig } from 'vite'
|
|
2
5
|
import Pages from 'vite-plugin-pages'
|
|
3
6
|
|
|
@@ -28,6 +31,7 @@ export default defineConfig(async ({ command, mode }) => {
|
|
|
28
31
|
ENV_VERSION: JSON.stringify(version),
|
|
29
32
|
ENV_BRAND_NAME: JSON.stringify(name[0].toUpperCase() + name.slice(1)),
|
|
30
33
|
ENV_BRAND_DOMAIN: JSON.stringify(domain),
|
|
34
|
+
ENV_STRIPE_KEY: JSON.stringify(process.env.STRIPE_KEY),
|
|
31
35
|
},
|
|
32
36
|
|
|
33
37
|
plugins: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/billing-frontend",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.95",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; node server/start.js localDev --enableSessions --initScript ./init.js",
|
|
@@ -35,41 +35,41 @@
|
|
|
35
35
|
"@codemirror/language": "6.10.1",
|
|
36
36
|
"@dotenvx/dotenvx": "0.27.0",
|
|
37
37
|
"@fortawesome/fontawesome-free": "^6.5.2",
|
|
38
|
-
"@live-change/access-control-frontend": "^0.8.
|
|
39
|
-
"@live-change/access-control-service": "^0.8.
|
|
40
|
-
"@live-change/backup-service": "^0.8.
|
|
41
|
-
"@live-change/blog-frontend": "^0.8.
|
|
42
|
-
"@live-change/blog-service": "^0.8.
|
|
43
|
-
"@live-change/cli": "^0.8.
|
|
44
|
-
"@live-change/content-frontend": "^0.8.
|
|
45
|
-
"@live-change/content-service": "^0.8.
|
|
46
|
-
"@live-change/dao": "^0.8.
|
|
47
|
-
"@live-change/dao-vue3": "^0.8.
|
|
48
|
-
"@live-change/dao-websocket": "^0.8.
|
|
49
|
-
"@live-change/db-client": "^0.8.
|
|
50
|
-
"@live-change/email-service": "^0.8.
|
|
51
|
-
"@live-change/framework": "^0.8.
|
|
52
|
-
"@live-change/frontend-auto-form": "^0.8.
|
|
53
|
-
"@live-change/frontend-base": "^0.8.
|
|
54
|
-
"@live-change/geoip-service": "^0.8.
|
|
55
|
-
"@live-change/image-frontend": "^0.8.
|
|
56
|
-
"@live-change/locale-settings-service": "^0.8.
|
|
57
|
-
"@live-change/password-authentication-service": "^0.8.
|
|
58
|
-
"@live-change/prosemirror-service": "^0.8.
|
|
59
|
-
"@live-change/secret-code-service": "^0.8.
|
|
60
|
-
"@live-change/secret-link-service": "^0.8.
|
|
61
|
-
"@live-change/session-service": "^0.8.
|
|
62
|
-
"@live-change/task-service": "^0.8.
|
|
63
|
-
"@live-change/upload-frontend": "^0.8.
|
|
64
|
-
"@live-change/url-frontend": "^0.8.
|
|
65
|
-
"@live-change/url-service": "^0.8.
|
|
66
|
-
"@live-change/user-frontend": "^0.8.
|
|
67
|
-
"@live-change/user-identification-service": "^0.8.
|
|
68
|
-
"@live-change/user-service": "^0.8.
|
|
69
|
-
"@live-change/vote-service": "^0.8.
|
|
70
|
-
"@live-change/vue3-components": "^0.8.
|
|
71
|
-
"@live-change/vue3-ssr": "^0.8.
|
|
72
|
-
"@live-change/wysiwyg-frontend": "^0.8.
|
|
38
|
+
"@live-change/access-control-frontend": "^0.8.95",
|
|
39
|
+
"@live-change/access-control-service": "^0.8.95",
|
|
40
|
+
"@live-change/backup-service": "^0.8.95",
|
|
41
|
+
"@live-change/blog-frontend": "^0.8.95",
|
|
42
|
+
"@live-change/blog-service": "^0.8.95",
|
|
43
|
+
"@live-change/cli": "^0.8.95",
|
|
44
|
+
"@live-change/content-frontend": "^0.8.95",
|
|
45
|
+
"@live-change/content-service": "^0.8.95",
|
|
46
|
+
"@live-change/dao": "^0.8.95",
|
|
47
|
+
"@live-change/dao-vue3": "^0.8.95",
|
|
48
|
+
"@live-change/dao-websocket": "^0.8.95",
|
|
49
|
+
"@live-change/db-client": "^0.8.95",
|
|
50
|
+
"@live-change/email-service": "^0.8.95",
|
|
51
|
+
"@live-change/framework": "^0.8.95",
|
|
52
|
+
"@live-change/frontend-auto-form": "^0.8.95",
|
|
53
|
+
"@live-change/frontend-base": "^0.8.95",
|
|
54
|
+
"@live-change/geoip-service": "^0.8.95",
|
|
55
|
+
"@live-change/image-frontend": "^0.8.95",
|
|
56
|
+
"@live-change/locale-settings-service": "^0.8.95",
|
|
57
|
+
"@live-change/password-authentication-service": "^0.8.95",
|
|
58
|
+
"@live-change/prosemirror-service": "^0.8.95",
|
|
59
|
+
"@live-change/secret-code-service": "^0.8.95",
|
|
60
|
+
"@live-change/secret-link-service": "^0.8.95",
|
|
61
|
+
"@live-change/session-service": "^0.8.95",
|
|
62
|
+
"@live-change/task-service": "^0.8.95",
|
|
63
|
+
"@live-change/upload-frontend": "^0.8.95",
|
|
64
|
+
"@live-change/url-frontend": "^0.8.95",
|
|
65
|
+
"@live-change/url-service": "^0.8.95",
|
|
66
|
+
"@live-change/user-frontend": "^0.8.95",
|
|
67
|
+
"@live-change/user-identification-service": "^0.8.95",
|
|
68
|
+
"@live-change/user-service": "^0.8.95",
|
|
69
|
+
"@live-change/vote-service": "^0.8.95",
|
|
70
|
+
"@live-change/vue3-components": "^0.8.95",
|
|
71
|
+
"@live-change/vue3-ssr": "^0.8.95",
|
|
72
|
+
"@live-change/wysiwyg-frontend": "^0.8.95",
|
|
73
73
|
"@vueuse/core": "^10.11.0",
|
|
74
74
|
"codeceptjs-assert": "^0.0.5",
|
|
75
75
|
"compression": "^1.7.4",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"vue3-scroll-border": "0.1.6"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@live-change/codeceptjs-helper": "^0.8.
|
|
94
|
+
"@live-change/codeceptjs-helper": "^0.8.95",
|
|
95
95
|
"codeceptjs": "^3.6.5",
|
|
96
96
|
"generate-password": "1.7.1",
|
|
97
97
|
"playwright": "^1.41.2",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
103
103
|
"license": "ISC",
|
|
104
104
|
"description": "",
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "852e9817a89ffe5f2b6dc13c658d7a1bfd4f8fa6"
|
|
106
106
|
}
|
package/server/app.config.js
CHANGED
package/server/services.list.js
CHANGED
|
@@ -23,6 +23,7 @@ import backup from '@live-change/backup-service'
|
|
|
23
23
|
import task from '@live-change/task-service'
|
|
24
24
|
import balance from "@live-change/balance-service"
|
|
25
25
|
import billing from "@live-change/billing-service"
|
|
26
|
+
import stripe from "@live-change/stripe-service"
|
|
26
27
|
import init from './init.js'
|
|
27
28
|
|
|
28
29
|
export {
|
|
@@ -51,6 +52,7 @@ export {
|
|
|
51
52
|
task,
|
|
52
53
|
balance,
|
|
53
54
|
billing,
|
|
55
|
+
stripe,
|
|
54
56
|
init
|
|
55
57
|
}
|
|
56
58
|
|