@ozdao/prometheus-framework 0.1.83 → 0.1.85
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +22 -22
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +2 -49
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +49 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -72
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +40 -41
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +84 -105
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/auth/components/pages/ResetPassword.vue +1 -1
- package/src/modules/auth/components/pages/SignIn.vue +0 -1
- package/src/modules/auth/store/auth.js +42 -42
package/package.json
CHANGED
@@ -27,27 +27,27 @@
|
|
27
27
|
},
|
28
28
|
});
|
29
29
|
|
30
|
-
async function initialize() {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
30
|
+
// async function initialize() {
|
31
|
+
const userCookie = getCookie('user');
|
32
|
+
|
33
|
+
if (userCookie) {
|
34
|
+
const {_id, email, phone, roles, accessToken} = userCookie;
|
35
|
+
|
36
|
+
Object.assign(state.user, {_id, email, phone});
|
37
|
+
Object.assign(state.access, {token: accessToken, roles, status: !!accessToken});
|
38
|
+
|
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
|
+
});
|
48
47
|
}
|
48
|
+
// }
|
49
49
|
|
50
|
-
initialize();
|
50
|
+
// initialize();
|
51
51
|
|
52
52
|
const actions = {
|
53
53
|
async login (user, type) {
|
@@ -213,42 +213,42 @@
|
|
213
213
|
};
|
214
214
|
|
215
215
|
function getCookie(name) {
|
216
|
-
if (process.env.MOBILE_APP) {
|
217
|
-
|
218
|
-
|
219
|
-
} else {
|
216
|
+
// if (process.env.MOBILE_APP) {
|
217
|
+
// return CapacitorCookies.getCookies()
|
218
|
+
// console.log(document.cookie)
|
219
|
+
// } else {
|
220
220
|
// Для веб-версии
|
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
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
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
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
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
|