Simplify role switcher: text + single swap icon
All checks were successful
Build Docker Image / build (push) Successful in 4m23s
All checks were successful
Build Docker Image / build (push) Successful in 4m23s
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
>
|
>
|
||||||
{{ $t('catalog.modes.quote') }}
|
{{ $t('catalog.modes.quote') }}
|
||||||
</button>
|
</button>
|
||||||
<!-- Role switcher: Я клиент <> -->
|
<!-- Role switcher: Я клиент 🔄 -->
|
||||||
<div v-if="loggedIn" class="flex items-center">
|
<div v-if="loggedIn" class="flex items-center">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="localePath(currentRole === 'SELLER' ? '/clientarea/offers' : '/clientarea/orders')"
|
:to="localePath(currentRole === 'SELLER' ? '/clientarea/offers' : '/clientarea/orders')"
|
||||||
@@ -44,23 +44,15 @@
|
|||||||
{{ currentRole === 'SELLER' ? $t('cabinetNav.roles.seller') : $t('cabinetNav.roles.client') }}
|
{{ currentRole === 'SELLER' ? $t('cabinetNav.roles.seller') : $t('cabinetNav.roles.client') }}
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
|
||||||
<!-- Стрелки <> справа (если есть обе роли) -->
|
<!-- Иконка swap (если есть обе роли) -->
|
||||||
<div v-if="hasMultipleRoles" class="flex items-center ml-1">
|
<button
|
||||||
<button
|
v-if="hasMultipleRoles"
|
||||||
class="p-0.5 transition-colors"
|
class="p-1 ml-0.5 transition-colors"
|
||||||
:class="useWhiteText ? 'text-white/50 hover:text-white' : 'text-base-content/50 hover:text-base-content'"
|
:class="useWhiteText ? 'text-white/50 hover:text-white' : 'text-base-content/50 hover:text-base-content'"
|
||||||
@click="$emit('switch-role', currentRole === 'BUYER' ? 'SELLER' : 'BUYER')"
|
@click="$emit('switch-role', currentRole === 'BUYER' ? 'SELLER' : 'BUYER')"
|
||||||
>
|
>
|
||||||
<Icon name="lucide:chevron-left" size="14" />
|
<Icon name="lucide:arrow-left-right" size="14" />
|
||||||
</button>
|
</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>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user