@@ -117,6 +104,7 @@ import { logout, transactionsQuery } from '../../graphql/queries' import ContentFooter from './ContentFooter.vue' import { FadeTransition } from 'vue2-transitions' import VueQrcode from 'vue-qrcode' +import CONFIG from '../../config' export default { components: { @@ -183,6 +171,20 @@ export default { updateBalance(ammount) { this.balance -= ammount }, + admin() { + window.location.assign(CONFIG.ADMIN_AUTH_URL.replace('$1', this.$store.state.token)) + this.$store.dispatch('logout') // logout without redirect + }, + getElopageLink() { + const pId = this.$store.state.publisherId + ? this.$store.state.publisherId + : CONFIG.DEFAULT_PUBLISHER_ID + return encodeURI( + this.$store.state.hasElopage + ? `https://elopage.com/s/gradido/sign_in?locale=${this.$i18n.locale}` + : `https://elopage.com/s/gradido/basic-de/payment?locale=${this.$i18n.locale}&prid=111&pid=${pId}&firstName=${this.$store.state.firstName}&lastName=${this.$store.state.lastName}&email=${this.$store.state.email}`, + ) + }, }, }