quick actions improvements

This commit is contained in:
Henry Jameson 2025-01-26 22:51:11 +02:00
commit cafa8da357
3 changed files with 13 additions and 13 deletions

View file

@ -2,9 +2,7 @@
/* stylelint-disable declaration-no-important */ /* stylelint-disable declaration-no-important */
.quick-action { .quick-action {
display: grid; display: flex;
grid-template-columns: minmax(max-content, 1fr);
grid-gap: 0.25em;
align-items: center; align-items: center;
height: 1.5em; height: 1.5em;
@ -12,6 +10,7 @@
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
margin-left: 1em;
} }
.action-button-inner, .action-button-inner,
@ -25,6 +24,7 @@
align-self: stretch; align-self: stretch;
width: 1px; width: 1px;
background-color: var(--icon); background-color: var(--icon);
margin-left: 1em;
margin-right: 0.5em; margin-right: 0.5em;
} }
@ -44,7 +44,7 @@
.action-button-inner { .action-button-inner {
display: grid; display: grid;
grid-gap: 1em; grid-gap: 1em;
grid-template-columns: max-content 1fr; grid-template-columns: max-content;
grid-auto-flow: column; grid-auto-flow: column;
grid-auto-columns: max-content; grid-auto-columns: max-content;
align-items: center; align-items: center;

View file

@ -50,12 +50,6 @@
> >
{{ $t(button.label(funcArg)) }} {{ $t(button.label(funcArg)) }}
</span> </span>
<span
v-if="!extra && button.counter?.(funcArg) > 0"
class="action-counter"
>
{{ button.counter?.(funcArg) }}
</span>
<FAIcon <FAIcon
v-if="button.dropdown?.()" v-if="button.dropdown?.()"
class="chevron-icon" class="chevron-icon"
@ -64,15 +58,21 @@
fixed-width fixed-width
/> />
</component> </component>
<span
v-if="!extra && button.counter?.(funcArg) > 0"
class="action-counter"
>
{{ button.counter?.(funcArg) }}
</span>
<span <span
v-if="!extra && button.name === 'bookmark'" v-if="!extra && button.name === 'bookmark'"
class="separator" class="separator"
/> />
<Popover <Popover
v-if="button.name === 'bookmark'" v-if="button.name === 'bookmark'"
trigger="hover" :trigger="extra ? 'hover' : 'click'"
:placement="extra ? 'right' : 'top'" :placement="extra ? 'right' : 'top'"
:offset="{ y: 5 }" :offset="extra ? { x: 10 } : { y: 10 }"
:trigger-attrs="{ class: 'extra-button' }" :trigger-attrs="{ class: 'extra-button' }"
> >
<template #trigger> <template #trigger>

View file

@ -2,7 +2,7 @@
<div> <div>
<Popover <Popover
v-if="button.dropdown?.()" v-if="button.dropdown?.()"
trigger="hover" trigger="click"
:offset="{ y: 5 }" :offset="{ y: 5 }"
:placement="$attrs.extra ? 'right' : 'top'" :placement="$attrs.extra ? 'right' : 'top'"
> >