Simplify role switcher: text + single swap icon
All checks were successful
Build Docker Image / build (push) Successful in 4m23s

This commit is contained in:
Ruslan Bakiev
2026-01-29 16:01:46 +07:00
parent 72f2e1c39d
commit bc037e85a4

View File

@@ -32,7 +32,7 @@
>
{{ $t('catalog.modes.quote') }}
</button>
<!-- Role switcher: Я клиент <> -->
<!-- Role switcher: Я клиент 🔄 -->
<div v-if="loggedIn" class="flex items-center">
<NuxtLink
:to="localePath(currentRole === 'SELLER' ? '/clientarea/offers' : '/clientarea/orders')"
@@ -44,23 +44,15 @@
{{ currentRole === 'SELLER' ? $t('cabinetNav.roles.seller') : $t('cabinetNav.roles.client') }}
</NuxtLink>
<!-- Стрелки <> справа (если есть обе роли) -->
<div v-if="hasMultipleRoles" class="flex items-center ml-1">
<button
class="p-0.5 transition-colors"
:class="useWhiteText ? 'text-white/50 hover:text-white' : 'text-base-content/50 hover:text-base-content'"
@click="$emit('switch-role', currentRole === 'BUYER' ? 'SELLER' : 'BUYER')"
>
<Icon name="lucide:chevron-left" size="14" />
</button>
<button
class="p-0.5 transition-colors"
:class="useWhiteText ? 'text-white/50 hover:text-white' : 'text-base-content/50 hover:text-base-content'"
@click="$emit('switch-role', currentRole === 'BUYER' ? 'SELLER' : 'BUYER')"
>
<Icon name="lucide:chevron-right" size="14" />
</button>
</div>
<!-- Иконка swap (если есть обе роли) -->
<button
v-if="hasMultipleRoles"
class="p-1 ml-0.5 transition-colors"
:class="useWhiteText ? 'text-white/50 hover:text-white' : 'text-base-content/50 hover:text-base-content'"
@click="$emit('switch-role', currentRole === 'BUYER' ? 'SELLER' : 'BUYER')"
>
<Icon name="lucide:arrow-left-right" size="14" />
</button>
</div>
</nav>
</div>