Skip to content

Commit

Permalink
fix: open search buttons on focus and fix the wraping
Browse files Browse the repository at this point in the history
Signed-off-by: greta <[email protected]>
  • Loading branch information
GretaD committed Sep 16, 2024
1 parent a8ce912 commit b469ce3
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/components/SearchMessages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
class="search-messages--input"
:placeholder="t('mail', 'Search in mailbox')"
:aria-label="t('mail', 'Search in mailbox')"
@click="toggleButtons">
@focus="showButtons = true"
@blur="hideButtonsWithDelay">
<NcButton type="tertiary" class="search-messages--filter" @click="moreSearchActions = true">
<template #icon>
<FilterVariantIcon :size="20" />
Expand Down Expand Up @@ -262,6 +263,7 @@
<NcButton type="secondary"
class="shortcut"
:aria-label="t('mail', 'Has attachment')"
:title="t('mail', 'Has attachment')"
:pressed="hasAttachmentActive"
@update:pressed="hasAttachmentActive = !hasAttachmentActive"
@click="toggleGetAttachments">
Expand All @@ -271,6 +273,7 @@
class="shortcut"
:pressed="hasLast7daysActive"
:aria-label="t('mail', 'Last 7 days')"
:title="t('mail', 'Last 7 days')"
@update:pressed="hasLast7daysActive = !hasLast7daysActive"
@click="toggleLastWeekFilter">
{{ t('mail', 'Last 7 days') }}
Expand All @@ -279,6 +282,7 @@
class="shortcut"
:pressed="hasFromMeActive"
:aria-label="t('mail', 'From me')"
:title="t('mail', 'From me')"
@update:pressed="hasFromMeActive = !hasFromMeActive"
@click="toggleCurrentUser">
{{ t('mail', 'From me') }}
Expand Down Expand Up @@ -448,8 +452,10 @@ export default {
},
},
methods: {
toggleButtons() {
this.showButtons = !this.showButtons
hideButtonsWithDelay() {
setTimeout(() => {
this.showButtons = false
}, 100)
},
toggleGetAttachments() {
if (this.hasAttachmentActive) {
Expand Down Expand Up @@ -772,7 +778,10 @@ export default {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
flex-wrap: nowrap;
gap: 4px;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 5px 5px 5px;
}
</style>

0 comments on commit b469ce3

Please sign in to comment.