@ozdao/prometheus-framework 0.1.85 → 0.1.86

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  2. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +22 -22
  3. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Button/Button.vue.js +224 -2
  5. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -224
  7. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  9. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  11. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +1 -1
  13. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Select/Select.vue.js +78 -2
  15. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -78
  17. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/auth/store/auth.js +106 -84
  31. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +4 -1
  38. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +62 -2
  39. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -4
  40. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -62
  41. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  51. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
  61. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  63. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +3 -3
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  79. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  81. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  83. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  85. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  87. package/dist/style.css +1 -1
  88. package/package.json +1 -1
  89. package/src/modules/auth/store/auth.js +42 -42
@@ -27,27 +27,28 @@
27
27
  },
28
28
  });
29
29
 
30
- // async function initialize() {
31
- const userCookie = getCookie('user');
32
-
33
- if (userCookie) {
34
- const {_id, email, phone, roles, accessToken} = userCookie;
30
+ async function initialize() {
35
31
 
36
- Object.assign(state.user, {_id, email, phone});
37
- Object.assign(state.access, {token: accessToken, roles, status: !!accessToken});
32
+ const userCookie = await getCookie('user');
33
+
34
+ if (userCookie) {
35
+ const {_id, email, phone, roles, accessToken} = userCookie;
38
36
 
39
- $axios.interceptors.request.use((config) => {
40
- if (accessToken) {
41
- config.headers['x-access-token'] = accessToken;
42
- }
43
- return config;
44
- }, (error) => {
45
- return Promise.reject(error);
46
- });
37
+ Object.assign(state.user, {_id, email, phone});
38
+ Object.assign(state.access, {token: accessToken, roles, status: !!accessToken});
39
+
40
+ $axios.interceptors.request.use((config) => {
41
+ if (accessToken) {
42
+ config.headers['x-access-token'] = accessToken;
43
+ }
44
+ return config;
45
+ }, (error) => {
46
+ return Promise.reject(error);
47
+ });
48
+ }
47
49
  }
48
- // }
49
50
 
50
- // initialize();
51
+ initialize();
51
52
 
52
53
  const actions = {
53
54
  async login (user, type) {
@@ -212,43 +213,42 @@
212
213
  production: { expires: 1, domain: process.env.API_URL, sameSite: 'none', secure: true }
213
214
  };
214
215
 
215
- function getCookie(name) {
216
- // if (process.env.MOBILE_APP) {
217
- // return CapacitorCookies.getCookies()
218
- // console.log(document.cookie)
219
- // } else {
220
- // Для веб-версии
216
+ async function getCookie(name) {
217
+ if (process.env.MOBILE_APP) {
218
+ const cookie = await CapacitorCookies.getCookies()
219
+ return cookie ? JSON.parse(cookie[name]) : null;
220
+ } else {
221
221
  const cookie = Cookies.get(name);
222
222
  return cookie ? JSON.parse(cookie) : null;
223
- // }
223
+ }
224
224
  }
225
225
 
226
226
  function setCookie(name, data, env = process.env.NODE_ENV) {
227
- // if (process.env.MOBILE_APP) {
228
- // // Если приложение запущено в Capacitor
229
- // CapacitorCookies.setCookie({
230
- // url: process.env.API_URL, // используйте ваш API_URL
231
- // key: name,
232
- // value: JSON.stringify(data)
233
- // });
234
- // } else {
235
- // // Для веб-версии
227
+ if (process.env.MOBILE_APP) {
228
+ // Если приложение запущено в Capacitor
229
+ CapacitorCookies.setCookie({
230
+ url: process.env.API_URL, // используйте ваш API_URL
231
+ key: name,
232
+ value: JSON.stringify(data)
233
+ });
234
+ } else {
235
+ // Для веб-версии
236
236
  Cookies.set(name, JSON.stringify(data), optionsDefault[env]);
237
- // }
237
+ }
238
238
  }
239
239
 
240
240
  function removeCookie(name, env = process.env.NODE_ENV) {
241
- // if (process.env.MOBILE_APP) {
242
- // // Если приложение запущено в Capacitor
243
- // CapacitorCookies.deleteCookie({
244
- // url: process.env.API_URL, // используйте ваш API_URL
245
- // key: name
246
- // });
247
- // } else {
241
+ if (process.env.MOBILE_APP) {
242
+ // Если приложение запущено в Capacitor
243
+ CapacitorCookies.deleteCookie({
244
+ url: process.env.API_URL, // используйте ваш API_URL
245
+ key: name
246
+ });
247
+ } else {
248
248
  // Для веб-версии
249
249
  const options = env === 'production' ? { domain: process.env.API_URL } : {};
250
250
  Cookies.remove(name, options);
251
- // }
251
+ }
252
252
  }
253
253
 
254
254
  // // History