Merge pull request #689 from shariquerik/double-action
fix: button inside tooltip is triggered twice
This commit is contained in:
commit
b13d099820
@ -43,25 +43,29 @@
|
||||
attachment.is_private ? __('Make public') : __('Make private')
|
||||
"
|
||||
>
|
||||
<Button
|
||||
class="!size-5"
|
||||
@click.stop="
|
||||
togglePrivate(attachment.name, attachment.is_private)
|
||||
"
|
||||
>
|
||||
<FeatherIcon
|
||||
:name="attachment.is_private ? 'lock' : 'unlock'"
|
||||
class="size-3 text-ink-gray-7"
|
||||
/>
|
||||
</Button>
|
||||
<div>
|
||||
<Button
|
||||
class="!size-5"
|
||||
@click.stop="
|
||||
togglePrivate(attachment.name, attachment.is_private)
|
||||
"
|
||||
>
|
||||
<FeatherIcon
|
||||
:name="attachment.is_private ? 'lock' : 'unlock'"
|
||||
class="size-3 text-ink-gray-7"
|
||||
/>
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Delete attachment')">
|
||||
<Button
|
||||
class="!size-5"
|
||||
@click.stop="() => deleteAttachment(attachment.name)"
|
||||
>
|
||||
<FeatherIcon name="trash-2" class="size-3 text-ink-gray-7" />
|
||||
</Button>
|
||||
<div>
|
||||
<Button
|
||||
class="!size-5"
|
||||
@click.stop="() => deleteAttachment(attachment.name)"
|
||||
>
|
||||
<FeatherIcon name="trash-2" class="size-3 text-ink-gray-7" />
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -42,9 +42,11 @@
|
||||
@click.stop
|
||||
>
|
||||
<Tooltip :text="__('Change Status')">
|
||||
<Button variant="ghosted" class="hover:bg-surface-gray-4">
|
||||
<TaskStatusIcon :status="task.status" />
|
||||
</Button>
|
||||
<div>
|
||||
<Button variant="ghosted" class="hover:bg-surface-gray-4">
|
||||
<TaskStatusIcon :status="task.status" />
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</Dropdown>
|
||||
<Dropdown
|
||||
|
||||
@ -52,22 +52,21 @@
|
||||
v-for="assignee in assignees"
|
||||
:key="assignee.name"
|
||||
>
|
||||
<Button
|
||||
:label="getUser(assignee.name).full_name"
|
||||
theme="gray"
|
||||
>
|
||||
<template #prefix>
|
||||
<UserAvatar :user="assignee.name" size="sm" />
|
||||
</template>
|
||||
<template #suffix>
|
||||
<FeatherIcon
|
||||
v-if="assignee.name !== owner"
|
||||
class="h-3.5"
|
||||
name="x"
|
||||
@click.stop="removeValue(assignee.name)"
|
||||
/>
|
||||
</template>
|
||||
</Button>
|
||||
<div>
|
||||
<Button :label="getUser(assignee.name).full_name" theme="gray">
|
||||
<template #prefix>
|
||||
<UserAvatar :user="assignee.name" size="sm" />
|
||||
</template>
|
||||
<template #suffix>
|
||||
<FeatherIcon
|
||||
v-if="assignee.name !== owner"
|
||||
class="h-3.5"
|
||||
name="x"
|
||||
@click.stop="removeValue(assignee.name)"
|
||||
/>
|
||||
</template>
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<ErrorMessage class="mt-2" v-if="error" :message="__(error)" />
|
||||
|
||||
@ -51,15 +51,17 @@
|
||||
</div>
|
||||
<div>
|
||||
<Tooltip text="Delete Invitation">
|
||||
<Button
|
||||
icon="x"
|
||||
variant="ghost"
|
||||
:loading="
|
||||
pendingInvitations.delete.loading &&
|
||||
pendingInvitations.delete.params.name === user.name
|
||||
"
|
||||
@click="pendingInvitations.delete.submit(user.name)"
|
||||
/>
|
||||
<div>
|
||||
<Button
|
||||
icon="x"
|
||||
variant="ghost"
|
||||
:loading="
|
||||
pendingInvitations.delete.loading &&
|
||||
pendingInvitations.delete.params.name === user.name
|
||||
"
|
||||
@click="pendingInvitations.delete.submit(user.name)"
|
||||
/>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@ -2,11 +2,22 @@
|
||||
<div class="flex items-center">
|
||||
<router-link
|
||||
:to="{ name: routeName }"
|
||||
class="px-0.5 py-1 text-lg font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-3 text-ink-gray-5 hover:text-ink-gray-7"
|
||||
class="px-0.5 py-1 text-lg font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-3"
|
||||
:class="[
|
||||
viewControls
|
||||
? 'text-ink-gray-5 hover:text-ink-gray-7'
|
||||
: 'text-ink-gray-7',
|
||||
]"
|
||||
>
|
||||
{{ __(routeName) }}
|
||||
</router-link>
|
||||
<span class="mx-0.5 text-base text-ink-gray-4" aria-hidden="true"> / </span>
|
||||
<span
|
||||
v-if="viewControls"
|
||||
class="mx-0.5 text-base text-ink-gray-4"
|
||||
aria-hidden="true"
|
||||
>
|
||||
/
|
||||
</span>
|
||||
<Dropdown v-if="viewControls" :options="viewControls.viewsDropdownOptions">
|
||||
<template #default="{ open }">
|
||||
<Button
|
||||
|
||||
@ -75,38 +75,46 @@
|
||||
</Tooltip>
|
||||
<div class="flex gap-1.5">
|
||||
<Tooltip v-if="callEnabled" :text="__('Make a call')">
|
||||
<Button class="h-7 w-7" @click="triggerCall">
|
||||
<PhoneIcon class="h-4 w-4" />
|
||||
</Button>
|
||||
<div>
|
||||
<Button class="h-7 w-7" @click="triggerCall">
|
||||
<PhoneIcon class="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Send an email')">
|
||||
<Button class="h-7 w-7">
|
||||
<Email2Icon
|
||||
class="h-4 w-4"
|
||||
@click="
|
||||
deal.data.email
|
||||
? openEmailBox()
|
||||
: errorMessage(__('No email set'))
|
||||
"
|
||||
/>
|
||||
</Button>
|
||||
<div>
|
||||
<Button class="h-7 w-7">
|
||||
<Email2Icon
|
||||
class="h-4 w-4"
|
||||
@click="
|
||||
deal.data.email
|
||||
? openEmailBox()
|
||||
: errorMessage(__('No email set'))
|
||||
"
|
||||
/>
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Go to website')">
|
||||
<Button class="h-7 w-7">
|
||||
<LinkIcon
|
||||
class="h-4 w-4"
|
||||
@click="
|
||||
deal.data.website
|
||||
? openWebsite(deal.data.website)
|
||||
: errorMessage(__('No website set'))
|
||||
"
|
||||
/>
|
||||
</Button>
|
||||
<div>
|
||||
<Button class="h-7 w-7">
|
||||
<LinkIcon
|
||||
class="h-4 w-4"
|
||||
@click="
|
||||
deal.data.website
|
||||
? openWebsite(deal.data.website)
|
||||
: errorMessage(__('No website set'))
|
||||
"
|
||||
/>
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Attach a file')">
|
||||
<Button class="size-7" @click="showFilesUploader = true">
|
||||
<AttachmentIcon class="size-4" />
|
||||
</Button>
|
||||
<div>
|
||||
<Button class="size-7" @click="showFilesUploader = true">
|
||||
<AttachmentIcon class="size-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -117,46 +117,54 @@
|
||||
</Tooltip>
|
||||
<div class="flex gap-1.5">
|
||||
<Tooltip v-if="callEnabled" :text="__('Make a call')">
|
||||
<Button
|
||||
class="h-7 w-7"
|
||||
@click="
|
||||
() =>
|
||||
lead.data.mobile_no
|
||||
? makeCall(lead.data.mobile_no)
|
||||
: errorMessage(__('No phone number set'))
|
||||
"
|
||||
>
|
||||
<PhoneIcon class="h-4 w-4" />
|
||||
</Button>
|
||||
<div>
|
||||
<Button
|
||||
class="h-7 w-7"
|
||||
@click="
|
||||
() =>
|
||||
lead.data.mobile_no
|
||||
? makeCall(lead.data.mobile_no)
|
||||
: errorMessage(__('No phone number set'))
|
||||
"
|
||||
>
|
||||
<PhoneIcon class="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Send an email')">
|
||||
<Button class="h-7 w-7">
|
||||
<Email2Icon
|
||||
class="h-4 w-4"
|
||||
@click="
|
||||
lead.data.email
|
||||
? openEmailBox()
|
||||
: errorMessage(__('No email set'))
|
||||
"
|
||||
/>
|
||||
</Button>
|
||||
<div>
|
||||
<Button class="h-7 w-7">
|
||||
<Email2Icon
|
||||
class="h-4 w-4"
|
||||
@click="
|
||||
lead.data.email
|
||||
? openEmailBox()
|
||||
: errorMessage(__('No email set'))
|
||||
"
|
||||
/>
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Go to website')">
|
||||
<Button class="h-7 w-7">
|
||||
<LinkIcon
|
||||
class="h-4 w-4"
|
||||
@click="
|
||||
lead.data.website
|
||||
? openWebsite(lead.data.website)
|
||||
: errorMessage(__('No website set'))
|
||||
"
|
||||
/>
|
||||
</Button>
|
||||
<div>
|
||||
<Button class="h-7 w-7">
|
||||
<LinkIcon
|
||||
class="h-4 w-4"
|
||||
@click="
|
||||
lead.data.website
|
||||
? openWebsite(lead.data.website)
|
||||
: errorMessage(__('No website set'))
|
||||
"
|
||||
/>
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Attach a file')">
|
||||
<Button class="h-7 w-7" @click="showFilesUploader = true">
|
||||
<AttachmentIcon class="h-4 w-4" />
|
||||
</Button>
|
||||
<div>
|
||||
<Button class="h-7 w-7" @click="showFilesUploader = true">
|
||||
<AttachmentIcon class="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<ErrorMessage :message="__(error)" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user