@moonbase.sh/vue 0.1.85 → 0.1.86
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/index.cjs +9 -0
- package/dist/index.js +10 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -278,6 +278,15 @@ function useActivationRequest(requestId) {
|
|
|
278
278
|
if (completionTimeout.value)
|
|
279
279
|
clearTimeout(completionTimeout.value);
|
|
280
280
|
});
|
|
281
|
+
(0, import_vue7.watch)(storefront.currentUser, async () => {
|
|
282
|
+
loading.value = true;
|
|
283
|
+
try {
|
|
284
|
+
activationRequest.value = await storefront.client.activationRequests.get(requestId);
|
|
285
|
+
} catch (e) {
|
|
286
|
+
error.value = e;
|
|
287
|
+
}
|
|
288
|
+
loading.value = false;
|
|
289
|
+
});
|
|
281
290
|
const checkCompletion = async () => {
|
|
282
291
|
const completed = await storefront.client.activationRequests.isCompleted(requestId);
|
|
283
292
|
if (completed && activationRequest.value)
|
package/dist/index.js
CHANGED
|
@@ -223,7 +223,7 @@ function useInventory() {
|
|
|
223
223
|
|
|
224
224
|
// src/composables/useActivationRequest.ts
|
|
225
225
|
import { ActivationRequestStatus } from "@moonbase.sh/storefront-api";
|
|
226
|
-
import { computed as computed5, inject as inject6, onBeforeUnmount } from "vue";
|
|
226
|
+
import { computed as computed5, inject as inject6, onBeforeUnmount, watch } from "vue";
|
|
227
227
|
function useActivationRequest(requestId) {
|
|
228
228
|
const storefront = inject6(storefrontKey);
|
|
229
229
|
if (!storefront)
|
|
@@ -243,6 +243,15 @@ function useActivationRequest(requestId) {
|
|
|
243
243
|
if (completionTimeout.value)
|
|
244
244
|
clearTimeout(completionTimeout.value);
|
|
245
245
|
});
|
|
246
|
+
watch(storefront.currentUser, async () => {
|
|
247
|
+
loading.value = true;
|
|
248
|
+
try {
|
|
249
|
+
activationRequest.value = await storefront.client.activationRequests.get(requestId);
|
|
250
|
+
} catch (e) {
|
|
251
|
+
error.value = e;
|
|
252
|
+
}
|
|
253
|
+
loading.value = false;
|
|
254
|
+
});
|
|
246
255
|
const checkCompletion = async () => {
|
|
247
256
|
const completed = await storefront.client.activationRequests.isCompleted(requestId);
|
|
248
257
|
if (completed && activationRequest.value)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.86",
|
|
5
5
|
"description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@vue/devtools-api": "^6.5.1",
|
|
20
20
|
"uuid": "^9.0.1",
|
|
21
|
-
"@moonbase.sh/storefront-api": "0.1.
|
|
21
|
+
"@moonbase.sh/storefront-api": "0.1.86"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/uuid": "^9.0.7",
|