This commit is contained in:
2023-11-11 14:14:27 +03:00
parent 7cb8a2de39
commit 5856fbb670

View File

@@ -75,10 +75,12 @@ function select_tab_profile (el,url,owner_type=null) {
function getInfoAboutUser (){ function getInfoAboutUser (){
let user_type = '' let user_type = ''
if (screen.width < 1024){ if (screen.width <= 700){
user_type = 'mobile' user_type = 'mobile'
} else { } else if (screen.width > 1024) {
user_type = 'dectop' user_type = 'dectop'
} else if (screen.width > 700 && screen.width < 1024) {
user_type = 'laptop'
} }
return user_type return user_type
} }
@@ -720,12 +722,23 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
handler_text.innerHTML = curtain_name handler_text.innerHTML = curtain_name
curtain.classList.remove("open") curtain.classList.remove("open")
curtain.classList.add("close") curtain.classList.add("close")
let user_type = getInfoAboutUser()
if (user_type === 'mobile') {
curtain.classList.remove("open")
curtain.classList.add("close")
closeOverlay() closeOverlay()
} else { } else {
if (!window.location.href.includes('profile')){
//
}
}
} else {
curtain.classList.toggle("close") let user_type = getInfoAboutUser()
if (user_type === 'mobile') {
curtain.classList.toggle("open") curtain.classList.toggle("open")
curtain.classList.toggle("close")
newCurtainZIndex() newCurtainZIndex()
let curtain_check = getOpenCurtain() let curtain_check = getOpenCurtain()
if (curtain_check.length > 1){ if (curtain_check.length > 1){
@@ -745,6 +758,13 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
closeOverlay() closeOverlay()
} }
} else {
if (!window.location.href.includes('profile')){
//
}
}
let handler_text = curtain.querySelector('.text_f_curtain') let handler_text = curtain.querySelector('.text_f_curtain')
if (curtain.classList.contains('open')){ if (curtain.classList.contains('open')){
handler_text.innerHTML = 'Закрыть' handler_text.innerHTML = 'Закрыть'