Skip to content

Commit

Permalink
Merge pull request #10158 from nextcloud/fix/search-button-focus
Browse files Browse the repository at this point in the history
fix: open search buttons on focus and fix the wraping
  • Loading branch information
st3iny authored Oct 30, 2024
2 parents 15b9cba + b469ce3 commit 6b62030
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 @@ -267,6 +268,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 @@ -276,6 +278,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 @@ -284,6 +287,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 @@ -455,8 +459,10 @@ export default {
},
},
methods: {
toggleButtons() {
this.showButtons = !this.showButtons
hideButtonsWithDelay() {
setTimeout(() => {
this.showButtons = false
}, 100)
},
toggleGetAttachments() {
if (this.hasAttachmentActive) {
Expand Down Expand Up @@ -790,7 +796,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 6b62030

Please sign in to comment.