@tapni/auth 1.0.72 → 1.0.73
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/README.md +11 -0
- package/dist/.vite/manifest.json +26 -26
- package/dist/{Apps-Cz5rdOWu.js → Apps-Dys7WVIh.js} +4 -4
- package/dist/{CustomApp-C2_MFR0o.js → CustomApp-tARqhmAA.js} +6 -6
- package/dist/{QR-BnhhTtpP.js → QR-NKmxwqC3.js} +3 -3
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +25 -20
- package/dist/{install-Ct-hQgCR.js → install-BIhtHWTM.js} +6559 -5485
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/views/Billing.vue +76 -2
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.app-store-icon[data-v-4abaaa1d]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-96f72130],#emailInput[data-v-96f72130]{text-align:center;padding-right:15%;font-size:17px}.firstRow img[data-v-64ae2517]{width:25px;height:25px;position:absolute;top:50%;right:0;transform:translate(-50%,-50%)}#emailInput[data-v-707a4b16]{text-align:center;padding-right:15%;font-size:17px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:667px!important;margin:1.5% auto auto;height:95%!important;border-radius:20px}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2)
|
|
1
|
+
.app-store-icon[data-v-4abaaa1d]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-96f72130],#emailInput[data-v-96f72130]{text-align:center;padding-right:15%;font-size:17px}.firstRow img[data-v-64ae2517]{width:25px;height:25px;position:absolute;top:50%;right:0;transform:translate(-50%,-50%)}#emailInput[data-v-707a4b16]{text-align:center;padding-right:15%;font-size:17px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:667px!important;margin:1.5% auto auto;height:95%!important;border-radius:20px}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);transform:translateZ(0);animation:load8 1.1s infinite linear}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:16px;z-index:2}.header-logo-img{height:40px;margin-top:10px}@media (max-width: 768px){#bodyId{margin-top:0;border-radius:0;height:100%!important}.header-logo{margin-top:16px}}.withBackground[data-v-2f7f5584],.withBackground[data-v-36b27d1f]{height:50px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapni/auth",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.73",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/TapniAuth.umd.js",
|
|
6
6
|
"module": "./dist/TapniAuth.es.js",
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
"vite": "^5.4.11",
|
|
66
66
|
"vite-plugin-node-polyfills": "^0.22.0"
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|
package/src/views/Billing.vue
CHANGED
|
@@ -76,8 +76,25 @@
|
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
78
78
|
|
|
79
|
-
<div class="subscription-actions"
|
|
79
|
+
<div class="subscription-actions">
|
|
80
80
|
<button
|
|
81
|
+
v-if="sub.status === 'canceled' || sub.status === 'expired'"
|
|
82
|
+
@click="resubscribe(sub)"
|
|
83
|
+
class="resubscribe-button"
|
|
84
|
+
:disabled="loading"
|
|
85
|
+
>
|
|
86
|
+
{{ loading ? 'Processing...' : 'Re-Subscribe' }}
|
|
87
|
+
</button>
|
|
88
|
+
<button
|
|
89
|
+
v-if="sub.status === 'past_due' || sub.status === 'unpaid'"
|
|
90
|
+
@click="retryPayment(sub)"
|
|
91
|
+
class="pay-now-button"
|
|
92
|
+
:disabled="loading"
|
|
93
|
+
>
|
|
94
|
+
{{ loading ? 'Processing...' : 'Pay Now' }}
|
|
95
|
+
</button>
|
|
96
|
+
<button
|
|
97
|
+
v-if="sub.status !== 'canceled' && sub.status !== 'expired' && sub.status !== 'past_due' && sub.status !== 'unpaid'"
|
|
81
98
|
@click="openCancelModal(sub)"
|
|
82
99
|
class="cancel-button"
|
|
83
100
|
:disabled="loading"
|
|
@@ -203,7 +220,8 @@ export default {
|
|
|
203
220
|
'active': 'Active',
|
|
204
221
|
'past_due': 'Past Due',
|
|
205
222
|
'canceled': 'Canceled',
|
|
206
|
-
'unpaid': 'Unpaid'
|
|
223
|
+
'unpaid': 'Unpaid',
|
|
224
|
+
'expired': 'Expired'
|
|
207
225
|
};
|
|
208
226
|
return statusMap[status] || status;
|
|
209
227
|
},
|
|
@@ -274,6 +292,62 @@ export default {
|
|
|
274
292
|
} finally {
|
|
275
293
|
this.loading = false;
|
|
276
294
|
}
|
|
295
|
+
},
|
|
296
|
+
async resubscribe(sub) {
|
|
297
|
+
if (!sub?.subscriptionId) return;
|
|
298
|
+
if (sub.paymentGateway === 'revenuecat') {
|
|
299
|
+
EventBus.$emit('ssoEvent', {
|
|
300
|
+
name: 'resubscribe',
|
|
301
|
+
data: { subscriptionId: sub.subscriptionId, paymentGateway: sub.paymentGateway }
|
|
302
|
+
});
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
this.loading = true;
|
|
306
|
+
try {
|
|
307
|
+
const response = await api(false, 'v2').post('checkout/resubscribe/' + sub.subscriptionId);
|
|
308
|
+
if (response.data.success) {
|
|
309
|
+
EventBus.$emit('showToast', { type: 'success', message: response.data.message || 'Subscription reactivated successfully' });
|
|
310
|
+
await this.getAccountSettings();
|
|
311
|
+
this.loadSubscriptions();
|
|
312
|
+
if (response.data.clientSecret) {
|
|
313
|
+
EventBus.$emit('ssoEvent', { name: 'resubscribePaymentRequired', data: { clientSecret: response.data.clientSecret } });
|
|
314
|
+
}
|
|
315
|
+
} else {
|
|
316
|
+
throw new Error(response.data.message || 'Failed to resubscribe');
|
|
317
|
+
}
|
|
318
|
+
} catch (error) {
|
|
319
|
+
EventBus.$emit('showToast', {
|
|
320
|
+
type: 'error',
|
|
321
|
+
message: error.response?.data?.error || error.response?.data?.message || 'Failed to resubscribe. Please try again.'
|
|
322
|
+
});
|
|
323
|
+
} finally {
|
|
324
|
+
this.loading = false;
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
async retryPayment(sub) {
|
|
328
|
+
if (!sub?.subscriptionId) return;
|
|
329
|
+
this.loading = true;
|
|
330
|
+
try {
|
|
331
|
+
const response = await api(false, 'v2').post('checkout/retry-payment/' + sub.subscriptionId);
|
|
332
|
+
const data = response.data;
|
|
333
|
+
if (data.paid) {
|
|
334
|
+
EventBus.$emit('showToast', { type: 'success', message: data.message || 'Payment successful' });
|
|
335
|
+
await this.getAccountSettings();
|
|
336
|
+
this.loadSubscriptions();
|
|
337
|
+
} else if (data.hostedInvoiceUrl) {
|
|
338
|
+
window.open(data.hostedInvoiceUrl, '_blank', 'noopener,noreferrer');
|
|
339
|
+
EventBus.$emit('showToast', { type: 'info', message: data.message || 'Please complete payment in the opened window.' });
|
|
340
|
+
} else {
|
|
341
|
+
throw new Error(data.message || 'Payment could not be processed');
|
|
342
|
+
}
|
|
343
|
+
} catch (error) {
|
|
344
|
+
EventBus.$emit('showToast', {
|
|
345
|
+
type: 'error',
|
|
346
|
+
message: error.response?.data?.error || error.response?.data?.message || 'Failed to retry payment. Please try again.'
|
|
347
|
+
});
|
|
348
|
+
} finally {
|
|
349
|
+
this.loading = false;
|
|
350
|
+
}
|
|
277
351
|
}
|
|
278
352
|
}
|
|
279
353
|
};
|