chore: Clean up

This commit is contained in:
iamsivin
2024-11-12 22:02:26 +05:30
parent 42a9e8dc82
commit 909755c340
7 changed files with 54 additions and 17 deletions
@@ -77,7 +77,7 @@ const handleInputUpdate = async () => {
<template>
<div
class="flex items-center w-full gap-2"
class="flex items-center w-full min-w-0 gap-2"
:class="{
'justify-start': isEditingView,
'justify-end': !isEditingView,
@@ -85,11 +85,11 @@ const handleInputUpdate = async () => {
>
<span
v-if="!isEditingValue"
class="text-sm"
class="min-w-0 text-sm"
:class="{
'cursor-pointer text-n-slate-11 hover:text-n-slate-12 py-2 select-none font-medium':
!isEditingView,
'text-n-slate-12': isEditingView,
'text-n-slate-12 truncate flex-1': isEditingView,
}"
@click="toggleEditValue(!isEditingView)"
>
@@ -42,7 +42,7 @@ const handleAttributeAction = async action => {
<template>
<div
class="flex items-center w-full gap-2"
class="flex items-center w-full min-w-0 gap-2"
:class="{
'justify-start': isEditingView,
'justify-end': !isEditingView,
@@ -53,11 +53,11 @@ const handleAttributeAction = async action => {
class="relative flex items-center"
>
<span
class="text-sm"
class="min-w-0 text-sm"
:class="{
'cursor-pointer text-n-slate-11 hover:text-n-slate-12 py-2 select-none font-medium':
!isEditingView,
'text-n-slate-12': isEditingView,
'text-n-slate-12 truncate flex-1': isEditingView,
}"
@click="toggleAttributeListDropdown(!props.isEditingView)"
>
@@ -115,7 +115,7 @@ const handleInputUpdate = async () => {
<template>
<div
class="flex items-center w-full gap-2"
class="flex items-center w-full min-w-0 gap-2"
:class="{
'justify-start': isEditingView,
'justify-end': !isEditingView,
@@ -123,17 +123,33 @@ const handleInputUpdate = async () => {
>
<span
v-if="!isEditingValue"
class="text-sm"
class="min-w-0 text-sm"
:class="{
'cursor-pointer text-n-slate-11 hover:text-n-slate-12 py-2 select-none font-medium':
!isEditingView,
'text-n-slate-12': isEditingView,
'text-n-slate-12 truncate flex-1':
isEditingView && !isAttributeTypeLink,
'truncate flex-1 hover:text-n-brand text-n-blue-text':
isEditingView && isAttributeTypeLink,
}"
@click="toggleEditValue(!isEditingView)"
>
{{
attribute.value || t('CONTACTS_LAYOUT.SIDEBAR.ATTRIBUTES.TRIGGER.INPUT')
}}
<a
v-if="isAttributeTypeLink && attribute.value"
:href="attribute.value"
target="_blank"
rel="noopener noreferrer"
class="hover:underline"
@click.stop
>
{{ attribute.value }}
</a>
<template v-else>
{{
attribute.value ||
t('CONTACTS_LAYOUT.SIDEBAR.ATTRIBUTES.TRIGGER.INPUT')
}}
</template>
</span>
<div