refactor(ui): popovers

This commit is contained in:
Liyas Thomas
2021-07-05 16:52:15 +00:00
committed by GitHub
parent 256d4b3e07
commit ed91486d53
42 changed files with 828 additions and 866 deletions

View File

@@ -31,39 +31,46 @@
icon="topic"
@click.native="$emit('select-collection')"
/>
<tippy tabindex="-1" trigger="click" theme="popover" arrow>
<tippy
ref="options"
tabindex="-1"
trigger="click"
theme="popover"
arrow
>
<template #trigger>
<ButtonSecondary
<TabPrimary
v-tippy="{ theme: 'tooltip' }"
:title="$t('more')"
icon="more_vert"
/>
</template>
<div>
<ButtonSecondary
icon="create_new_folder"
:label="$t('new_folder')"
@click.native="
$emit('add-folder', {
path: `${collectionIndex}`,
})
"
/>
</div>
<div>
<ButtonSecondary
icon="create"
label="$t('edit')"
@click.native="$emit('edit-collection')"
/>
</div>
<div>
<ButtonSecondary
icon="delete"
:label="$t('delete')"
@click.native="confirmRemove = true"
/>
</div>
<SmartItem
icon="create_new_folder"
:label="$t('new_folder')"
@click.native="
$emit('add-folder', {
path: `${collectionIndex}`,
})
$refs.options.tippy().hide()
"
/>
<SmartItem
icon="create"
:label="$t('edit')"
@click.native="
$emit('edit-collection')
$refs.options.tippy().hide()
"
/>
<SmartItem
icon="delete"
:label="$t('delete')"
@click.native="
confirmRemove = true
$refs.options.tippy().hide()
"
/>
</tippy>
</div>
</div>