Skip to content

Commit 72872c8

Browse files
committed
integrate cb-login-signup web-component
1 parent b054793 commit 72872c8

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

components/Navbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default {
7979
navbar.showhamburger = true
8080
},
8181
toggleLoginDialog() {
82-
this.$emit('toggleShowLoginModal')
82+
document.getElementsByTagName('cb-login-signup')[0].classList.remove('hide-cb-login-signup-prompt')
8383
}
8484
}
8585
}

layouts/default.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
<template>
22
<div class="a-hb">
33
<promotion-banner />
4-
<Modal v-if="showModal" @close="toggleShowModal">
5-
<div slot="body">
6-
<LoginDialog />
7-
</div>
8-
</Modal>
4+
<cb-login-signup class="hide-cb-login-signup-prompt" />
95
<Navbar @toggleShowLoginModal="toggleShowModal"/>
106
<nuxt />
117
<Footer />
@@ -14,8 +10,6 @@
1410
<script>
1511
import Navbar from "../components/Navbar";
1612
import Footer from "../components/Footer";
17-
import Modal from '~/components/Base/Modal.vue'
18-
import LoginDialog from '~/components/Base/LoginDialog.vue'
1913
import config from '~/config.js';
2014
export default {
2115
data() {
@@ -25,9 +19,7 @@ export default {
2519
},
2620
components: {
2721
Navbar,
28-
Footer,
29-
Modal,
30-
LoginDialog
22+
Footer
3123
},
3224
head: {
3325
bodyAttrs: {
@@ -49,7 +41,7 @@ export default {
4941
5042
const loginPrompt = localStorage.getItem('loginPrompt')
5143
if(loginPrompt === 'true') {
52-
this.showModal = true
44+
document.getElementsByTagName('cb-login-signup')[0].classList.remove('hide-cb-login-signup-prompt')
5345
}
5446
}
5547
},

nuxt.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default {
1717
],
1818
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
1919
script: [
20-
{ src: 'https://unpkg.com/@coding-blocks/web-components@0.1.1/dist/index.js' },
20+
{ src: 'https://unpkg.com/@coding-blocks/web-components@0.2.1/dist/index.js' },
2121
{ src: 'https://code.jivosite.com/widget.js', 'data-jv-id': 'ASYGLZQ6UC' }
2222
]
2323
},

0 commit comments

Comments
 (0)