Правки по сервисам, функция WIP для разделов

This commit is contained in:
Александр Анисин
2026-05-13 08:53:26 +03:00
parent 41a80cee19
commit 8b20ed8654
7 changed files with 88 additions and 56 deletions
@@ -44,8 +44,21 @@ watch(
<slot name="sidebar-nav-before" />
<div v-for="item in sidebarGroups" :key="item.text" class="group">
<VPSidebarItem :item="item" :depth="0" />
<div v-for="group in sidebarGroups" :key="group.text ?? ''" class="group">
<!-- Named group with collapsible items render via VPSidebarItem as-is -->
<template v-if="group.items && group.text">
<VPSidebarItem :item="group" :depth="0" />
</template>
<!-- Anonymous group (flat sidebar) render items one by one to handle WIP -->
<template v-else-if="group.items">
<template v-for="item in group.items" :key="item.text">
<div v-if="(item as any).wip" class="wip-item" data-tooltip="Раздел в разработке">
<span class="text">{{ item.text }}</span>
</div>
<VPSidebarItem v-else :item="item" :depth="0" />
</template>
</template>
<VPSidebarItem v-else :item="group" :depth="0" />
</div>
<slot name="sidebar-nav-after" />
@@ -109,6 +109,47 @@
padding-bottom: 0px !important;
}
.wip-item {
position: relative;
padding: 12px 32px;
cursor: default;
user-select: none;
.text {
color: rgba(25, 28, 52, 0.28) !important;
font-size: 15px;
font-weight: 400;
line-height: 18px;
letter-spacing: 0.2px;
}
&::after {
content: attr(data-tooltip);
position: absolute;
left: 32px;
top: calc(100% + 4px);
z-index: 100;
padding: 6px 10px;
border-radius: 6px;
background-color: rgba(9, 11, 22, 0.82);
color: #fff;
font-size: 13px;
line-height: 18px;
white-space: nowrap;
pointer-events: none;
opacity: 0;
transition: opacity 0s;
}
&:hover::after {
opacity: 1;
}
}
.dark .wip-item .text {
color: rgba(255, 255, 255, 0.22) !important;
}
.VPLocalNav.has-sidebar {
@include media.max(sm) {
padding-left: 0px;