TRI-293: add custom and mover handler + mover page poster

This commit is contained in:
2024-12-21 22:24:15 +03:00
parent 6044b302bb
commit b867ab7d02
15 changed files with 607 additions and 102 deletions

View File

@@ -52,13 +52,19 @@ function select_tab_profile (el,url,owner_type=null, check_orders_required) {
let confirm_url_f_lang_ru = ''
let confirm_url_f_lang_en = ''
if (owner_type){
window.history.pushState(null, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}`)
window.history.pushState({ prevUrl: window.location.href }, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}`)
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
if(!window.history.state.prevUrl.match(/create/)) {
window.location.reload()
}
} else {
window.history.pushState(null, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/`)
window.history.pushState({ prevUrl: window.location.href }, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/`)
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(url)}/`
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(url)}/`
if(window.history.state.prevUrl.match(/create/)) {
window.location.reload()
}
}
document.querySelector("#ru_lang").href = confirm_url_f_lang_ru
document.querySelector("#en_lang").href = confirm_url_f_lang_en