@ozdao/prometheus-framework 0.0.88 → 0.0.89

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-300fcb55.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-afba007a.mjs +1944 -0
  3. package/dist/ButtonFollow-001c4a65.mjs +130 -0
  4. package/dist/ButtonFollow-48043cc7.js +1 -0
  5. package/dist/CardHeader-0677d446.js +1 -0
  6. package/dist/CardHeader-e361dada.mjs +96 -0
  7. package/dist/CardOrganization-51309400.js +1 -0
  8. package/dist/CardOrganization-bacc2ef6.mjs +202 -0
  9. package/dist/Feed-4b28adc5.mjs +423 -0
  10. package/dist/Feed-5d8d5c21.js +1 -0
  11. package/dist/Feed-76b2997e.mjs +367 -0
  12. package/dist/Feed-eeb63363.js +1 -0
  13. package/dist/IconEdit-3028a3b7.js +1 -0
  14. package/dist/IconEdit-8df23653.mjs +205 -0
  15. package/dist/Image-30f04604.js +9 -0
  16. package/dist/Image-6ec294f3.mjs +477 -0
  17. package/dist/PlaceholderUserpic-10fd9026.js +1 -0
  18. package/dist/PlaceholderUserpic-eb9820ce.mjs +28 -0
  19. package/dist/Popup-7c331e1c.js +1 -0
  20. package/dist/Popup-bdf043ba.mjs +76 -0
  21. package/dist/Product-b233e2a3.js +7 -0
  22. package/dist/Product-eb00f35e.mjs +837 -0
  23. package/dist/ProductEdit-61413d02.mjs +349 -0
  24. package/dist/ProductEdit-fca68ff9.js +1 -0
  25. package/dist/ProfileBlogposts-6704a38c.js +1 -0
  26. package/dist/ProfileBlogposts-775b1cfa.mjs +63 -0
  27. package/dist/ProfileComments-175e42da.js +1 -0
  28. package/dist/ProfileComments-fd7d66bf.mjs +43 -0
  29. package/dist/ProfileEvents-4f2a5f00.js +1 -0
  30. package/dist/ProfileEvents-7a51a9e6.mjs +55 -0
  31. package/dist/ProfileLikes-20a8a3c9.mjs +43 -0
  32. package/dist/ProfileLikes-b3b1350a.js +1 -0
  33. package/dist/ProfileOrganizations-4b866823.mjs +211 -0
  34. package/dist/ProfileOrganizations-6d3a43e4.js +1 -0
  35. package/dist/Publics-0e44c61e.mjs +122 -0
  36. package/dist/Publics-4e1c14fc.js +1 -0
  37. package/dist/Tab-a243605d.mjs +46 -0
  38. package/dist/UploadImage-6e312c46.mjs +83 -0
  39. package/dist/UploadImage-9e7e7468.js +1 -0
  40. package/dist/auth-2bc18d1e.js +8 -0
  41. package/dist/auth-fefd15a3.mjs +1503 -0
  42. package/dist/auth.client.cjs +1 -1
  43. package/dist/auth.client.js +5 -5
  44. package/dist/auth.validation-4a617c0b.mjs +20 -0
  45. package/dist/auth.validation-78a90fed.js +1 -0
  46. package/dist/community.client.cjs +1 -1
  47. package/dist/community.client.js +14 -13
  48. package/dist/components/Field/Field.vue.d.ts.map +1 -1
  49. package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
  50. package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
  51. package/dist/events.client.cjs +1 -1
  52. package/dist/events.client.js +12 -11
  53. package/dist/inputs.validation-14e8e01f.mjs +93 -0
  54. package/dist/main.css +1 -1
  55. package/dist/organizations-1581c013.mjs +121 -0
  56. package/dist/organizations-c455dad7.js +1 -0
  57. package/dist/organizations.client-040ec107.js +3 -0
  58. package/dist/organizations.client-7937e180.mjs +3037 -0
  59. package/dist/organizations.client.cjs +1 -1
  60. package/dist/organizations.client.js +39 -39
  61. package/dist/organizations.server.js +7 -3
  62. package/dist/organizations.server.mjs +7 -3
  63. package/dist/prometheus-framework.cjs.js +1 -1
  64. package/dist/prometheus-framework.es.js +3 -2
  65. package/dist/style.css +1 -1
  66. package/dist/users.client.cjs +1 -1
  67. package/dist/users.client.js +265 -256
  68. package/dist/users.server.js +2 -2
  69. package/dist/users.server.mjs +2 -2
  70. package/package.json +1 -1
  71. package/src/components/Field/Field.vue +2 -1
  72. package/src/modules/community/components/pages/CreateBlogPost.vue +2 -1
  73. package/src/modules/events/components/pages/EditEvent.vue +2 -1
  74. package/src/modules/organizations/components/blocks/Socials.vue +16 -3
  75. package/src/modules/organizations/components/pages/OrganizationEdit.vue +39 -15
  76. package/src/modules/organizations/components/sections/DetailsTab.vue +13 -9
  77. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  78. package/src/modules/organizations/models/organization.model.js +6 -2
  79. package/src/modules/organizations/store/organizations.js +2 -2
  80. package/src/modules/users/components/pages/Profile.vue +26 -11
  81. package/src/modules/users/components/pages/ProfileEdit.vue +28 -10
  82. package/src/modules/users/models/user.model.js +2 -2
  83. package/src/modules/users/store/users.js +1 -2
