0.0.49 w route card

This commit is contained in:
SBD
2025-01-20 23:40:34 +03:00
parent db135af725
commit a8335f10ee
6 changed files with 60 additions and 9 deletions

View File

@@ -168,6 +168,11 @@
}
}
.from_to_place_data{
&:has(.arrival_to){
.place{justify-content: right}
} &:has(.departure_from){
.place{justify-content: left}
}
.label{
color: #27242499;
font-size: var(--big-font-size);

0
static/v2/js/twb.js Normal file
View File

View File

@@ -60,6 +60,26 @@ function raiseRoute(el) {
data_type: 'json',
success: (res) => {
window.scrollTo(0, 0);
let $parent_list = $parent.closest('.b_my_routes').children
$($parent).insertBefore($($parent_list[0]))
if ($parent.dataset.owner_type === 'mover'){
$($parent).css('--route-card-box_shadow', '0 -1px 10px rgb(62 205 5 / 36%), -1px 4px 10px rgba(198, 199, 203, 0.2)')
} else {
$($parent).css('--route-card-box_shadow', '0 -1px 10px rgb(5 74 205 / 36%), -1px 4px 10px rgba(198, 199, 203, 0.2)')
}
let timeout = setTimeout(() =>{
$($parent).css('--route-card-box_shadow', '0 -1px 10px rgba(198, 199, 203, 0.2), -1px 4px 10px rgba(198, 199, 203, 0.2)');
clearTimeout(timeout);
}, 1000)
$('.route_btn[data-action="raise"]').each((i, el) => {
el.dataset.actions_count = res.remains_route_rising_count;
el.querySelector('.route_btn_data').innerHTML = el.querySelector('.route_btn_data').innerHTML.split(':')[0] + `: ${res.remains_route_rising_count}`;
})
}, error: (res) => {
}