major change fixing bugs when running SSR in the project

This commit is contained in:
F4ilji
2025-04-26 22:59:46 +05:00
parent 1df1a1390f
commit 453fb4cccc
55 changed files with 414 additions and 362 deletions
@@ -146,8 +146,10 @@ class ClientAdditionalEducationController extends Controller
fn() => $this->seoPageProvider->getSeoForModel($additionalEducationModel) fn() => $this->seoPageProvider->getSeoForModel($additionalEducationModel)
); );
if (array_key_exists('custom_form', request()->input('settings_page'))) { $settingsPage = request()->attributes->get('settings_page') ?? [];
$form = request()->input('settings_page')['custom_form'];
if (array_key_exists('custom_form', $settingsPage)) {
$form = $settingsPage['custom_form'];
} else { } else {
$form = null; $form = null;
} }
+1 -2
View File
@@ -32,8 +32,7 @@ class AccessCheck
abort($registeredRoute->code); abort($registeredRoute->code);
} }
$request->merge(['settings_page' => $registeredRoute->settings]); $request->attributes->set('settings_page', $registeredRoute->settings);
// Если все проверки пройдены, продолжаем выполнение запроса // Если все проверки пройдены, продолжаем выполнение запроса
return $next($request); return $next($request);
} }
+7
View File
@@ -24,6 +24,13 @@ return [
'intercept_gate' => 'before', // after 'intercept_gate' => 'before', // after
], ],
'panel_user' => [
'enabled' => false,
'name' => 'panel_user',
],
'dashboard_user' => [ 'dashboard_user' => [
'enabled' => true, 'enabled' => true,
'name' => 'dashboard_user', 'name' => 'dashboard_user',
+1 -1
View File
@@ -14,7 +14,7 @@ return [
'api_only' => env('LOG_VIEWER_API_ONLY', false), 'api_only' => env('LOG_VIEWER_API_ONLY', false),
'require_auth_in_production' => true, 'require_auth_in_production' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
+129 -115
View File
@@ -43,6 +43,7 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"npm": "^10.9.0", "npm": "^10.9.0",
"postcss": "^8.4.18", "postcss": "^8.4.18",
"rollup": "^4.40.0",
"tailwindcss": "^3.2.1", "tailwindcss": "^3.2.1",
"terser": "^5.39.0", "terser": "^5.39.0",
"vue": "^3.2.41" "vue": "^3.2.41"
@@ -85,12 +86,12 @@
} }
}, },
"node_modules/@babel/parser": { "node_modules/@babel/parser": {
"version": "7.26.10", "version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz",
"integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/types": "^7.26.10" "@babel/types": "^7.27.0"
}, },
"bin": { "bin": {
"parser": "bin/babel-parser.js" "parser": "bin/babel-parser.js"
@@ -100,9 +101,9 @@
} }
}, },
"node_modules/@babel/types": { "node_modules/@babel/types": {
"version": "7.26.10", "version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz",
"integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/helper-string-parser": "^7.25.9", "@babel/helper-string-parser": "^7.25.9",
@@ -257,9 +258,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm64": { "node_modules/@esbuild/linux-arm64": {
"version": "0.25.1", "version": "0.25.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.3.tgz",
"integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", "integrity": "sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -775,9 +776,9 @@
} }
}, },
"node_modules/@rollup/rollup-android-arm-eabi": { "node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.0.tgz",
"integrity": "sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ==", "integrity": "sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -788,9 +789,9 @@
] ]
}, },
"node_modules/@rollup/rollup-android-arm64": { "node_modules/@rollup/rollup-android-arm64": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.0.tgz",
"integrity": "sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA==", "integrity": "sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -801,9 +802,9 @@
] ]
}, },
"node_modules/@rollup/rollup-darwin-arm64": { "node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.0.tgz",
"integrity": "sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q==", "integrity": "sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -814,9 +815,9 @@
] ]
}, },
"node_modules/@rollup/rollup-darwin-x64": { "node_modules/@rollup/rollup-darwin-x64": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.0.tgz",
"integrity": "sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q==", "integrity": "sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -827,9 +828,9 @@
] ]
}, },
"node_modules/@rollup/rollup-freebsd-arm64": { "node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.0.tgz",
"integrity": "sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ==", "integrity": "sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -840,9 +841,9 @@
] ]
}, },
"node_modules/@rollup/rollup-freebsd-x64": { "node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.0.tgz",
"integrity": "sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw==", "integrity": "sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -853,9 +854,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm-gnueabihf": { "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.0.tgz",
"integrity": "sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg==", "integrity": "sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -866,9 +867,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm-musleabihf": { "node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.0.tgz",
"integrity": "sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A==", "integrity": "sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -879,9 +880,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm64-gnu": { "node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.0.tgz",
"integrity": "sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A==", "integrity": "sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -892,9 +893,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm64-musl": { "node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.0.tgz",
"integrity": "sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg==", "integrity": "sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -905,9 +906,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-loongarch64-gnu": { "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.0.tgz",
"integrity": "sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g==", "integrity": "sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==",
"cpu": [ "cpu": [
"loong64" "loong64"
], ],
@@ -918,9 +919,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": { "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.0.tgz",
"integrity": "sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA==", "integrity": "sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@@ -931,9 +932,22 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-riscv64-gnu": { "node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.0.tgz",
"integrity": "sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g==", "integrity": "sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==",
"cpu": [
"riscv64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.0.tgz",
"integrity": "sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -944,9 +958,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-s390x-gnu": { "node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.0.tgz",
"integrity": "sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw==", "integrity": "sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@@ -957,9 +971,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-x64-gnu": { "node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.0.tgz",
"integrity": "sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA==", "integrity": "sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -970,9 +984,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-x64-musl": { "node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.0.tgz",
"integrity": "sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg==", "integrity": "sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -983,9 +997,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-arm64-msvc": { "node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.0.tgz",
"integrity": "sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg==", "integrity": "sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -996,9 +1010,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-ia32-msvc": { "node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.0.tgz",
"integrity": "sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw==", "integrity": "sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -1009,9 +1023,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-x64-msvc": { "node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.35.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.0.tgz",
"integrity": "sha512-PIQeY5XDkrOysbQblSW7v3l1MDZzkTEzAfTPkj5VAu3FW8fS4ynyLg2sINp0fp3SjZ8xkRYpLqoKcYqAkhU1dw==", "integrity": "sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1035,9 +1049,9 @@
} }
}, },
"node_modules/@types/estree": { "node_modules/@types/estree": {
"version": "1.0.6", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/lodash": { "node_modules/@types/lodash": {
@@ -1303,9 +1317,9 @@
} }
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.8.3", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
"integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==", "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -1447,9 +1461,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001704", "version": "1.0.30001715",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001715.tgz",
"integrity": "sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew==", "integrity": "sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -1687,9 +1701,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.118", "version": "1.5.142",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.118.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.142.tgz",
"integrity": "sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==", "integrity": "sha512-Ah2HgkTu/9RhTDNThBtzu2Wirdy4DC9b0sMT1pUhbkZQ5U/iwmE+PHZX1MpjD5IkJCc2wSghgGG/B04szAx07w==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@@ -2455,9 +2469,9 @@
} }
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.9", "version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.9.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
"integrity": "sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg==", "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@@ -5368,9 +5382,9 @@
} }
}, },
"node_modules/pirates": { "node_modules/pirates": {
"version": "4.0.6", "version": "4.0.7",
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
"integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -5652,12 +5666,11 @@
} }
}, },
"node_modules/rollup": { "node_modules/rollup": {
"version": "4.35.0", "version": "4.40.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.35.0.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.0.tgz",
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==", "integrity": "sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==",
"license": "MIT",
"dependencies": { "dependencies": {
"@types/estree": "1.0.6" "@types/estree": "1.0.7"
}, },
"bin": { "bin": {
"rollup": "dist/bin/rollup" "rollup": "dist/bin/rollup"
@@ -5667,25 +5680,26 @@
"npm": ">=8.0.0" "npm": ">=8.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.35.0", "@rollup/rollup-android-arm-eabi": "4.40.0",
"@rollup/rollup-android-arm64": "4.35.0", "@rollup/rollup-android-arm64": "4.40.0",
"@rollup/rollup-darwin-arm64": "4.35.0", "@rollup/rollup-darwin-arm64": "4.40.0",
"@rollup/rollup-darwin-x64": "4.35.0", "@rollup/rollup-darwin-x64": "4.40.0",
"@rollup/rollup-freebsd-arm64": "4.35.0", "@rollup/rollup-freebsd-arm64": "4.40.0",
"@rollup/rollup-freebsd-x64": "4.35.0", "@rollup/rollup-freebsd-x64": "4.40.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.35.0", "@rollup/rollup-linux-arm-gnueabihf": "4.40.0",
"@rollup/rollup-linux-arm-musleabihf": "4.35.0", "@rollup/rollup-linux-arm-musleabihf": "4.40.0",
"@rollup/rollup-linux-arm64-gnu": "4.35.0", "@rollup/rollup-linux-arm64-gnu": "4.40.0",
"@rollup/rollup-linux-arm64-musl": "4.35.0", "@rollup/rollup-linux-arm64-musl": "4.40.0",
"@rollup/rollup-linux-loongarch64-gnu": "4.35.0", "@rollup/rollup-linux-loongarch64-gnu": "4.40.0",
"@rollup/rollup-linux-powerpc64le-gnu": "4.35.0", "@rollup/rollup-linux-powerpc64le-gnu": "4.40.0",
"@rollup/rollup-linux-riscv64-gnu": "4.35.0", "@rollup/rollup-linux-riscv64-gnu": "4.40.0",
"@rollup/rollup-linux-s390x-gnu": "4.35.0", "@rollup/rollup-linux-riscv64-musl": "4.40.0",
"@rollup/rollup-linux-x64-gnu": "4.35.0", "@rollup/rollup-linux-s390x-gnu": "4.40.0",
"@rollup/rollup-linux-x64-musl": "4.35.0", "@rollup/rollup-linux-x64-gnu": "4.40.0",
"@rollup/rollup-win32-arm64-msvc": "4.35.0", "@rollup/rollup-linux-x64-musl": "4.40.0",
"@rollup/rollup-win32-ia32-msvc": "4.35.0", "@rollup/rollup-win32-arm64-msvc": "4.40.0",
"@rollup/rollup-win32-x64-msvc": "4.35.0", "@rollup/rollup-win32-ia32-msvc": "4.40.0",
"@rollup/rollup-win32-x64-msvc": "4.40.0",
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
@@ -6145,9 +6159,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.4.14", "version": "5.4.18",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.18.tgz",
"integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==", "integrity": "sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"esbuild": "^0.21.3", "esbuild": "^0.21.3",
@@ -6385,9 +6399,9 @@
} }
}, },
"node_modules/yaml": { "node_modules/yaml": {
"version": "2.7.0", "version": "2.7.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz",
"integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",
"dev": true, "dev": true,
"license": "ISC", "license": "ISC",
"bin": { "bin": {
+1
View File
@@ -18,6 +18,7 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"npm": "^10.9.0", "npm": "^10.9.0",
"postcss": "^8.4.18", "postcss": "^8.4.18",
"rollup": "^4.40.0",
"tailwindcss": "^3.2.1", "tailwindcss": "^3.2.1",
"terser": "^5.39.0", "terser": "^5.39.0",
"vue": "^3.2.41" "vue": "^3.2.41"
+39 -21
View File
@@ -1,5 +1,5 @@
<template> <template>
<header :class="[ <header v-bind="$attrs" :class="[
{ 'header-filter': headerFilter }, { 'header-filter': headerFilter },
{ 'under-slider-bg': underSliderHeader }, { 'under-slider-bg': underSliderHeader },
isBviActive ? 'static' : 'fixed top-0 left-0 right-0' isBviActive ? 'static' : 'fixed top-0 left-0 right-0'
@@ -11,8 +11,6 @@
<Link class="flex-none text-xl font-semibold" <Link class="flex-none text-xl font-semibold"
:href="route('index')" aria-label="NTSPI"> :href="route('index')" aria-label="NTSPI">
<img :key="currentLogo" class="max-w-[300px] transition-all duration-300" :src="currentLogo" alt="Логотип"> <img :key="currentLogo" class="max-w-[300px] transition-all duration-300" :src="currentLogo" alt="Логотип">
</Link> </Link>
<div class="lg:hidden"> <div class="lg:hidden">
<button :class="{ 'text-black border-gray-500': underSliderHeader, 'text-white border-gray-200': !underSliderHeader }" <button :class="{ 'text-black border-gray-500': underSliderHeader, 'text-white border-gray-200': !underSliderHeader }"
@@ -48,12 +46,11 @@
<MobileNavbar v-if="sections" :sections="sections" /> <MobileNavbar v-if="sections" :sections="sections" />
<SearchModal open_id="open-search-modal"> <SearchModal open_id="open-search-modal">
<ClientGlobalSearch :open_id="open_id" /> <ClientGlobalSearch />
</SearchModal> </SearchModal>
<SearchModal open_id="open-search-sveden-modal"> <SearchModal open_id="open-search-sveden-modal">
<ClientStaticSearch :open_id="open_id" /> <ClientStaticSearch />
</SearchModal> </SearchModal>
</template> </template>
<script> <script>
@@ -61,12 +58,13 @@ import { Link } from "@inertiajs/vue3";
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue"; import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
import MobileNavbar from "@/Navbars/MobileNavbar.vue"; import MobileNavbar from "@/Navbars/MobileNavbar.vue";
import DesktopNavBar from "@/Navbars/DesktopNavBar.vue"; import DesktopNavBar from "@/Navbars/DesktopNavBar.vue";
import { mapGetters, mapActions } from "vuex";
import SearchModal from "@/componentss/shared/modals/SearchModal.vue"; import SearchModal from "@/componentss/shared/modals/SearchModal.vue";
import { helpers } from "@/mixins/Helpers.js"; import { helpers } from "@/mixins/Helpers.js";
import {defineAsyncComponent} from "vue"; import ClientGlobalSearch from "@/componentss/features/search/components/GlobalSearch.vue";
import ClientStaticSearch from "@/componentss/features/search/components/StaticSearch.vue";
export default { export default {
inheritAttrs: false,
mixins: [helpers], mixins: [helpers],
name: 'MainPageNavBar', name: 'MainPageNavBar',
components: { components: {
@@ -75,16 +73,13 @@ export default {
MobileNavbar, MobileNavbar,
BasicIcon, BasicIcon,
Link, Link,
ClientGlobalSearch: defineAsyncComponent(() => ClientGlobalSearch,
import('@/componentss/features/search/components/GlobalSearch.vue') ClientStaticSearch,
),
ClientStaticSearch: defineAsyncComponent(() =>
import('@/componentss/features/search/components/StaticSearch.vue')
),
}, },
props: { props: {
sections: { sections: {
type: Object, type: Object,
default: () => ({}),
}, },
}, },
data() { data() {
@@ -102,7 +97,8 @@ export default {
handleScroll() { handleScroll() {
this.scrollPosition = window.pageYOffset; this.scrollPosition = window.pageYOffset;
if (this.lastSlider) { // Используем Vuex только если $store доступен
if (this.$store && this.lastSlider) {
const slider = this.lastSlider; const slider = this.lastSlider;
if (this.IS_SAME_ROUTE(slider.url)) { if (this.IS_SAME_ROUTE(slider.url)) {
const isSliderVisible = slider.top <= this.scrollPosition && slider.bottom >= this.scrollPosition; const isSliderVisible = slider.top <= this.scrollPosition && slider.bottom >= this.scrollPosition;
@@ -111,33 +107,55 @@ export default {
} }
this.headerFilter = this.scrollPosition > 5; this.headerFilter = this.scrollPosition > 5;
}, }
}, },
watch: { watch: {
lastSlider(newVal) { lastSlider(newVal) {
// Если Vuex не используется, просто игнорируем
if (!this.$store) return;
if (this.IS_SAME_ROUTE(newVal?.url)) { if (this.IS_SAME_ROUTE(newVal?.url)) {
this.underSliderHeader = newVal.bottom < 0; this.underSliderHeader = newVal.bottom < 0;
} }
}, }
}, },
mounted() { mounted() {
window.addEventListener('scroll', this.handleScroll); window.addEventListener('scroll', this.handleScroll);
// Вызываем action, только если на клиенте и $store доступен
if (typeof window !== 'undefined' && this.$store && this.initializeBvi) {
this.initializeBvi(); this.initializeBvi();
}
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll); window.removeEventListener('scroll', this.handleScroll);
}, },
computed: { computed: {
...mapGetters(['lastSlider', 'isBviActive']),
lastSlider() {
if (this.$store && this.$store.getters && this.$store.getters.lastSlider) {
return this.$store.getters.lastSlider;
}
return null;
},
isBviActive() {
// Для SSR возвращаем false по умолчанию
if (typeof window === 'undefined') return false;
return this.$store?.getters?.isBviActive ?? false;
},
currentLogo() { currentLogo() {
if (this.isBviActive) { if (this.isBviActive) {
return this.logos.default return this.logos.default;
} }
return this.underSliderHeader ? this.logos.alternate : this.logos.default; return this.underSliderHeader ? this.logos.alternate : this.logos.default;
}, }
}, },
created() { created() {
this.initializeBvi = mapActions(['initializeBvi']).initializeBvi; // Инициализацию Vuex экшенов проводим, только если $store есть
if (this.$store && this.$store.dispatch) {
this.initializeBvi = () => this.$store.dispatch('initializeBvi');
}
} }
} }
</script> </script>
@@ -43,7 +43,7 @@ export default {
}, },
props: { props: {
journals: { journals: {
type: Array, type: Object,
}, },
seo: { seo: {
type: Object, type: Object,
@@ -62,7 +62,7 @@ export default {
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer> <BasicPageContainer>
@@ -80,7 +80,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
@@ -94,7 +94,7 @@ export default {
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
@@ -70,7 +70,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer> <BasicPageContainer>
@@ -2,7 +2,7 @@
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<div class="relative mb-auto mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"> <div class="relative mb-auto mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10">
@@ -24,7 +24,7 @@ export default {
}, },
props: { props: {
divisions: { divisions: {
type: Array, type: Object,
}, },
seo: { seo: {
type: Object, type: Object,
@@ -42,7 +42,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
<div class="flex flex-col h-screen"> <div class="flex flex-col h-screen">
<main class="flex-grow"> <main class="flex-grow">
+1 -1
View File
@@ -2,7 +2,7 @@
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<div class="flex flex-col h-screen"> <div class="flex flex-col h-screen">
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
<main class="flex-grow"> <main class="flex-grow">
<div class="relative mb-auto mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"> <div class="relative mb-auto mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10">
+5 -5
View File
@@ -51,16 +51,16 @@ export default {
type: String, type: String,
}, },
eventDates: { eventDates: {
type: Array, type: Object,
}, },
navigation: { navigation: {
type: Object, type: Object,
}, },
filters: { filters: {
type: Array, type: Object,
}, },
categories: { categories: {
type: Array, type: Object,
}, },
breadcrumbs: { breadcrumbs: {
type: Object type: Object
@@ -81,7 +81,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer breakpoint="md"> <BasicPageContainer breakpoint="md">
@@ -129,7 +129,7 @@ export default {
</div> </div>
</template> </template>
</div> </div>
<BasicPagination :links="events.links" /> <BasicPagination v-if="events.links.next" :links="events.links" />
</div> </div>
</BasicPageContainer> </BasicPageContainer>
+5 -5
View File
@@ -40,19 +40,19 @@ export default {
type: Object, type: Object,
}, },
currentDate: { currentDate: {
type: String, type: Object,
}, },
eventDates: { eventDates: {
type: Array, type: Object,
}, },
navigation: { navigation: {
type: Object, type: Object,
}, },
filters: { filters: {
type: Array, type: Object,
}, },
categories: { categories: {
type: Array, type: Object,
}, },
breadcrumbs: { breadcrumbs: {
type: Object type: Object
@@ -72,7 +72,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer breakpoint="md"> <BasicPageContainer breakpoint="md">
+1 -1
View File
@@ -61,7 +61,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer> <BasicPageContainer>
@@ -45,7 +45,7 @@ export default {
}, },
props: { props: {
faculties: { faculties: {
type: Array, type: Object,
}, },
seo: { seo: {
type: Object, type: Object,
@@ -63,7 +63,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer> <BasicPageContainer>
+1 -1
View File
@@ -1,7 +1,7 @@
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<div class="relative mx-auto mb-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"> <div class="relative mx-auto mb-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10">
+1 -1
View File
@@ -1,7 +1,7 @@
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
+2 -7
View File
@@ -39,17 +39,12 @@ export default {
Link, Link,
Head, Head,
}, },
data() {
return {
};
},
props: { props: {
posts: { posts: {
type: Object, type: Object,
}, },
filters: { filters: {
type: Array, type: Object,
}, },
categories: { categories: {
type: Object, type: Object,
@@ -79,7 +74,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer> <BasicPageContainer>
+1 -1
View File
@@ -84,7 +84,7 @@ export default {
<ScrollTimeline /> <ScrollTimeline />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer breakpoint="md"> <BasicPageContainer breakpoint="md">
<div class="space-y-5 md:space-y-10"> <div class="space-y-5 md:space-y-10">
+7 -7
View File
@@ -44,22 +44,22 @@ export default {
type: String, type: String,
}, },
levelsEducational: { levelsEducational: {
type: Array, type: Object,
}, },
naprs: { naprs: {
type: Array type: Object,
}, },
filters: { filters: {
type: Array, type: Object,
}, },
formsEdu: { formsEdu: {
type: Array, type: Object,
}, },
budgetEdu: { budgetEdu: {
type: Array, type: Object,
}, },
direction_studies: { direction_studies: {
type: Array, type: Object,
}, },
seo: { seo: {
type: Object, type: Object,
@@ -91,7 +91,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer> <BasicPageContainer>
+3 -3
View File
@@ -63,10 +63,10 @@ export default {
}, },
props: { props: {
program: { program: {
type: Array, type: Object,
}, },
formsEdu: { formsEdu: {
type: Array type: Object
}, },
seo: { seo: {
type: Object, type: Object,
@@ -78,7 +78,7 @@ export default {
<template> <template>
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<BasicPageContainer> <BasicPageContainer>
@@ -146,7 +146,7 @@ export default {
<template> <template>
<MetaTags :seo="this.seo" /> <MetaTags :seo="this.seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<div class="flex flex-col h-screen"> <div class="flex flex-col h-screen">
<main class="flex-grow"> <main class="flex-grow">
+1 -1
View File
@@ -79,7 +79,7 @@ export default {
</script> </script>
<template> <template>
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="flex flex-col h-screen justify-between"> <div class="flex flex-col h-screen justify-between">
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
<div class="max-w-[50rem] flex flex-col mx-auto size-full"> <div class="max-w-[50rem] flex flex-col mx-auto size-full">
<!-- ========== HEADER ========== --> <!-- ========== HEADER ========== -->
<!-- ========== END HEADER ========== --> <!-- ========== END HEADER ========== -->
+1 -1
View File
@@ -2,7 +2,7 @@
<MetaTags :seo="seo" /> <MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" /> <MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper> <BasicPageWrapper>
<div class="relative mx-auto mb-auto mt-[67px] max-w-screen-xl w-full px-4 py-10 md:flex md:flex-row md:py-10"> <div class="relative mx-auto mb-auto mt-[67px] max-w-screen-xl w-full px-4 py-10 md:flex md:flex-row md:py-10">
+1 -1
View File
@@ -34,7 +34,7 @@ export default {
</script> </script>
<template> <template>
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar> <MainPageNavBar :sections="$page.props.navigation" />
<div class="relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"> <div class="relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10">
<article class="w-full min-w-0 mt-4 px-1 md:px-6"> <article class="w-full min-w-0 mt-4 px-1 md:px-6">
@@ -43,7 +43,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -72,7 +72,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -54,7 +54,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -94,7 +94,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -43,7 +43,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -72,7 +72,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -43,7 +43,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -72,7 +72,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -56,7 +56,7 @@ export default {
props: { props: {
dates: { dates: {
type: Array, type: Object,
}, },
currentDate: { currentDate: {
type: String, type: String,
@@ -43,7 +43,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -72,7 +72,7 @@
</Link> </Link>
</li> </li>
<li class="text-sm"> <li class="text-sm">
<Link :href="this.$inertia.page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover"> <Link :href="$page.props.ziggy.location" class="flex items-center text-gray-500 hover:text-primary-hover">
<svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400" <svg class="flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400"
width="16" height="16" width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -103,7 +103,7 @@ export default {
}, },
props: { props: {
headerNavs: { headerNavs: {
type: Array, type: Object,
}, },
}, },
}; };
@@ -40,7 +40,7 @@ export default {
props: { props: {
authors: { authors: {
type: Array, type: Object,
}, },
}, },
} }
@@ -94,7 +94,7 @@ export default {
props: { props: {
images: { images: {
type: Array, type: Object,
}, },
title: { title: {
type: String, type: String,
@@ -48,7 +48,7 @@ export default {
}, },
props: { props: {
categories: { categories: {
type: Array, type: Object,
}, },
search: { search: {
type: String, type: String,
@@ -28,7 +28,7 @@
name="hs-as-table-product-review-search" name="hs-as-table-product-review-search"
class="py-1 placeholder-[#8F8F8F] font-light px-2 block flex-1 w-full border-none text-lg focus:z-10 border-transparent focus:border-transparent focus:ring-0" class="py-1 placeholder-[#8F8F8F] font-light px-2 block flex-1 w-full border-none text-lg focus:z-10 border-transparent focus:border-transparent focus:ring-0"
placeholder="Поиск по сайту"> placeholder="Поиск по сайту">
<button v-if='this.searchInput !== ""' @click="clearSearch" class="items-center flex justify-end px-2" type="button"> <button v-if='searchInput !== ""' @click="clearSearch" class="items-center flex justify-end px-2" type="button">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 hover:text-gray-300 text-gray-500 duration-150 font-bold"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 hover:text-gray-300 text-gray-500 duration-150 font-bold">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" /> <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
</svg> </svg>
@@ -178,11 +178,6 @@ export default {
this.search() this.search()
} }
}, },
props: {
open_id: {
type: String,
}
}
} }
</script> </script>
@@ -1,4 +1,5 @@
<template> <template>
<div>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.post.index')" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg"> <Link data-hs-overlay="#hs-basic-modal" :href="route('client.post.index')" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z" /> <path stroke-linecap="round" stroke-linejoin="round" d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z" />
@@ -33,6 +34,7 @@
<span class="text-sm">Курсы дополнительного образования</span> <span class="text-sm">Курсы дополнительного образования</span>
</Link> </Link>
</div>
</template> </template>
<script> <script>
@@ -28,7 +28,7 @@
name="hs-as-table-product-review-search" name="hs-as-table-product-review-search"
class="py-1 placeholder-[#8F8F8F] font-light px-2 block flex-1 w-full border-none text-lg focus:z-10 border-transparent focus:border-transparent focus:ring-0" class="py-1 placeholder-[#8F8F8F] font-light px-2 block flex-1 w-full border-none text-lg focus:z-10 border-transparent focus:border-transparent focus:ring-0"
placeholder="Поиск по сведениям об образовательной организации"> placeholder="Поиск по сведениям об образовательной организации">
<button v-if='this.searchInput !== ""' @click="clearFilters" class="items-center flex justify-end px-2" type="button"> <button v-if='searchInput !== ""' @click="clearFilters" class="items-center flex justify-end px-2" type="button">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 hover:text-gray-300 text-gray-500 duration-150 font-bold"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 hover:text-gray-300 text-gray-500 duration-150 font-bold">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" /> <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
</svg> </svg>
@@ -198,12 +198,6 @@ export default {
} }
}, },
props: {
open_id: {
type: String,
}
}
} }
</script> </script>
@@ -102,7 +102,7 @@ export default {
name: 'SliderBody', name: 'SliderBody',
props: { props: {
slides: { slides: {
type: Array, type: Object,
} }
}, },
data() { data() {
@@ -59,7 +59,7 @@ export default {
}, },
props: { props: {
blocks: { blocks: {
type: Array, type: Object,
required: true, required: true,
}, },
}, },
@@ -53,7 +53,7 @@ export default {
}, },
props: { props: {
block: { block: {
type: Array, type: Object,
}, },
}, },
methods: { methods: {
@@ -25,7 +25,7 @@ export default {
required: true, required: true,
}, },
items: { items: {
type: Array, type: Object,
required: true, required: true,
}, },
}, },
@@ -25,7 +25,7 @@ export default {
required: true, required: true,
}, },
items: { items: {
type: Array, type: Object,
required: true, required: true,
}, },
}, },
@@ -40,6 +40,7 @@
import {Link} from "@inertiajs/vue3"; import {Link} from "@inertiajs/vue3";
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue"; import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
import {debounce} from "lodash"; import {debounce} from "lodash";
export default { export default {
name: "CategoryFilter", name: "CategoryFilter",
components: { components: {
@@ -50,25 +51,23 @@ export default {
return { return {
category_slug: this.category_filter.value || [], category_slug: this.category_filter.value || [],
searchTerm: '', searchTerm: '',
filteredItems: this.categories.data, // Изначально все элементы
} }
}, },
methods: { methods: {
filter: debounce(function () { filter: debounce(function () {
let url = new URL(window.location.href); let url = new URL(window.location.href);
// Создаем массив для хранения всех ключей, которые нужно удалить
const keysToDelete = []; const keysToDelete = [];
// Перебираем все параметры и добавляем ключи, начинающиеся с 'category', в массив
for (const [key] of url.searchParams) { for (const [key] of url.searchParams) {
if (key.startsWith('category')) { if (key.startsWith('category')) {
keysToDelete.push(key); keysToDelete.push(key);
} }
} }
// Удаляем все ключи из массива
keysToDelete.forEach(key => url.searchParams.delete(key)); keysToDelete.forEach(key => url.searchParams.delete(key));
url.searchParams.delete('page'); url.searchParams.delete('page');
let newUrl = url.toString(); let newUrl = url.toString();
this.$inertia.visit(newUrl, { this.$inertia.visit(newUrl, {
method: 'get', method: 'get',
preserveState: true, preserveState: true,
@@ -77,22 +76,22 @@ export default {
}, },
}); });
}, 500), }, 500),
clearFilter() { clearFilter() {
let url = new URL(window.location.href); let url = new URL(window.location.href);
// Создаем массив для хранения всех ключей, которые нужно удалить
const keysToDelete = []; const keysToDelete = [];
// Перебираем все параметры и добавляем ключи, начинающиеся с 'category', в массив
for (const [key] of url.searchParams) { for (const [key] of url.searchParams) {
if (key.startsWith('category')) { if (key.startsWith('category')) {
keysToDelete.push(key); keysToDelete.push(key);
} }
} }
// Удаляем все ключи из массива
keysToDelete.forEach(key => url.searchParams.delete(key)); keysToDelete.forEach(key => url.searchParams.delete(key));
this.category_slug = []; this.category_slug = [];
this.searchTerm = ''; // Сбросить поле поиска this.searchTerm = '';
let newUrl = url.toString(); let newUrl = url.toString();
this.$inertia.visit(newUrl, { this.$inertia.visit(newUrl, {
method: 'get', method: 'get',
preserveState: true, preserveState: true,
@@ -102,27 +101,27 @@ export default {
computed: { computed: {
filteredItems() { filteredItems() {
if (!this.searchTerm) { if (!this.searchTerm) {
return this.categories.data; // Возвращаем все элементы, если ничего не введено return this.categories.data;
} }
const term = this.searchTerm.toLowerCase(); // Приводим к нижнему регистру для нечувствительности к регистру const term = this.searchTerm.toLowerCase();
return this.categories.data.filter(item => return this.categories.data.filter(item =>
item.title.toLowerCase().includes(term) // Фильтруем по заголовку item.title.toLowerCase().includes(term)
); );
} }
}, },
props: { props: {
categories: { categories: {
type: Object, type: Object,
required: true // Добавляем required для ясности
}, },
category_filter: { category_filter: {
type: Object, type: Object,
}, default: () => ({ value: [] }) // Добавляем значение по умолчанию
}, },
} }
}
</script> </script>
<style scoped> <style scoped>
</style> </style>
@@ -51,7 +51,6 @@ export default {
return { return {
tag_slug: this.tag_filter.value || [], tag_slug: this.tag_filter.value || [],
searchTerm: '', searchTerm: '',
filteredItems: this.tags, // Изначально все элементы
} }
}, },
methods: { methods: {
@@ -26,6 +26,7 @@ import {defineAsyncComponent} from "vue";
export default { export default {
inheritAttrs: false,
name: 'SearchModal', name: 'SearchModal',
props: { props: {
open_id: { open_id: {
@@ -95,7 +95,7 @@ export default {
}, },
props: { props: {
headerNavs: { headerNavs: {
type: Array, type: Object,
}, },
}, },
}; };
@@ -1,23 +1,23 @@
<template> <template>
<div class="mt-10 flex items-center justify-center"> <div class="mt-10 flex items-center justify-center">
<nav class="flex items-center gap-x-1" aria-label="Pagination"> <nav class="flex items-center gap-x-1" aria-label="Pagination">
<Link :href="links.links[0].url" as="button" class="min-h-9.5 min-w-9.5 py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg border border-transparent text-gray-800 hover:bg-gray-100 focus:outline-hidden focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none" aria-label="Previous"> <a :href="links.links[0].url" class="min-h-9.5 min-w-9.5 py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg border border-transparent text-gray-800 hover:bg-gray-100 focus:outline-hidden focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none" aria-label="Previous">
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m15 18-6-6 6-6"></path> <path d="m15 18-6-6 6-6"></path>
</svg> </svg>
<span class="sr-only">Previous</span> <span class="sr-only">Previous</span>
</Link> </a>
<div class="flex items-center gap-x-1"> <div class="flex items-center gap-x-1">
<Link v-for="link in getPageLinks(links)" as="button" :href="link.url" <a v-for="link in getPageLinks(links)" :href="link.url"
:class="link.active ? 'border-gray-200 text-gray-800' : 'border-transparent hover:bg-gray-100'" :class="link.active ? 'border-gray-200 text-gray-800' : 'border-transparent hover:bg-gray-100'"
class="min-h-9.5 min-w-9.5 flex justify-center items-center border py-2 px-3 text-sm rounded-lg focus:outline-hidden focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none">{{ link.label }}</Link> class="min-h-9.5 min-w-9.5 flex justify-center items-center border py-2 px-3 text-sm rounded-lg focus:outline-hidden focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none">{{ link.label }}</a>
</div> </div>
<Link :href="links.links.slice(-1).pop().url" as="button" class="min-h-9.5 min-w-9.5 py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg border border-transparent text-gray-800 hover:bg-gray-100 focus:outline-hidden focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none" aria-label="Next"> <a :href="links.links.slice(-1).pop().url" class="min-h-9.5 min-w-9.5 py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg border border-transparent text-gray-800 hover:bg-gray-100 focus:outline-hidden focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none" aria-label="Next">
<span class="sr-only">Next</span> <span class="sr-only">Next</span>
<svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m9 18 6-6-6-6"></path> <path d="m9 18 6-6-6-6"></path>
</svg> </svg>
</Link> </a>
</nav> </nav>
</div> </div>
</template> </template>
+39 -16
View File
@@ -1,43 +1,66 @@
import slugify from "slugify"; import slugify from "slugify";
import process from "@inertiajs/inertia-vue3/.eslintrc.js";
export const helpers = { export const helpers = {
data() {
},
methods: { methods: {
HAS_ACTIVE_PAGE(section) { HAS_ACTIVE_PAGE(section) {
if (!this.$page?.props?.ziggy) return false;
if (section.pages) { if (section.pages) {
return section.pages.some(page => this.IS_SAME_ROUTE(page.path)); return section.pages.some(page => this.IS_SAME_ROUTE(page.path));
} }
if (section.subSections) { if (section.subSections) {
return section.subSections.some(subSection => this.HAS_ACTIVE_PAGE(subSection)); return section.subSections.some(subSection => this.HAS_ACTIVE_PAGE(subSection));
} }
return false;
}, },
IS_SAME_ROUTE(route) { IS_SAME_ROUTE(route) {
if (route === this.$page.props.ziggy.location) { if (!this.$page?.props?.ziggy) return false;
const currentLocation = this.$page.props.ziggy.location;
if (!currentLocation) return false;
if (route === currentLocation) {
return true; return true;
} }
const currentLocation = this.$page.props.ziggy.location;
try {
const currentUrl = this.$page.props.ziggy.url + '/' + route; const currentUrl = this.$page.props.ziggy.url + '/' + route;
return currentLocation === currentUrl; return currentLocation === currentUrl;
}, } catch {
TEXT_LIMIT(text, symbols) { return false;
if (text.length > symbols) {
let LimitedText
LimitedText = text.substring(0, symbols)
return LimitedText + "..."
} }
return text
}, },
GENERATE_SLUG: function (text) {
TEXT_LIMIT(text, symbols) {
if (!text) return '';
if (typeof text !== 'string') return String(text);
return text.length > symbols
? text.substring(0, symbols) + "..."
: text;
},
GENERATE_SLUG(text) {
if (typeof text !== 'string') return '';
try {
return slugify(text, { return slugify(text, {
lower: true, lower: true,
strict: true, strict: true,
locale: 'ru' locale: 'ru'
}); });
}, } catch {
GET_BASE_URL() { return text.toLowerCase().replace(/\s+/g, '-');
return window.location.origin + '/';
} }
}, },
GET_BASE_URL() {
if (typeof window === 'undefined') {
return process.env.APP_URL || '/'; // Используем env-переменную на сервере
}
return window.location.origin + '/';
}
}
}; };
+3 -1
View File
@@ -15,7 +15,10 @@ use App\Http\Controllers\MainController;
use App\Http\Controllers\PageController; use App\Http\Controllers\PageController;
use App\Http\Controllers\PersonController; use App\Http\Controllers\PersonController;
use App\Models\Post;
use App\Services\App\Search\StaticFileSearch; use App\Services\App\Search\StaticFileSearch;
use App\Services\Filament\Domain\Posts\VkPostPublisher;
use App\Services\VK\VkAuthService;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
@@ -25,7 +28,6 @@ Route::middleware('signed')->get('invitation/{invitation}/accept', \App\Livewire
->name('invitation.accept'); ->name('invitation.accept');
Route::middleware('access-check')->group(function () { Route::middleware('access-check')->group(function () {
// Главная страница // Главная страница
+2 -1
View File
@@ -2,6 +2,7 @@ import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin'; import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue'; import vue from '@vitejs/plugin-vue';
export default defineConfig({ export default defineConfig({
build: { build: {
manifest: "manifest.json", manifest: "manifest.json",
@@ -41,7 +42,7 @@ export default defineConfig({
} }
}, },
ssr: { ssr: {
noExternal: ['lodash', 'bvi', 'preline'], noExternal: ['lodash', 'bvi', 'preline', 'vue3-yandex-smartcaptcha', 'vuex'],
}, },
}); });