geer-builder 1.2.903 → 1.2.905
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/GNoSlotDashboardPackage.vue +2 -1
- package/components/GProfile.vue +2 -2
- package/index.js +11 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="g-dashboard-package">
|
|
3
3
|
<template v-if="product_list.length>0">
|
|
4
4
|
<!-- <h5 style="margin-bottom:10px;">Buy now and be part of our community!</h5> -->
|
|
5
|
-
<h5 style="margin-bottom:10px;">
|
|
5
|
+
<h5 style="margin-bottom:10px;">{{ heading }}</h5>
|
|
6
6
|
<div class="product-line" >
|
|
7
7
|
<div v-for="(field, i) in product_list" :key="i" class="imgcontainer" :style="`background-color:`+background_color+``">
|
|
8
8
|
<div :style="`background-image: url(${field.primary_picture ? field.primary_picture : public_settings.default_product_picture ? public_settings.default_product_picture : 'https://bvusolution.com/images/product-no-image.jpg'});height:200px;width:230px;background-size:80%`" class="image product-list-image" :id="i">
|
|
@@ -41,6 +41,7 @@ export default {
|
|
|
41
41
|
width:String,
|
|
42
42
|
image_size:String,
|
|
43
43
|
country_code: String,
|
|
44
|
+
heading: { type: String, default: 'Be a Member to make the World better' },
|
|
44
45
|
},
|
|
45
46
|
data: () =>
|
|
46
47
|
({
|
package/components/GProfile.vue
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
|
-
<div v-if="prop_user_info && show_elms_login == true && ( show_elms_login_test == false || ( show_elms_login_test == true && prop_user_info.enable_elms_test ) )">
|
|
23
|
+
<!-- <div v-if="prop_user_info && show_elms_login == true && ( show_elms_login_test == false || ( show_elms_login_test == true && prop_user_info.enable_elms_test ) )">
|
|
24
24
|
<q-btn class="full-width q-mt-sm" @click="getElmsLogin()" color="primary" outline>Login to elms</q-btn>
|
|
25
|
-
</div>
|
|
25
|
+
</div> -->
|
|
26
26
|
<div v-if="show_privilege_card && disable_privilege_card != true">
|
|
27
27
|
<g-privilege-card ></g-privilege-card>
|
|
28
28
|
</div>
|
package/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export default class auth
|
|
|
8
8
|
{
|
|
9
9
|
this.handler = null;
|
|
10
10
|
this.notification = null;
|
|
11
|
+
this.unsubscribeUser = null;
|
|
11
12
|
}
|
|
12
13
|
async initializer(handler)
|
|
13
14
|
{
|
|
@@ -26,7 +27,10 @@ export default class auth
|
|
|
26
27
|
{
|
|
27
28
|
if (user)
|
|
28
29
|
{
|
|
29
|
-
|
|
30
|
+
// Unsubscribe previous listener if exists (account switch)
|
|
31
|
+
if (this.unsubscribeUser) this.unsubscribeUser();
|
|
32
|
+
|
|
33
|
+
this.unsubscribeUser = await new DB_USER().doc(user.uid).onSnapshot(async (doc) =>
|
|
30
34
|
{
|
|
31
35
|
localStorage.setItem('user_info', JSON.stringify(doc.data()))
|
|
32
36
|
this.handler.$store.commit('vuex_user/updateUser', doc.data());
|
|
@@ -35,6 +39,12 @@ export default class auth
|
|
|
35
39
|
}
|
|
36
40
|
else
|
|
37
41
|
{
|
|
42
|
+
// Unsubscribe user listener on logout
|
|
43
|
+
if (this.unsubscribeUser)
|
|
44
|
+
{
|
|
45
|
+
this.unsubscribeUser();
|
|
46
|
+
this.unsubscribeUser = null;
|
|
47
|
+
}
|
|
38
48
|
localStorage.removeItem('user_info');
|
|
39
49
|
this.handler.$store.commit('vuex_user/updateUser', null);
|
|
40
50
|
}
|