@ozdao/martyrs 0.2.580 → 0.2.582
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/dist/_virtual/dayjs.min.js +1 -1
- package/dist/_virtual/weekOfYear.js +1 -1
- package/dist/builder.js +1 -6
- package/dist/loader.js +1 -6
- package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
- package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +2 -2
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/martyrs/src/components/Select/{Select.vue.js → Select.vue2.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.js → Spoiler.vue.js} +2 -2
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tab/{Tab.vue2.js → Tab.vue.js} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.js → Tooltip.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +5 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/configs/navigation.user.config.js +2 -3
- package/dist/martyrs/src/modules/auth/views/configs/navigation.user.config.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.router.js +1 -2
- package/dist/martyrs/src/modules/auth/views/router/users.router.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +1 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/classes/ws.manager.js +16 -1
- package/dist/martyrs/src/modules/core/views/classes/ws.manager.js.map +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/{Filters.vue2.js → Filters.vue.js} +2 -2
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +8 -1
- package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +1 -1
- package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.js +2 -2
- package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.js +11 -40
- package/dist/martyrs/src/modules/notifications/components/layouts/NotificationsLayout.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js +26 -21
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +54 -48
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.js +37 -117
- package/dist/martyrs/src/modules/notifications/components/sections/NotificationsList.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.js +18 -15
- package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/{martyrs → node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +1 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/{martyrs → node_modules/.pnpm/dayjs@1.11.13}/node_modules/dayjs/dayjs.min.js +1 -1
- package/dist/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js.map +1 -0
- package/dist/{martyrs → node_modules/.pnpm/dayjs@1.11.13}/node_modules/dayjs/plugin/weekOfYear.js +1 -1
- package/dist/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/weekOfYear.js.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +6 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +15 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +11 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +20 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
- package/dist/style.css +2 -189
- package/package.json +1 -1
- package/src/jit/loader.js +1 -6
- package/src/jit/plugin.js +1 -5
- package/src/modules/auth/views/components/pages/ProfileEdit.vue +1 -1
- package/src/modules/auth/views/components/pages/SignIn.vue +14 -10
- package/src/modules/auth/views/configs/navigation.user.config.js +10 -10
- package/src/modules/auth/views/router/users.router.js +0 -1
- package/src/modules/auth/views/store/auth.js +1 -0
- package/src/modules/core/views/classes/ws.manager.js +20 -1
- package/src/modules/core/views/utils/vue-app-renderer.js +9 -3
- package/src/modules/notifications/components/blocks/NotificationItem.vue +1 -1
- package/src/modules/notifications/components/layouts/NotificationsLayout.vue +9 -53
- package/src/modules/notifications/components/pages/Notifications.vue +21 -22
- package/src/modules/notifications/components/sections/NotificationPreferences.vue +41 -180
- package/src/modules/notifications/components/sections/NotificationsList.vue +39 -219
- package/src/modules/notifications/notifications.client.js +17 -16
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +0 -1
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +0 -1
- package/dist/martyrs/node_modules/dayjs/dayjs.min.js.map +0 -1
- package/dist/martyrs/node_modules/dayjs/plugin/weekOfYear.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js +0 -15
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js +0 -17
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js +0 -13
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +0 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue.js.map +0 -1
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +0 -1
- package/dist/martyrs/src/modules/auth/views/components/blocks/ProfileCard.vue.js +0 -44
- package/dist/martyrs/src/modules/auth/views/components/blocks/ProfileCard.vue.js.map +0 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +0 -1
- /package/dist/{martyrs → node_modules/.pnpm/@vue_shared@3.5.13}/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -0
package/src/jit/plugin.js
CHANGED
|
@@ -140,9 +140,6 @@ export class MartyrsJitPlugin {
|
|
|
140
140
|
if (replaced) {
|
|
141
141
|
const { RawSource } = compiler.webpack.sources;
|
|
142
142
|
compilation.updateAsset(filename, new RawSource(source));
|
|
143
|
-
console.log(`[MartyrsJIT] Replaced in ${filename}: ${this.tokens.size} tokens in ${duration.toFixed(2)}ms`);
|
|
144
|
-
} else if (filename.includes('martyrs') || filename.includes('__martyrs')) {
|
|
145
|
-
console.log(`[MartyrsJIT] No placeholder found in ${filename}`);
|
|
146
143
|
}
|
|
147
144
|
}
|
|
148
145
|
}
|
|
@@ -166,9 +163,8 @@ export class MartyrsJitPlugin {
|
|
|
166
163
|
// Переписываем виртуальный модуль с плейсхолдером, чтобы rspack пересобрал CSS
|
|
167
164
|
try {
|
|
168
165
|
this.virtualModules.writeModule(VIRTUAL_MODULE_PATH, LAYER_PLACEHOLDER + '\n/*' + Date.now() + '*/');
|
|
169
|
-
console.log('[MartyrsJIT] Virtual module rewritten with placeholder');
|
|
170
166
|
} catch (e) {
|
|
171
|
-
|
|
167
|
+
// silent - store not ready yet
|
|
172
168
|
}
|
|
173
169
|
});
|
|
174
170
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
class="w-m-50r h-40r mobile:h-100 h-m-40r bg-white mobile:radius-zero radius-medium pd-medium"
|
|
8
8
|
>
|
|
9
9
|
<div v-if="loading" class="flex-center h-100">
|
|
10
|
-
<Loader />
|
|
10
|
+
<Loader :centered="true"/>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
13
|
<div v-else class="flex h-min-100 flex-row mobile:flex-column gap-regular">
|
|
@@ -208,21 +208,25 @@ async function onSubmitApple() {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
function redirectTo () {
|
|
211
|
+
if (!auth.state.user._id) {
|
|
212
|
+
throw new Error('AUTH_STATE_NOT_INITIALIZED')
|
|
213
|
+
}
|
|
214
|
+
|
|
211
215
|
if (route.query?.returnUrl) {
|
|
212
|
-
router.push({
|
|
216
|
+
router.push({
|
|
213
217
|
path: route.query?.returnUrl,
|
|
214
|
-
query: {
|
|
215
|
-
afterAuth: 'true'
|
|
218
|
+
query: {
|
|
219
|
+
afterAuth: 'true'
|
|
216
220
|
}
|
|
217
221
|
})
|
|
218
|
-
} else {
|
|
219
|
-
router.push({
|
|
220
|
-
name: 'User Profile',
|
|
221
|
-
params: {
|
|
222
|
-
_id: auth.state.user._id
|
|
222
|
+
} else {
|
|
223
|
+
router.push({
|
|
224
|
+
name: 'User Profile',
|
|
225
|
+
params: {
|
|
226
|
+
_id: auth.state.user._id
|
|
223
227
|
},
|
|
224
|
-
query: {
|
|
225
|
-
afterAuth: 'true'
|
|
228
|
+
query: {
|
|
229
|
+
afterAuth: 'true'
|
|
226
230
|
}
|
|
227
231
|
})
|
|
228
232
|
}
|
|
@@ -64,21 +64,21 @@ export const navigationItems = [
|
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
category: 'Orders',
|
|
67
|
-
visible: () =>
|
|
67
|
+
visible: (auth, route) => isModuleInstalled('orders') && (
|
|
68
|
+
auth.user && (
|
|
69
|
+
auth.user._id === route.params._id ||
|
|
70
|
+
(auth.access.roles &&
|
|
71
|
+
(auth.access.roles.includes('ROLE_MODERATOR') ||
|
|
72
|
+
auth.access.roles.includes('ROLE_ADMIN'))
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
),
|
|
68
76
|
items: [
|
|
69
77
|
{
|
|
70
78
|
title: 'Orders',
|
|
71
79
|
iconComponent: IconOrders,
|
|
72
80
|
route: (auth, route) => `/users/${route.params._id}/orders`,
|
|
73
|
-
|
|
74
|
-
auth.user && (
|
|
75
|
-
auth.user._id === route.params._id ||
|
|
76
|
-
(auth.access.roles &&
|
|
77
|
-
(auth.access.roles.includes('ROLE_MODERATOR') ||
|
|
78
|
-
auth.access.roles.includes('ROLE_ADMIN'))
|
|
79
|
-
)
|
|
80
|
-
)
|
|
81
|
-
)
|
|
81
|
+
|
|
82
82
|
},
|
|
83
83
|
]
|
|
84
84
|
},
|
|
@@ -33,7 +33,6 @@ export function getUsersRoutes(options = {}) {
|
|
|
33
33
|
},
|
|
34
34
|
sidebar_hover: false,
|
|
35
35
|
sidebar_navigation_items: navigationItems,
|
|
36
|
-
sidebar_header_component: ProfileCard,
|
|
37
36
|
sidebar_footer_component: HelpCard,
|
|
38
37
|
sidebarOpenOnEnter: true,
|
|
39
38
|
sidebarCloseOnLeave: true
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { reactive } from 'vue';
|
|
2
|
+
|
|
1
3
|
class WebSocketManager {
|
|
2
4
|
constructor() {
|
|
3
5
|
this.socket = null;
|
|
4
|
-
this.isConnected = false;
|
|
5
6
|
this.reconnectAttempts = 0;
|
|
6
7
|
this.maxReconnectAttempts = 5;
|
|
7
8
|
this.reconnectDelay = 3000;
|
|
@@ -17,6 +18,24 @@ class WebSocketManager {
|
|
|
17
18
|
this.rpcCallbacks = new Map();
|
|
18
19
|
this.rpcTimeout = 30000; // 30 секунд таймаут по умолчанию
|
|
19
20
|
this.rpcIdCounter = 0;
|
|
21
|
+
|
|
22
|
+
// Реактивное состояние
|
|
23
|
+
this.state = reactive({
|
|
24
|
+
isConnected: false,
|
|
25
|
+
wasConnected: false, // был ли когда-либо подключен
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Геттер для обратной совместимости
|
|
30
|
+
get isConnected() {
|
|
31
|
+
return this.state.isConnected;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
set isConnected(value) {
|
|
35
|
+
this.state.isConnected = value;
|
|
36
|
+
if (value) {
|
|
37
|
+
this.state.wasConnected = true;
|
|
38
|
+
}
|
|
20
39
|
}
|
|
21
40
|
|
|
22
41
|
initialize(options = {}) {
|
|
@@ -78,9 +78,6 @@ export function renderAndMountApp({ createApp, hooks = {} }) {
|
|
|
78
78
|
initialState = null;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
81
|
if (initialState) {
|
|
85
82
|
console.log('[AUTH COOKIE DEBUG] Browser initialState.auth:', initialState.auth);
|
|
86
83
|
console.log('[AUTH COOKIE DEBUG] Has token?', !!initialState?.auth?.access?.token);
|
|
@@ -89,6 +86,15 @@ export function renderAndMountApp({ createApp, hooks = {} }) {
|
|
|
89
86
|
// Применяем начальное состояние ко всем модулям (true = гидратация)
|
|
90
87
|
store.setInitialState(initialState, true);
|
|
91
88
|
|
|
89
|
+
// Гидратация session из auth данных — напрямую в reactive state
|
|
90
|
+
if (initialState?.auth?.user?._id && store.core?.state?.session) {
|
|
91
|
+
store.core.state.session.userId = initialState.auth.user._id;
|
|
92
|
+
store.core.state.session.token = initialState.auth.access?.token;
|
|
93
|
+
store.core.state.session.roles = initialState.auth.access?.roles;
|
|
94
|
+
store.core.state.session.accesses = initialState.auth.accesses || [];
|
|
95
|
+
console.log('[AUTH COOKIE DEBUG] Session hydrated with userId:', initialState.auth.user._id);
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
if (initialState?.auth?.access?.token) {
|
|
93
99
|
console.log('[AUTH COOKIE DEBUG] Setting auth token from initialState');
|
|
94
100
|
|
|
@@ -60,7 +60,7 @@ const handleClick = () => {
|
|
|
60
60
|
<template>
|
|
61
61
|
<div
|
|
62
62
|
class="notification-item gap-thin flex pd-small radius-small bg-light"
|
|
63
|
-
:class="{ 'bg-second-
|
|
63
|
+
:class="{ 'bg-second-nano': isUnread }"
|
|
64
64
|
@click="handleClick"
|
|
65
65
|
>
|
|
66
66
|
<div class="notification-icon">
|
|
@@ -1,69 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
<span class="warning-icon">⚠️</span>
|
|
10
|
-
<span class="warning-text">
|
|
11
|
-
Notification service disconnected.
|
|
12
|
-
<button @click="reconnect" class="reconnect-btn">Reconnect</button>
|
|
13
|
-
</span>
|
|
14
|
-
</div>
|
|
2
|
+
<div>
|
|
3
|
+
<router-view />
|
|
4
|
+
|
|
5
|
+
<!-- Показываем только если WS был подключен и потом отвалился -->
|
|
6
|
+
<div v-if="wsManager.state.wasConnected && !wsManager.state.isConnected" class="pos-fixed pos-b-0 pos-l-0 pos-r-0 pd-small bg-warning t-center">
|
|
7
|
+
<span>⚠️ Notification service disconnected.</span>
|
|
8
|
+
<button class="mn-l-thin bg-none bd-none cursor-pointer t-main" @click="reconnect">Reconnect</button>
|
|
15
9
|
</div>
|
|
16
10
|
</div>
|
|
17
11
|
</template>
|
|
18
12
|
|
|
19
13
|
<script setup>
|
|
20
|
-
import { computed, inject
|
|
14
|
+
import { computed, inject } from 'vue';
|
|
21
15
|
import wsManager from '@martyrs/src/modules/core/views/classes/ws.manager.js';
|
|
22
16
|
|
|
23
|
-
// Get notification manager from store
|
|
24
17
|
const store = inject('store');
|
|
25
|
-
|
|
26
18
|
const notificationManager = computed(() => store.notificationManager || null);
|
|
27
19
|
|
|
28
|
-
// Реактивное состояние WebSocket
|
|
29
|
-
const wsConnected = ref(wsManager.isConnected);
|
|
30
|
-
|
|
31
|
-
// ID слушателей для очистки
|
|
32
|
-
const openListenerId = ref(null);
|
|
33
|
-
const closeListenerId = ref(null);
|
|
34
|
-
|
|
35
|
-
onMounted(() => {
|
|
36
|
-
// Подписываемся на события WebSocket
|
|
37
|
-
openListenerId.value = wsManager.addEventListener('open', () => {
|
|
38
|
-
wsConnected.value = true;
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
closeListenerId.value = wsManager.addEventListener('close', () => {
|
|
42
|
-
wsConnected.value = false;
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
// Устанавливаем начальное состояние
|
|
46
|
-
wsConnected.value = wsManager.isConnected;
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
onUnmounted(() => {
|
|
50
|
-
// Очищаем слушатели
|
|
51
|
-
if (openListenerId.value) {
|
|
52
|
-
wsManager.removeEventListener('open', openListenerId.value);
|
|
53
|
-
}
|
|
54
|
-
if (closeListenerId.value) {
|
|
55
|
-
wsManager.removeEventListener('close', closeListenerId.value);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// Methods
|
|
61
20
|
const reconnect = () => {
|
|
62
21
|
if (notificationManager.value) {
|
|
63
22
|
notificationManager.value.initialize();
|
|
64
23
|
}
|
|
65
24
|
};
|
|
66
|
-
</script>
|
|
67
|
-
|
|
68
|
-
<style scoped>
|
|
69
|
-
</style>
|
|
25
|
+
</script>
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<
|
|
4
|
-
v-
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
{
|
|
2
|
+
<div class="mobile:pd-thin pd-medium">
|
|
3
|
+
<SectionPageTitle
|
|
4
|
+
v-if="!MOBILE_APP"
|
|
5
|
+
:title="`Notifications${unreadCount > 0 ? ` (${unreadCount})` : ''}`"
|
|
6
|
+
:actions="[
|
|
7
|
+
{ method: () => isSettingsPopup = true, label: 'Settings' }
|
|
8
8
|
]"
|
|
9
|
-
class="
|
|
10
|
-
classTab="bg-white"
|
|
9
|
+
class="mn-b-small"
|
|
11
10
|
/>
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
|
|
12
|
+
<NotificationsList />
|
|
13
|
+
|
|
14
|
+
<Popup
|
|
15
|
+
:isPopupOpen="isSettingsPopup"
|
|
16
|
+
@close-popup="isSettingsPopup = false"
|
|
17
|
+
title="Notification Settings"
|
|
18
|
+
class="bg-white pd-medium w-m-30r radius-big"
|
|
19
|
+
>
|
|
20
|
+
<NotificationPreferences />
|
|
21
|
+
</Popup>
|
|
17
22
|
</div>
|
|
18
23
|
</template>
|
|
19
24
|
|
|
20
25
|
<script setup>
|
|
21
26
|
import { ref, inject } from 'vue';
|
|
22
|
-
import
|
|
23
|
-
import
|
|
27
|
+
import SectionPageTitle from '@martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue';
|
|
28
|
+
import Popup from '@martyrs/src/components/Popup/Popup.vue';
|
|
24
29
|
import NotificationsList from '../sections/NotificationsList.vue';
|
|
25
30
|
import NotificationPreferences from '../sections/NotificationPreferences.vue';
|
|
26
31
|
|
|
27
|
-
// Get route and notification state
|
|
28
|
-
const route = useRoute();
|
|
29
32
|
const { unreadCount } = inject('useNotifications')();
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
const activeTab = ref(route.query.tab || 'all');
|
|
34
|
+
const isSettingsPopup = ref(false);
|
|
33
35
|
</script>
|
|
34
|
-
|
|
35
|
-
<style scoped>
|
|
36
|
-
</style>
|
|
@@ -1,51 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<div class="loading-spinner">🔄</div>
|
|
8
|
-
<p>Loading preferences...</p>
|
|
2
|
+
<div>
|
|
3
|
+
<p class="t-transp mn-b-small">Choose how you want to receive notifications</p>
|
|
4
|
+
|
|
5
|
+
<div v-if="loading" class="pd-large t-center t-transp">
|
|
6
|
+
<Loader />
|
|
9
7
|
</div>
|
|
10
|
-
|
|
11
|
-
<div v-else class="
|
|
12
|
-
<div
|
|
13
|
-
v-for="(enabled, channelType) in preferences"
|
|
14
|
-
:key="channelType"
|
|
15
|
-
class="
|
|
8
|
+
|
|
9
|
+
<div v-else class="gap-thin flex-column flex">
|
|
10
|
+
<div
|
|
11
|
+
v-for="(enabled, channelType) in preferences"
|
|
12
|
+
:key="channelType"
|
|
13
|
+
class="flex flex-v-center flex-between bg-light radius-small pd-small"
|
|
16
14
|
>
|
|
17
|
-
<div class="
|
|
18
|
-
<div class="
|
|
19
|
-
<div class="
|
|
20
|
-
<
|
|
21
|
-
<p>{{ getChannelDescription(channelType) }}</p>
|
|
15
|
+
<div class="flex w-100 flex-v-center gap-small mn-r-small">
|
|
16
|
+
<div class="h4">{{ getChannelIcon(channelType) }}</div>
|
|
17
|
+
<div class="flex-column flex gap-micro">
|
|
18
|
+
<p class="fw-medium lh-1">{{ getChannelName(channelType) }}</p>
|
|
19
|
+
<p class="p-small t-transp lh-1">{{ getChannelDescription(channelType) }}</p>
|
|
22
20
|
</div>
|
|
23
21
|
</div>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<span class="toggle-slider"></span>
|
|
31
|
-
</label>
|
|
22
|
+
<Checkbox
|
|
23
|
+
mode="switch"
|
|
24
|
+
:radio="enabled"
|
|
25
|
+
@update:radio="updatePreference(channelType, $event)"
|
|
26
|
+
class="flex-shrink-0"
|
|
27
|
+
/>
|
|
32
28
|
</div>
|
|
33
|
-
|
|
34
|
-
<div class="
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</button>
|
|
42
|
-
<button
|
|
43
|
-
v-if="hasChanges"
|
|
44
|
-
class="cancel-btn"
|
|
45
|
-
@click="resetChanges"
|
|
29
|
+
|
|
30
|
+
<div class="flex flex-end gap-small mn-t-thin">
|
|
31
|
+
<Button
|
|
32
|
+
v-if="hasChanges"
|
|
33
|
+
:submit="resetChanges"
|
|
34
|
+
:showLoader="false"
|
|
35
|
+
:showSucces="false"
|
|
36
|
+
class="bg-white t-dark"
|
|
46
37
|
>
|
|
47
38
|
Cancel
|
|
48
|
-
</
|
|
39
|
+
</Button>
|
|
40
|
+
<Button
|
|
41
|
+
:submit="savePreferences"
|
|
42
|
+
:validation="!hasChanges || saving"
|
|
43
|
+
class="bg-main t-white"
|
|
44
|
+
>
|
|
45
|
+
{{ saving ? 'Saving...' : 'Save Changes' }}
|
|
46
|
+
</Button>
|
|
49
47
|
</div>
|
|
50
48
|
</div>
|
|
51
49
|
</div>
|
|
@@ -53,6 +51,9 @@
|
|
|
53
51
|
|
|
54
52
|
<script setup>
|
|
55
53
|
import { ref, reactive, computed, onMounted, inject } from 'vue';
|
|
54
|
+
import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue';
|
|
55
|
+
import Button from '@martyrs/src/components/Button/Button.vue';
|
|
56
|
+
import Loader from '@martyrs/src/components/Loader/Loader.vue';
|
|
56
57
|
|
|
57
58
|
// Get notification preferences functionality
|
|
58
59
|
const {
|
|
@@ -154,143 +155,3 @@ onMounted(async () => {
|
|
|
154
155
|
});
|
|
155
156
|
</script>
|
|
156
157
|
|
|
157
|
-
<style scoped>
|
|
158
|
-
|
|
159
|
-
.description {
|
|
160
|
-
color: #666;
|
|
161
|
-
margin-bottom: 24px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.preferences-loading {
|
|
165
|
-
display: flex;
|
|
166
|
-
flex-direction: column;
|
|
167
|
-
align-items: center;
|
|
168
|
-
justify-content: center;
|
|
169
|
-
padding: 48px 0;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.loading-spinner {
|
|
173
|
-
font-size: 2rem;
|
|
174
|
-
margin-bottom: 16px;
|
|
175
|
-
animation: spin 2s linear infinite;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
@keyframes spin {
|
|
179
|
-
0% { transform: rotate(0deg); }
|
|
180
|
-
100% { transform: rotate(360deg); }
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.preference-item {
|
|
184
|
-
display: flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
justify-content: space-between;
|
|
187
|
-
padding: 16px;
|
|
188
|
-
border-bottom: 1px solid #eee;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.preference-item:last-child {
|
|
192
|
-
border-bottom: none;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.preference-info {
|
|
196
|
-
display: flex;
|
|
197
|
-
align-items: center;
|
|
198
|
-
flex: 1;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.preference-icon {
|
|
202
|
-
font-size: 1.5rem;
|
|
203
|
-
margin-right: 16px;
|
|
204
|
-
width: 40px;
|
|
205
|
-
height: 40px;
|
|
206
|
-
display: flex;
|
|
207
|
-
align-items: center;
|
|
208
|
-
justify-content: center;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.preference-details h3 {
|
|
212
|
-
margin: 0 0 4px 0;
|
|
213
|
-
font-size: 1rem;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.preference-details p {
|
|
217
|
-
margin: 0;
|
|
218
|
-
color: #666;
|
|
219
|
-
font-size: 0.875rem;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/* Toggle switch styles */
|
|
223
|
-
.toggle-switch {
|
|
224
|
-
position: relative;
|
|
225
|
-
display: inline-block;
|
|
226
|
-
width: 50px;
|
|
227
|
-
height: 24px;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.toggle-switch input {
|
|
231
|
-
opacity: 0;
|
|
232
|
-
width: 0;
|
|
233
|
-
height: 0;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.toggle-slider {
|
|
237
|
-
position: absolute;
|
|
238
|
-
cursor: pointer;
|
|
239
|
-
top: 0;
|
|
240
|
-
left: 0;
|
|
241
|
-
right: 0;
|
|
242
|
-
bottom: 0;
|
|
243
|
-
background-color: #ccc;
|
|
244
|
-
transition: .4s;
|
|
245
|
-
border-radius: 24px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.toggle-slider:before {
|
|
249
|
-
position: absolute;
|
|
250
|
-
content: "";
|
|
251
|
-
height: 16px;
|
|
252
|
-
width: 16px;
|
|
253
|
-
left: 4px;
|
|
254
|
-
bottom: 4px;
|
|
255
|
-
background-color: white;
|
|
256
|
-
transition: .4s;
|
|
257
|
-
border-radius: 50%;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
input:checked + .toggle-slider {
|
|
261
|
-
background-color: #2196F3;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
input:checked + .toggle-slider:before {
|
|
265
|
-
transform: translateX(26px);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.form-actions {
|
|
269
|
-
margin-top: 24px;
|
|
270
|
-
display: flex;
|
|
271
|
-
justify-content: flex-end;
|
|
272
|
-
gap: 16px;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.save-btn, .cancel-btn {
|
|
276
|
-
padding: 8px 16px;
|
|
277
|
-
border-radius: 4px;
|
|
278
|
-
cursor: pointer;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.save-btn {
|
|
282
|
-
background-color: #2196F3;
|
|
283
|
-
border: none;
|
|
284
|
-
color: white;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.save-btn:disabled {
|
|
288
|
-
background-color: #ccc;
|
|
289
|
-
cursor: not-allowed;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.cancel-btn {
|
|
293
|
-
background-color: white;
|
|
294
|
-
border: 1px solid #ccc;
|
|
295
|
-
}
|
|
296
|
-
</style>
|