@@ -165,12 +165,12 @@ var user_model = (mongoose) => {
165
165
  type: Date
166
166
  }
167
167
  },
168
- social: {
168
+ socials: {
169
169
  telegram: {
170
170
  type: String,
171
171
  default: ""
172
172
  },
173
- line: {
173
+ twitter: {
174
174
  type: String,
175
175
  default: ""
176
176
  },
@@ -164,12 +164,12 @@ var user_model = (mongoose) => {
164
164
  type: Date
165
165
  }
166
166
  },
167
- social: {
167
+ socials: {
168
168
  telegram: {
169
169
  type: String,
170
170
  default: ""
171
171
  },
172
- line: {
172
+ twitter: {
173
173
  type: String,
174
174
  default: ""
175
175
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/prometheus-framework",
3
- "version": "0.0.88",
3
+ "version": "0.0.89",
4
4
  "description": "Web3 Framework focused on user experience and ease of development.",
5
5
  "author": "OZ DAO <hello@ozdao.dev>",
6
6
  "license": "GPL-3.0-or-later",
@@ -45,7 +45,8 @@ const props = defineProps({
45
45
  type: 'text',
46
46
  placeholder: 'Enter something here',
47
47
  field: null,
48
- validation: false
48
+ validation: false,
49
+ disabled: false
49
50
  });
50
51
 
51
52
  const text = ref(props.field);
@@ -131,7 +131,8 @@ onMounted(async () =>{
131
131
 
132
132
  const dataPublics = await organizations.actions.read({
133
133
  user: auth.state.user._id,
134
- postable: auth.state.user._id
134
+ postable: auth.state.user._id,
135
+ limit: 100
135
136
  })
136
137
 
137
138
  console.log(dataPublics)
@@ -156,7 +156,8 @@ onMounted(async () =>{
156
156
 
157
157
  const dataPublics = await organizations.actions.read({
158
158
  user: auth.state.user._id,
159
- postable: auth.state.user._id
159
+ postable: auth.state.user._id,
160
+ limit: 100
160
161
  })
161
162
 
162
163
  publics.value = dataPublics.map(publicItem => ({
@@ -55,12 +55,25 @@ const props = defineProps({
55
55
  });
56
56
 
57
57
  const socialLinks = computed(() => {
58
- const networks = ['telegram', 'facebook', 'instagram', 'twitter', 'reddit', 'line', 'dribbble'];
58
+ const networks = [
59
+ {name: 'telegram', base: 'https://t.me/'},
60
+ {name: 'facebook', base: 'https://www.facebook.com/'},
61
+ {name: 'instagram', base: 'https://www.instagram.com/'},
62
+ {name: 'twitter', base: 'https://twitter.com/'},
63
+ {name: 'reddit', base: 'https://www.reddit.com/user/'},
64
+ {name: 'line', base: ''}, // не уверен в базовом URL для Line, добавьте его, если необходимо
65
+ {name: 'dribbble', base: 'https://dribbble.com/'}
66
+ ];
67
+
59
68
  return networks
60
- .filter(name => props[name])
61
- .map(name => ({ name, href: props[name] }));
69
+ .filter(network => props[network.name])
70
+ .map(network => ({
71
+ name: network.name,
72
+ href: network.base + props[network.name]
73
+ }));
62
74
  });
63
75
 
76
+
64
77
  function resolveSocialIcon(name) {
65
78
  const icons = {
66
79
  telegram: IconTelegram,
@@ -1,9 +1,17 @@
1
1
  <template>
2
2
  <div class="for-transition pd-thin">
3
-
4
-
5
3
 
6
-
4
+ <h3 class="mn-small">Type of group</h3>
5
+ <p class="mn-thin">Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.</p>
6
+
7
+ <SelectMulti
8
+ v-model="organization.state.current.types"
9
+ :options="['public','exclusive','hidden']"
10
+ :multiple="false"
11
+ :taggable="false"
12
+ placeholder="Type to search or add type of organization"
13
+ class="mn-semi bg-grey pd-medium radius-small"
14
+ />
7
15
 
8
16
 
9
17
  <h3 class="mn-small">Profile</h3>
@@ -17,7 +25,7 @@
17
25
  <h4>Upload photo</h4>
18
26
  </div>
19
27
 
20
- <Field
28
+ <Field
21
29
  v-model:field="organization.state.current.profile.name"
22
30
  placeholder="Name of organization"
23
31
  class="mn-thin bg-grey pd-medium radius-small"
@@ -25,7 +33,7 @@
25
33
 
26
34
  <Field
27
35
  v-model:field="organization.state.current.profile.description"
28
- placeholder="Bio"
36
+ placeholder="Brief description of your group"
29
37
  class="mn-thin bg-grey pd-medium radius-small"
30
38
  />
31
39
  <BlockTags
@@ -33,17 +41,33 @@
33
41
  :tags="organization.state.current.profile.tags"
34
42
  />
35
43
 
36
- <h3 class="mn-small">Settings</h3>
37
- <p class="mn-thin">Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.</p>
38
- <SelectMulti
39
- v-model="organization.state.current.types"
40
- :options="['public','exclusive','hidden']"
41
- :multiple="false"
42
- :taggable="false"
43
- placeholder="Type to search or add type of organization"
44
- class="mn-semi bg-grey pd-medium radius-small"
45
- />
44
+ <h3 class="mn-small">Socials</h3>
45
+ <p class="mn-thin">Please provide only the username for social media profiles, without full links.</p>
46
46
 
47
+ <Field
48
+ v-model:field="organization.state.current.socials.instagram"
49
+ label="Instagram"
50
+ placeholder=""
51
+ class="mn-thin bg-grey pd-medium radius-small"
52
+ />
53
+ <Field
54
+ v-model:field="organization.state.current.socials.twitter"
55
+ label="Twitter"
56
+ placeholder=""
57
+ class="mn-thin bg-grey pd-medium radius-small"
58
+ />
59
+ <Field
60
+ v-model:field="organization.state.current.socials.facebook"
61
+ label="Facebook"
62
+ placeholder=""
63
+ class="mn-thin bg-grey pd-medium radius-small"
64
+ />
65
+ <Field
66
+ v-model:field="organization.state.current.socials.telegram"
67
+ label="Telegram"
68
+ placeholder=""
69
+ class="mn-thin bg-grey pd-medium radius-small"
70
+ />
47
71
 
48
72
  <Button :submit="onSubmit" :callback="redirectTo" class="mn-thin">Save</Button>
49
73
  <!-- <Button :submit="onDelete" :callback="redirectDash" class="mn-thin bg-fourth">Delete</Button> -->
@@ -44,15 +44,19 @@
44
44
 
45
45
  <slot></slot>
46
46
 
47
-
48
- <h4 v-if="organization.social.telegram" class="mn-t-small mn-thin">Find us in socials</h4>
49
-
50
- <Socials
51
- :telegram="organization.social.telegram"
52
- :facebook="organization.social.facebook"
53
- :instagram="organization.social.instagram"
54
- :line="organization.social.line"
55
- />
47
+ <h4
48
+ v-if="Object.values(organization.socials).some(value => value)"
49
+ class="mn-t-small mn-thin"
50
+ >
51
+ Find us in socials
52
+ </h4>
53
+
54
+ <Socials
55
+ :telegram="organization.socials.telegram"
56
+ :facebook="organization.socials.facebook"
57
+ :instagram="organization.socials.instagram"
58
+ :twitter="organization.socials.twitter"
59
+ />
56
60
  </section>
57
61
 
58
62
  <!-- <h3 class="mn-small">Rating</h3>
@@ -191,7 +191,7 @@ const controllerFactory = (db) => {
191
191
  owner: 1,
192
192
  contacts: 1,
193
193
  rating: 1,
194
- social: 1,
194
+ socials: 1,
195
195
  numberOfProducts: 1,
196
196
  numberOfMemberships: 1,
197
197
  memberships: 1,
@@ -6,6 +6,10 @@ module.exports = (mongoose) => {
6
6
  ref: 'User',
7
7
  required: true,
8
8
  },
9
+ official: {
10
+ type: Boolean,
11
+ default: false,
12
+ },
9
13
  // Types of organizations
10
14
  types: {
11
15
  type: Array,
@@ -31,9 +35,9 @@ module.exports = (mongoose) => {
31
35
  },
32
36
  address: String,
33
37
  },
34
- social: {
38
+ socials: {
35
39
  telegram: String,
36
- line: String,
40
+ twitter: String,
37
41
  facebook: String,
38
42
  instagram: String
39
43
  },
@@ -27,7 +27,7 @@ const state = reactive({
27
27
  phone: '',
28
28
  address: '',
29
29
  },
30
- social: {
30
+ socials: {
31
31
  telegram: '',
32
32
  line: '',
33
33
  facebook: '',
@@ -218,7 +218,7 @@ const actions = {
218
218
  phone: '',
219
219
  address: '',
220
220
  },
221
- social: {
221
+ socials: {
222
222
  telegram: '',
223
223
  line: '',
224
224
  facebook: '',
@@ -14,7 +14,7 @@
14
14
  />
15
15
 
16
16
  <section
17
- class="t-center w-100 mn-semi radius-medium pd-medium bg-grey"
17
+ class="flex-center flex flex-column t-center w-100 mn-semi radius-medium pd-medium bg-grey"
18
18
  >
19
19
  <IconEdit
20
20
  v-if="route.params._id === auth.state.user._id"
@@ -70,14 +70,28 @@
70
70
  </p>
71
71
 
72
72
  <ButtonFollow
73
- v-if="auth.state.user._id && route.params._id && route.params._id !== auth.state.user._id"
74
- :type="'user'"
75
- :isMember="users.state.current.isMember"
76
- :targetId="users.state.current._id"
77
- :userId="auth.state.user._id"
78
- class="w-min mn-auto"
79
- @updateMembership="handleMembershipUpdate"
80
- />
73
+ v-if="auth.state.user._id && route.params._id && route.params._id !== auth.state.user._id"
74
+ :type="'user'"
75
+ :isMember="users.state.current.isMember"
76
+ :targetId="users.state.current._id"
77
+ :userId="auth.state.user._id"
78
+ class="w-min mn-auto"
79
+ @updateMembership="handleMembershipUpdate"
80
+ />
81
+
82
+ <h4
83
+ v-if="Object.values(users.state.current.socials).some(value => value)"
84
+ class="mn-t-small mn-thin"
85
+ >
86
+ Find Me in Socials
87
+ </h4>
88
+ <Socials
89
+ :telegram="users.state.current.socials.telegram"
90
+ :facebook="users.state.current.socials.facebook"
91
+ :instagram="users.state.current.socials.instagram"
92
+ :twitter="users.state.current.socials.twitter"
93
+ class="mn-r-auto mn-l-auto"
94
+ />
81
95
 
82
96
  </section>
83
97
 
@@ -95,7 +109,7 @@
95
109
  <span>Posts</span>
96
110
  </MenuItem>
97
111
  </Menu>
98
-
112
+ <!--
99
113
  <Menu>
100
114
  <MenuItem @click="router.push({name: 'User Comments', params: {_id: route.params._id}})" class="cursor-pointer">
101
115
  <span>Comments</span>
@@ -103,7 +117,7 @@
103
117
  <MenuItem @click="router.push({name: 'User Likes', params: {_id: route.params._id}})" class="cursor-pointer">
104
118
  <span>Likes</span>
105
119
  </MenuItem>
106
- </Menu>
120
+ </Menu> -->
107
121
 
108
122
  <Menu
109
123
  v-if="auth.state.user._id === route.params._id"
@@ -148,6 +162,7 @@ import MenuItem from '@pf/src/modules/mobile/components/Menu/MenuItem.vue'
148
162
  import ButtonFollow from '@pf/src/modules/organizations/components/elements/ButtonFollow.vue'
149
163
  // Community Module
150
164
  import Activity from '@pf/src/modules/community/components/blocks/Activity.vue';
165
+ import Socials from '@pf/src/modules/organizations/components/blocks/Socials.vue'
151
166
  // Users Module
152
167
  import ProfileCompletion from '@pf/src/modules/users/components/sections/ProfileCompletion.vue'
153
168
  // Icons Module
@@ -59,6 +59,33 @@
59
59
  class="mn-semi bg-grey pd-medium radius-small"
60
60
  :validation="organizationName"
61
61
  />
62
+ <h3 class="mn-small">Socials</h3>
63
+ <p class="mn-thin">Please provide only the username for social media profiles, without full links.</p>
64
+
65
+ <Field
66
+ v-model:field="user.socials.instagram"
67
+ label="Instagram"
68
+ placeholder=""
69
+ class="mn-thin bg-grey pd-medium radius-small"
70
+ />
71
+ <Field
72
+ v-model:field="user.socials.twitter"
73
+ label="Twitter"
74
+ placeholder=""
75
+ class="mn-thin bg-grey pd-medium radius-small"
76
+ />
77
+ <Field
78
+ v-model:field="user.socials.facebook"
79
+ label="Facebook"
80
+ placeholder=""
81
+ class="mn-thin bg-grey pd-medium radius-small"
82
+ />
83
+ <Field
84
+ v-model:field="user.socials.telegram"
85
+ label="Telegram"
86
+ placeholder=""
87
+ class="mn-semi bg-grey pd-medium radius-small"
88
+ />
62
89
  <!-- -->
63
90
  <h3 class="mn-small">Account</h3>
64
91
 
@@ -78,16 +105,7 @@
78
105
  label="Email"
79
106
  placeholder="Not specified"
80
107
  class="mn-thin bg-grey pd-medium radius-small"
81
- disabled="true"
82
- :validation="organizationName"
83
- />
84
-
85
- <Field
86
- v-model:field="user.password"
87
- label="Password"
88
- placeholder="Not specified"
89
- class="mn-semi bg-grey pd-medium radius-small"
90
- disabled="true"
108
+ :disabled="true"
91
109
  :validation="organizationName"
92
110
  />
93
111
 
@@ -25,12 +25,12 @@ module.exports = (mongoose) => {
25
25
  }
26
26
  },
27
27
 
28
- social: {
28
+ socials: {
29
29
  telegram: {
30
30
  type: String,
31
31
  default: ''
32
32
  },
33
- line: {
33
+ twitter: {
34
34
  type: String,
35
35
  default: ''
36
36
  },
@@ -19,10 +19,9 @@ const state = reactive({
19
19
  description: "",
20
20
  birthday: "",
21
21
  },
22
-
23
22
  socials: {
24
23
  facebook: "",
25
- line: "",
24
+ twitter: "",
26
25
  instagram: "",
27
26
  telegram: ""
28
27
  },