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)
);
if (array_key_exists('custom_form', request()->input('settings_page'))) {
$form = request()->input('settings_page')['custom_form'];
$settingsPage = request()->attributes->get('settings_page') ?? [];
if (array_key_exists('custom_form', $settingsPage)) {
$form = $settingsPage['custom_form'];
} else {
$form = null;
}
+1 -2
View File
@@ -32,8 +32,7 @@ class AccessCheck
abort($registeredRoute->code);
}
$request->merge(['settings_page' => $registeredRoute->settings]);
$request->attributes->set('settings_page', $registeredRoute->settings);
// Если все проверки пройдены, продолжаем выполнение запроса
return $next($request);
}
+7
View File
@@ -24,6 +24,13 @@ return [
'intercept_gate' => 'before', // after
],
'panel_user' => [
'enabled' => false,
'name' => 'panel_user',
],
'dashboard_user' => [
'enabled' => true,
'name' => 'dashboard_user',
+1 -1
View File
@@ -14,7 +14,7 @@ return [
'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",
"npm": "^10.9.0",
"postcss": "^8.4.18",
"rollup": "^4.40.0",
"tailwindcss": "^3.2.1",
"terser": "^5.39.0",
"vue": "^3.2.41"
@@ -85,12 +86,12 @@
}
},
"node_modules/@babel/parser": {
"version": "7.26.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz",
"integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==",
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz",
"integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==",
"license": "MIT",
"dependencies": {
"@babel/types": "^7.26.10"
"@babel/types": "^7.27.0"
},
"bin": {
"parser": "bin/babel-parser.js"
@@ -100,9 +101,9 @@
}
},
"node_modules/@babel/types": {
"version": "7.26.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz",
"integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==",
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz",
"integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==",
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
@@ -257,9 +258,9 @@
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.25.1",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz",
"integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==",
"version": "0.25.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.3.tgz",
"integrity": "sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==",
"cpu": [
"arm64"
],
@@ -775,9 +776,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz",
"integrity": "sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.0.tgz",
"integrity": "sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==",
"cpu": [
"arm"
],
@@ -788,9 +789,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.35.0.tgz",
"integrity": "sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.0.tgz",
"integrity": "sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==",
"cpu": [
"arm64"
],
@@ -801,9 +802,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.35.0.tgz",
"integrity": "sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.0.tgz",
"integrity": "sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==",
"cpu": [
"arm64"
],
@@ -814,9 +815,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.35.0.tgz",
"integrity": "sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.0.tgz",
"integrity": "sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==",
"cpu": [
"x64"
],
@@ -827,9 +828,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.35.0.tgz",
"integrity": "sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.0.tgz",
"integrity": "sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==",
"cpu": [
"arm64"
],
@@ -840,9 +841,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.35.0.tgz",
"integrity": "sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.0.tgz",
"integrity": "sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==",
"cpu": [
"x64"
],
@@ -853,9 +854,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.35.0.tgz",
"integrity": "sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.0.tgz",
"integrity": "sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==",
"cpu": [
"arm"
],
@@ -866,9 +867,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.35.0.tgz",
"integrity": "sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.0.tgz",
"integrity": "sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==",
"cpu": [
"arm"
],
@@ -879,9 +880,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.35.0.tgz",
"integrity": "sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.0.tgz",
"integrity": "sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==",
"cpu": [
"arm64"
],
@@ -892,9 +893,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.35.0.tgz",
"integrity": "sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.0.tgz",
"integrity": "sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==",
"cpu": [
"arm64"
],
@@ -905,9 +906,9 @@
]
},
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.35.0.tgz",
"integrity": "sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.0.tgz",
"integrity": "sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==",
"cpu": [
"loong64"
],
@@ -918,9 +919,9 @@
]
},
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.35.0.tgz",
"integrity": "sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.0.tgz",
"integrity": "sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==",
"cpu": [
"ppc64"
],
@@ -931,9 +932,22 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.35.0.tgz",
"integrity": "sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.0.tgz",
"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": [
"riscv64"
],
@@ -944,9 +958,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.35.0.tgz",
"integrity": "sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.0.tgz",
"integrity": "sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==",
"cpu": [
"s390x"
],
@@ -957,9 +971,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.35.0.tgz",
"integrity": "sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.0.tgz",
"integrity": "sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==",
"cpu": [
"x64"
],
@@ -970,9 +984,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.35.0.tgz",
"integrity": "sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.0.tgz",
"integrity": "sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==",
"cpu": [
"x64"
],
@@ -983,9 +997,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.35.0.tgz",
"integrity": "sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.0.tgz",
"integrity": "sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==",
"cpu": [
"arm64"
],
@@ -996,9 +1010,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.35.0.tgz",
"integrity": "sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.0.tgz",
"integrity": "sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==",
"cpu": [
"ia32"
],
@@ -1009,9 +1023,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.35.0.tgz",
"integrity": "sha512-PIQeY5XDkrOysbQblSW7v3l1MDZzkTEzAfTPkj5VAu3FW8fS4ynyLg2sINp0fp3SjZ8xkRYpLqoKcYqAkhU1dw==",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.0.tgz",
"integrity": "sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==",
"cpu": [
"x64"
],
@@ -1035,9 +1049,9 @@
}
},
"node_modules/@types/estree": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
"license": "MIT"
},
"node_modules/@types/lodash": {
@@ -1303,9 +1317,9 @@
}
},
"node_modules/axios": {
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz",
"integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==",
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
"integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1447,9 +1461,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001704",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz",
"integrity": "sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew==",
"version": "1.0.30001715",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001715.tgz",
"integrity": "sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==",
"dev": true,
"funding": [
{
@@ -1687,9 +1701,9 @@
"license": "MIT"
},
"node_modules/electron-to-chromium": {
"version": "1.5.118",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.118.tgz",
"integrity": "sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==",
"version": "1.5.142",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.142.tgz",
"integrity": "sha512-Ah2HgkTu/9RhTDNThBtzu2Wirdy4DC9b0sMT1pUhbkZQ5U/iwmE+PHZX1MpjD5IkJCc2wSghgGG/B04szAx07w==",
"dev": true,
"license": "ISC"
},
@@ -2455,9 +2469,9 @@
}
},
"node_modules/nanoid": {
"version": "3.3.9",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.9.tgz",
"integrity": "sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg==",
"version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
"funding": [
{
"type": "github",
@@ -5368,9 +5382,9 @@
}
},
"node_modules/pirates": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
"integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
"integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5652,12 +5666,11 @@
}
},
"node_modules/rollup": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.35.0.tgz",
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
"license": "MIT",
"version": "4.40.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.0.tgz",
"integrity": "sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==",
"dependencies": {
"@types/estree": "1.0.6"
"@types/estree": "1.0.7"
},
"bin": {
"rollup": "dist/bin/rollup"
@@ -5667,25 +5680,26 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.35.0",
"@rollup/rollup-android-arm64": "4.35.0",
"@rollup/rollup-darwin-arm64": "4.35.0",
"@rollup/rollup-darwin-x64": "4.35.0",
"@rollup/rollup-freebsd-arm64": "4.35.0",
"@rollup/rollup-freebsd-x64": "4.35.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.35.0",
"@rollup/rollup-linux-arm-musleabihf": "4.35.0",
"@rollup/rollup-linux-arm64-gnu": "4.35.0",
"@rollup/rollup-linux-arm64-musl": "4.35.0",
"@rollup/rollup-linux-loongarch64-gnu": "4.35.0",
"@rollup/rollup-linux-powerpc64le-gnu": "4.35.0",
"@rollup/rollup-linux-riscv64-gnu": "4.35.0",
"@rollup/rollup-linux-s390x-gnu": "4.35.0",
"@rollup/rollup-linux-x64-gnu": "4.35.0",
"@rollup/rollup-linux-x64-musl": "4.35.0",
"@rollup/rollup-win32-arm64-msvc": "4.35.0",
"@rollup/rollup-win32-ia32-msvc": "4.35.0",
"@rollup/rollup-win32-x64-msvc": "4.35.0",
"@rollup/rollup-android-arm-eabi": "4.40.0",
"@rollup/rollup-android-arm64": "4.40.0",
"@rollup/rollup-darwin-arm64": "4.40.0",
"@rollup/rollup-darwin-x64": "4.40.0",
"@rollup/rollup-freebsd-arm64": "4.40.0",
"@rollup/rollup-freebsd-x64": "4.40.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.40.0",
"@rollup/rollup-linux-arm-musleabihf": "4.40.0",
"@rollup/rollup-linux-arm64-gnu": "4.40.0",
"@rollup/rollup-linux-arm64-musl": "4.40.0",
"@rollup/rollup-linux-loongarch64-gnu": "4.40.0",
"@rollup/rollup-linux-powerpc64le-gnu": "4.40.0",
"@rollup/rollup-linux-riscv64-gnu": "4.40.0",
"@rollup/rollup-linux-riscv64-musl": "4.40.0",
"@rollup/rollup-linux-s390x-gnu": "4.40.0",
"@rollup/rollup-linux-x64-gnu": "4.40.0",
"@rollup/rollup-linux-x64-musl": "4.40.0",
"@rollup/rollup-win32-arm64-msvc": "4.40.0",
"@rollup/rollup-win32-ia32-msvc": "4.40.0",
"@rollup/rollup-win32-x64-msvc": "4.40.0",
"fsevents": "~2.3.2"
}
},
@@ -6145,9 +6159,9 @@
"license": "MIT"
},
"node_modules/vite": {
"version": "5.4.14",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz",
"integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==",
"version": "5.4.18",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.18.tgz",
"integrity": "sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==",
"license": "MIT",
"dependencies": {
"esbuild": "^0.21.3",
@@ -6385,9 +6399,9 @@
}
},
"node_modules/yaml": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz",
"integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz",
"integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",
"dev": true,
"license": "ISC",
"bin": {
+1
View File
@@ -18,6 +18,7 @@
"lodash": "^4.17.21",
"npm": "^10.9.0",
"postcss": "^8.4.18",
"rollup": "^4.40.0",
"tailwindcss": "^3.2.1",
"terser": "^5.39.0",
"vue": "^3.2.41"
+41 -23
View File
@@ -1,5 +1,5 @@
<template>
<header :class="[
<header v-bind="$attrs" :class="[
{ 'header-filter': headerFilter },
{ 'under-slider-bg': underSliderHeader },
isBviActive ? 'static' : 'fixed top-0 left-0 right-0'
@@ -11,8 +11,6 @@
<Link class="flex-none text-xl font-semibold"
:href="route('index')" aria-label="NTSPI">
<img :key="currentLogo" class="max-w-[300px] transition-all duration-300" :src="currentLogo" alt="Логотип">
</Link>
<div class="lg:hidden">
<button :class="{ 'text-black border-gray-500': underSliderHeader, 'text-white border-gray-200': !underSliderHeader }"
@@ -48,12 +46,11 @@
<MobileNavbar v-if="sections" :sections="sections" />
<SearchModal open_id="open-search-modal">
<ClientGlobalSearch :open_id="open_id" />
<ClientGlobalSearch />
</SearchModal>
<SearchModal open_id="open-search-sveden-modal">
<ClientStaticSearch :open_id="open_id" />
<ClientStaticSearch />
</SearchModal>
</template>
<script>
@@ -61,12 +58,13 @@ import { Link } from "@inertiajs/vue3";
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
import MobileNavbar from "@/Navbars/MobileNavbar.vue";
import DesktopNavBar from "@/Navbars/DesktopNavBar.vue";
import { mapGetters, mapActions } from "vuex";
import SearchModal from "@/componentss/shared/modals/SearchModal.vue";
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 {
inheritAttrs: false,
mixins: [helpers],
name: 'MainPageNavBar',
components: {
@@ -75,16 +73,13 @@ export default {
MobileNavbar,
BasicIcon,
Link,
ClientGlobalSearch: defineAsyncComponent(() =>
import('@/componentss/features/search/components/GlobalSearch.vue')
),
ClientStaticSearch: defineAsyncComponent(() =>
import('@/componentss/features/search/components/StaticSearch.vue')
),
ClientGlobalSearch,
ClientStaticSearch,
},
props: {
sections: {
type: Object,
default: () => ({}),
},
},
data() {
@@ -102,7 +97,8 @@ export default {
handleScroll() {
this.scrollPosition = window.pageYOffset;
if (this.lastSlider) {
// Используем Vuex только если $store доступен
if (this.$store && this.lastSlider) {
const slider = this.lastSlider;
if (this.IS_SAME_ROUTE(slider.url)) {
const isSliderVisible = slider.top <= this.scrollPosition && slider.bottom >= this.scrollPosition;
@@ -111,33 +107,55 @@ export default {
}
this.headerFilter = this.scrollPosition > 5;
},
}
},
watch: {
lastSlider(newVal) {
// Если Vuex не используется, просто игнорируем
if (!this.$store) return;
if (this.IS_SAME_ROUTE(newVal?.url)) {
this.underSliderHeader = newVal.bottom < 0;
}
},
}
},
mounted() {
window.addEventListener('scroll', this.handleScroll);
this.initializeBvi();
// Вызываем action, только если на клиенте и $store доступен
if (typeof window !== 'undefined' && this.$store && this.initializeBvi) {
this.initializeBvi();
}
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll);
},
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() {
if (this.isBviActive) {
return this.logos.default
return this.logos.default;
}
return this.underSliderHeader ? this.logos.alternate : this.logos.default;
},
}
},
created() {
this.initializeBvi = mapActions(['initializeBvi']).initializeBvi;
// Инициализацию Vuex экшенов проводим, только если $store есть
if (this.$store && this.$store.dispatch) {
this.initializeBvi = () => this.$store.dispatch('initializeBvi');
}
}
}
</script>
@@ -151,4 +169,4 @@ export default {
.under-slider-bg {
background: hsla(0,0%,100%,.6);
}
</style>
</style>
@@ -43,7 +43,7 @@ export default {
},
props: {
journals: {
type: Array,
type: Object,
},
seo: {
type: Object,
@@ -62,7 +62,7 @@ export default {
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer>
@@ -80,7 +80,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
@@ -94,7 +94,7 @@ export default {
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
@@ -70,7 +70,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer>
@@ -2,7 +2,7 @@
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<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">
@@ -24,7 +24,7 @@ export default {
},
props: {
divisions: {
type: Array,
type: Object,
},
seo: {
type: Object,
@@ -42,7 +42,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar>
<MainPageNavBar :sections="$page.props.navigation" />
<div class="flex flex-col h-screen">
<main class="flex-grow">
+1 -1
View File
@@ -2,7 +2,7 @@
<MetaTags :seo="seo" />
<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">
<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,
},
eventDates: {
type: Array,
type: Object,
},
navigation: {
type: Object,
},
filters: {
type: Array,
type: Object,
},
categories: {
type: Array,
type: Object,
},
breadcrumbs: {
type: Object
@@ -81,7 +81,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar>
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer breakpoint="md">
@@ -129,7 +129,7 @@ export default {
</div>
</template>
</div>
<BasicPagination :links="events.links" />
<BasicPagination v-if="events.links.next" :links="events.links" />
</div>
</BasicPageContainer>
+5 -5
View File
@@ -40,19 +40,19 @@ export default {
type: Object,
},
currentDate: {
type: String,
type: Object,
},
eventDates: {
type: Array,
type: Object,
},
navigation: {
type: Object,
},
filters: {
type: Array,
type: Object,
},
categories: {
type: Array,
type: Object,
},
breadcrumbs: {
type: Object
@@ -72,7 +72,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar>
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer breakpoint="md">
+1 -1
View File
@@ -61,7 +61,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar>
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer>
@@ -45,7 +45,7 @@ export default {
},
props: {
faculties: {
type: Array,
type: Object,
},
seo: {
type: Object,
@@ -63,7 +63,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer>
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<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">
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
+2 -7
View File
@@ -39,17 +39,12 @@ export default {
Link,
Head,
},
data() {
return {
};
},
props: {
posts: {
type: Object,
},
filters: {
type: Array,
type: Object,
},
categories: {
type: Object,
@@ -79,7 +74,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar>
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer>
+1 -1
View File
@@ -84,7 +84,7 @@ export default {
<ScrollTimeline />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer breakpoint="md">
<div class="space-y-5 md:space-y-10">
+7 -7
View File
@@ -44,22 +44,22 @@ export default {
type: String,
},
levelsEducational: {
type: Array,
type: Object,
},
naprs: {
type: Array
type: Object,
},
filters: {
type: Array,
type: Object,
},
formsEdu: {
type: Array,
type: Object,
},
budgetEdu: {
type: Array,
type: Object,
},
direction_studies: {
type: Array,
type: Object,
},
seo: {
type: Object,
@@ -91,7 +91,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer>
+3 -3
View File
@@ -63,10 +63,10 @@ export default {
},
props: {
program: {
type: Array,
type: Object,
},
formsEdu: {
type: Array
type: Object
},
seo: {
type: Object,
@@ -78,7 +78,7 @@ export default {
<template>
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<BasicPageWrapper>
<BasicPageContainer>
@@ -146,7 +146,7 @@ export default {
<template>
<MetaTags :seo="this.seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<div class="flex flex-col h-screen">
<main class="flex-grow">
+1 -1
View File
@@ -79,7 +79,7 @@ export default {
</script>
<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">
<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">
<!-- ========== HEADER ========== -->
<!-- ========== END HEADER ========== -->
+1 -1
View File
@@ -2,7 +2,7 @@
<MetaTags :seo="seo" />
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
<MainPageNavBar :sections="$page.props.navigation" />
<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">
+1 -1
View File
@@ -34,7 +34,7 @@ export default {
</script>
<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">
<article class="w-full min-w-0 mt-4 px-1 md:px-6">
@@ -43,7 +43,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -72,7 +72,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -54,7 +54,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -94,7 +94,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -43,7 +43,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -72,7 +72,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -43,7 +43,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -72,7 +72,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -56,7 +56,7 @@ export default {
props: {
dates: {
type: Array,
type: Object,
},
currentDate: {
type: String,
@@ -43,7 +43,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -72,7 +72,7 @@
</Link>
</li>
<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"
width="16" height="16"
viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -103,7 +103,7 @@ export default {
},
props: {
headerNavs: {
type: Array,
type: Object,
},
},
};
@@ -40,7 +40,7 @@ export default {
props: {
authors: {
type: Array,
type: Object,
},
},
}
@@ -94,7 +94,7 @@ export default {
props: {
images: {
type: Array,
type: Object,
},
title: {
type: String,
@@ -48,7 +48,7 @@ export default {
},
props: {
categories: {
type: Array,
type: Object,
},
search: {
type: String,
@@ -28,7 +28,7 @@
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"
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">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
</svg>
@@ -178,11 +178,6 @@ export default {
this.search()
}
},
props: {
open_id: {
type: String,
}
}
}
</script>
@@ -1,38 +1,40 @@
<template>
<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">
<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" />
</svg>
<span class="text-sm">Новости</span>
</Link>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.event.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">
<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />
</svg>
<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">
<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" />
</svg>
<span class="text-sm">Новости</span>
</Link>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.event.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">
<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />
</svg>
<span class="text-sm">Мероприятия</span>
</Link>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.program.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">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25" />
</svg>
<span class="text-sm">Мероприятия</span>
</Link>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.program.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">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25" />
</svg>
<span class="text-sm">Приемная компания</span>
</Link>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.program.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">
<path stroke-linecap="round" stroke-linejoin="round" d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75" />
</svg>
<span class="text-sm">Приемная компания</span>
</Link>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.program.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">
<path stroke-linecap="round" stroke-linejoin="round" d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75" />
</svg>
<span class="text-sm">Образовательные программы</span>
</Link>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.additionalEducation.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">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z" />
</svg>
<span class="text-sm">Образовательные программы</span>
</Link>
<Link data-hs-overlay="#hs-basic-modal" :href="route('client.additionalEducation.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">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z" />
</svg>
<span class="text-sm">Курсы дополнительного образования</span>
</Link>
<span class="text-sm">Курсы дополнительного образования</span>
</Link>
</div>
</template>
<script>
@@ -28,7 +28,7 @@
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"
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">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
</svg>
@@ -198,12 +198,6 @@ export default {
}
},
props: {
open_id: {
type: String,
}
}
}
</script>
@@ -102,7 +102,7 @@ export default {
name: 'SliderBody',
props: {
slides: {
type: Array,
type: Object,
}
},
data() {
@@ -59,7 +59,7 @@ export default {
},
props: {
blocks: {
type: Array,
type: Object,
required: true,
},
},
@@ -53,7 +53,7 @@ export default {
},
props: {
block: {
type: Array,
type: Object,
},
},
methods: {
@@ -25,7 +25,7 @@ export default {
required: true,
},
items: {
type: Array,
type: Object,
required: true,
},
},
@@ -25,7 +25,7 @@ export default {
required: true,
},
items: {
type: Array,
type: Object,
required: true,
},
},
@@ -40,89 +40,88 @@
import {Link} from "@inertiajs/vue3";
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
import {debounce} from "lodash";
export default {
name: "CategoryFilter",
components: {
BasicIcon,
Link
},
data() {
return {
category_slug: this.category_filter.value || [],
searchTerm: '',
filteredItems: this.categories.data, // Изначально все элементы
}
},
methods: {
filter: debounce(function () {
let url = new URL(window.location.href);
// Создаем массив для хранения всех ключей, которые нужно удалить
const keysToDelete = [];
name: "CategoryFilter",
components: {
BasicIcon,
Link
},
data() {
return {
category_slug: this.category_filter.value || [],
searchTerm: '',
}
},
methods: {
filter: debounce(function () {
let url = new URL(window.location.href);
const keysToDelete = [];
// Перебираем все параметры и добавляем ключи, начинающиеся с 'category', в массив
for (const [key] of url.searchParams) {
if (key.startsWith('category')) {
keysToDelete.push(key);
}
}
// Удаляем все ключи из массива
keysToDelete.forEach(key => url.searchParams.delete(key));
url.searchParams.delete('page');
let newUrl = url.toString();
this.$inertia.visit(newUrl, {
method: 'get',
preserveState: true,
data: {
category: this.category_slug,
},
});
}, 500),
clearFilter() {
let url = new URL(window.location.href);
// Создаем массив для хранения всех ключей, которые нужно удалить
const keysToDelete = [];
for (const [key] of url.searchParams) {
if (key.startsWith('category')) {
keysToDelete.push(key);
}
}
// Перебираем все параметры и добавляем ключи, начинающиеся с 'category', в массив
for (const [key] of url.searchParams) {
if (key.startsWith('category')) {
keysToDelete.push(key);
}
}
// Удаляем все ключи из массива
keysToDelete.forEach(key => url.searchParams.delete(key));
this.category_slug = [];
this.searchTerm = ''; // Сбросить поле поиска
let newUrl = url.toString();
this.$inertia.visit(newUrl, {
method: 'get',
preserveState: true,
});
},
},
computed: {
filteredItems() {
if (!this.searchTerm) {
return this.categories.data; // Возвращаем все элементы, если ничего не введено
}
const term = this.searchTerm.toLowerCase(); // Приводим к нижнему регистру для нечувствительности к регистру
return this.categories.data.filter(item =>
item.title.toLowerCase().includes(term) // Фильтруем по заголовку
);
}
},
props: {
categories: {
type: Object,
},
category_filter: {
type: Object,
},
},
keysToDelete.forEach(key => url.searchParams.delete(key));
url.searchParams.delete('page');
let newUrl = url.toString();
this.$inertia.visit(newUrl, {
method: 'get',
preserveState: true,
data: {
category: this.category_slug,
},
});
}, 500),
clearFilter() {
let url = new URL(window.location.href);
const keysToDelete = [];
for (const [key] of url.searchParams) {
if (key.startsWith('category')) {
keysToDelete.push(key);
}
}
keysToDelete.forEach(key => url.searchParams.delete(key));
this.category_slug = [];
this.searchTerm = '';
let newUrl = url.toString();
this.$inertia.visit(newUrl, {
method: 'get',
preserveState: true,
});
},
},
computed: {
filteredItems() {
if (!this.searchTerm) {
return this.categories.data;
}
const term = this.searchTerm.toLowerCase();
return this.categories.data.filter(item =>
item.title.toLowerCase().includes(term)
);
}
},
props: {
categories: {
type: Object,
required: true // Добавляем required для ясности
},
category_filter: {
type: Object,
default: () => ({ value: [] }) // Добавляем значение по умолчанию
},
}
}
</script>
<style scoped>
</style>
@@ -51,7 +51,6 @@ export default {
return {
tag_slug: this.tag_filter.value || [],
searchTerm: '',
filteredItems: this.tags, // Изначально все элементы
}
},
methods: {
@@ -26,7 +26,8 @@ import {defineAsyncComponent} from "vue";
export default {
name: 'SearchModal',
inheritAttrs: false,
name: 'SearchModal',
props: {
open_id: {
type: String,
@@ -95,7 +95,7 @@ export default {
},
props: {
headerNavs: {
type: Array,
type: Object,
},
},
};
@@ -1,23 +1,23 @@
<template>
<div class="mt-10 flex items-center justify-center">
<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">
<path d="m15 18-6-6 6-6"></path>
</svg>
<span class="sr-only">Previous</span>
</Link>
</a>
<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="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>
<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>
<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>
</svg>
</Link>
</a>
</nav>
</div>
</template>
+44 -21
View File
@@ -1,43 +1,66 @@
import slugify from "slugify";
import process from "@inertiajs/inertia-vue3/.eslintrc.js";
export const helpers = {
data() {
},
methods: {
HAS_ACTIVE_PAGE(section) {
if (!this.$page?.props?.ziggy) return false;
if (section.pages) {
return section.pages.some(page => this.IS_SAME_ROUTE(page.path));
}
if (section.subSections) {
return section.subSections.some(subSection => this.HAS_ACTIVE_PAGE(subSection));
}
return false;
},
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;
}
const currentLocation = this.$page.props.ziggy.location;
const currentUrl = this.$page.props.ziggy.url + '/' + route;
return currentLocation === currentUrl;
},
TEXT_LIMIT(text, symbols) {
if (text.length > symbols) {
let LimitedText
LimitedText = text.substring(0, symbols)
return LimitedText + "..."
try {
const currentUrl = this.$page.props.ziggy.url + '/' + route;
return currentLocation === currentUrl;
} catch {
return false;
}
return text
},
GENERATE_SLUG: function (text) {
return slugify(text, {
lower: true,
strict: true,
locale: 'ru'
});
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, {
lower: true,
strict: true,
locale: 'ru'
});
} catch {
return text.toLowerCase().replace(/\s+/g, '-');
}
},
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\PersonController;
use App\Models\Post;
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\Route;
@@ -25,7 +28,6 @@ Route::middleware('signed')->get('invitation/{invitation}/accept', \App\Livewire
->name('invitation.accept');
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 vue from '@vitejs/plugin-vue';
export default defineConfig({
build: {
manifest: "manifest.json",
@@ -41,7 +42,7 @@ export default defineConfig({
}
},
ssr: {
noExternal: ['lodash', 'bvi', 'preline'],
noExternal: ['lodash', 'bvi', 'preline', 'vue3-yandex-smartcaptcha', 'vuex'],
},
});