Кому доступен личный кабинет?
diff --git a/html/landing_ul/home.css b/html/landing_ul/home.css
index 5054754..3541735 100644
--- a/html/landing_ul/home.css
+++ b/html/landing_ul/home.css
@@ -127,6 +127,13 @@ a.btn.disabled {
opacity: 0.5;
cursor: not-allowed;
}
+
+.disabled-link {
+ pointer-events: none;
+ opacity: 0.5;
+ cursor: not-allowed;
+}
+
button:is(:hover, :focus, :active),
a.btn:is(:hover, :focus, :active) {
background: var(--color-link-hover);
@@ -143,6 +150,8 @@ a.btn:is(:hover, :focus, :active) {
background: transparent;
}
+
+
.header {
display: flex;
flex-direction: row;
diff --git a/html/script/access-check.js b/html/script/access-check.js
index 7dbf450..0124a28 100644
--- a/html/script/access-check.js
+++ b/html/script/access-check.js
@@ -63,6 +63,16 @@ function checkCsp(cspTimeout) {
window.addEventListener('DOMContentLoaded', () => {
const browserCheckInfo = document.getElementById('browser-check-info');
const loginButton = document.getElementById('login-button');
+ const loginLink = document.getElementById('login-link');
+
+ const disableLogin = () => {
+ if (loginButton && loginLink) {
+ loginButton.href = '';
+ loginLink.href = '';
+ loginButton.classList.add('disabled');
+ loginLink.classList.add('disabled-link');
+ }
+ };
const browserPassed = checkBrowser();
@@ -74,15 +84,11 @@ window.addEventListener('DOMContentLoaded', () => {
}
} else {
if (loginButton) {
- loginButton.classList.add('disabled');
- loginButton.addEventListener('click', (e) => e.preventDefault());
+ disableLogin();
}
}
});
} else {
- if (loginButton) {
- loginButton.classList.add('disabled');
- loginButton.addEventListener('click', (e) => e.preventDefault());
- }
+ disableLogin();
}
});
\ No newline at end of file