Skip to content

Commit

Permalink
Merge branch 'rc' into 'main'
Browse files Browse the repository at this point in the history
fix: go to new vault in iframe mode

See merge request locker/web!214
  • Loading branch information
duchunter committed Aug 6, 2024
2 parents dc6d663 + e68666b commit b52c4d8
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/landing/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</a>

<template v-if="showMyVaultBtn">
<a href="https://passwords.locker.io" class="landing-btn">My Vault</a>
<a href="#" class="landing-btn" @click.prevent="goToVault">My Vault</a>
</template>
<template v-else>
<nuxt-link
Expand Down Expand Up @@ -135,7 +135,7 @@

<template v-if="showMyVaultBtn">
<li class="sm:hidden">
<a href="https://passwords.locker.io" class="inline-block nav-item text-black landing-transition">My Vault</a>
<a href="#" class="inline-block nav-item text-black landing-transition" @click.prevent="goToVault">My Vault</a>
</li>
</template>
<template v-else>
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/landing/whitepaper/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<!-- Right actions -->
<div class="hidden sm:flex lg:ml-16 lg:mr-0 ml-auto mr-6 lg:order-4 order-2">
<template v-if="showMyVaultBtn">
<a href="https://passwords.locker.io" class="landing-btn">My Vault</a>
<a href="#" class="landing-btn" @click.prevent="goToVault">My Vault</a>
</template>
<template v-else>
<nuxt-link
Expand Down Expand Up @@ -87,7 +87,7 @@
</div>
<template v-if="showMyVaultBtn">
<li class="sm:hidden">
<a href="https://passwords.locker.io" class="inline-block nav-item text-black landing-transition">My Vault</a>
<a href="#" class="inline-block nav-item text-black landing-transition" @click.prevent="goToVault">My Vault</a>
</li>
</template>
<template v-else>
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/components/pages/promo/PaymentDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ export default {
},
goToLogin () {
// this.$router.push(this.localeRoute({ path: '/vault' }))
window.location = 'https://passwords.locker.io'
this.goToVault()
},
async handleAddCardDone ({ tokenId, country }) {
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/pages/business/confirmation/_token.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ export default {
methods: {
async goNext () {
clearInterval(this.intervalTimer)
// this.$router.push(this.localePath('/vault'))
window.location = 'https://passwords.locker.io'
this.goToVault()
},
backHome () {
this.$router.push(this.localePath('/business/register'))
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/pages/lifetime/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,7 @@ export default {
},
goToLogin () {
// this.$router.push(this.localePath('/vault'))
window.location = 'https://passwords.locker.io'
this.goToVault()
},
calcPrice: debounce(function () {
Expand Down
6 changes: 0 additions & 6 deletions src/renderer/pages/thankyou.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ export default {
},
beforeDestroy () {
clearInterval(this.countdown)
},
methods: {
goToVault () {
// this.$router.push(this.localeRoute('/vault'))
window.location = 'https://passwords.locker.io'
}
}
}
</script>
Expand Down
17 changes: 17 additions & 0 deletions src/renderer/plugins/mixins/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ Vue.mixin({
domain
)
})
},

goToVault () {
let isIframe = false
try {
if (window) {
isIframe = !!window.sessionStorage.getItem('isIframe')
}
} catch (error) {
isIframe = this.$route.query.mode === 'iframe'
}
const vaultUrl = `https://passwords.locker.io?lang=${this.locale}`
if (isIframe) {
this.postIframeMessage('external', vaultUrl)
} else {
window.location = vaultUrl
}
}
}
})

0 comments on commit b52c4d8

Please sign in to comment.