mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-31 23:11:15 +00:00
save state and close tab afetr success
This commit is contained in:
parent
433c73c9d3
commit
cc751960ac
2 changed files with 5 additions and 4 deletions
|
|
@ -45,7 +45,7 @@ export default {
|
|||
},
|
||||
openPaypal (url) {
|
||||
const appState = {
|
||||
path: this.$route.fullPath,
|
||||
inProgress: 'payment',
|
||||
paymentMethod: 'paypal',
|
||||
};
|
||||
setLocalSetting(CONSTANTS.savedAppStateValues.SAVED_APP_STATE, JSON.stringify(appState));
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
import { CONSTANTS, removeLocalSetting } from 'client/libs/userlocalManager';
|
||||
|
||||
export default function (to, from, next) {
|
||||
const redirect = to.params.redirect;
|
||||
|
||||
switch (redirect) {
|
||||
case 'paypal-success-checkout':
|
||||
console.log('checkout');
|
||||
break;
|
||||
case 'paypal-success-subscribe':
|
||||
console.log('subscribe');
|
||||
removeLocalSetting(CONSTANTS.savedAppStateValues.SAVED_APP_STATE);
|
||||
window.close();
|
||||
break;
|
||||
default:
|
||||
next({name: 'notFound'});
|
||||
|
|
|
|||
Loading…
Reference in a new issue