Skip to content

Commit

Permalink
Fix date filter wording & improve search feedback
Browse files Browse the repository at this point in the history
- Show loading when actually loading, instead of no content
- Change modified label to `Date` as it applies to a bunch of things.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
  • Loading branch information
nfebe committed Nov 28, 2023
1 parent d1e0352 commit 4944c60
Show file tree
Hide file tree
Showing 125 changed files with 216 additions and 216 deletions.
2 changes: 1 addition & 1 deletion core/css/server.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/css/server.css.map

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions core/src/views/GlobalSearchModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,26 @@
{{ t('core', provider.name) }}
</NcActionButton>
</NcActions>
<NcActions :menu-name="t('core', 'Modified')" :open.sync="dateActionMenuIsOpen">
<NcActions :menu-name="t('core', 'Date')" :open.sync="dateActionMenuIsOpen">
<template #icon>
<CalendarRangeIcon :size="20" />
</template>
<NcActionButton @click="applyQuickDateRange('today')">
<NcActionButton :close-after-click="true" @click="applyQuickDateRange('today')">
{{ t('core', 'Today') }}
</NcActionButton>
<NcActionButton @click="applyQuickDateRange('7days')">
<NcActionButton :close-after-click="true" @click="applyQuickDateRange('7days')">
{{ t('core', 'Last 7 days') }}
</NcActionButton>
<NcActionButton @click="applyQuickDateRange('30days')">
<NcActionButton :close-after-click="true" @click="applyQuickDateRange('30days')">
{{ t('core', 'Last 30 days') }}
</NcActionButton>
<NcActionButton @click="applyQuickDateRange('thisyear')">
<NcActionButton :close-after-click="true" @click="applyQuickDateRange('thisyear')">
{{ t('core', 'This year') }}
</NcActionButton>
<NcActionButton @click="applyQuickDateRange('lastyear')">
<NcActionButton :close-after-click="true" @click="applyQuickDateRange('lastyear')">
{{ t('core', 'Last year') }}
</NcActionButton>
<NcActionButton @click="applyQuickDateRange('custom')">
<NcActionButton :close-after-click="true" @click="applyQuickDateRange('custom')">
{{ t('core', 'Custom date range') }}
</NcActionButton>
</NcActions>
Expand Down Expand Up @@ -136,7 +136,6 @@ import CustomDateRangeModal from '../components/GlobalSearch/CustomDateRangeModa
import DotsHorizontalIcon from 'vue-material-design-icons/DotsHorizontal.vue'
import FilterIcon from 'vue-material-design-icons/Filter.vue'
import FilterChip from '../components/GlobalSearch/SearchFilterChip.vue'
import FlaskEmpty from 'vue-material-design-icons/FlaskEmpty.vue'
import ListBox from 'vue-material-design-icons/ListBox.vue'
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
Expand All @@ -163,7 +162,6 @@ export default {
DotsHorizontalIcon,
FilterIcon,
FilterChip,
FlaskEmpty,
ListBox,
NcActions,
NcActionButton,
Expand Down Expand Up @@ -193,6 +191,7 @@ export default {
dateFilterIsApplied: false,
personFilterIsApplied: false,
filteredProviders: [],
searching: false,
searchQuery: '',
placesFilter: '',
dateTimeFilter: null,
Expand All @@ -217,8 +216,8 @@ export default {
return {
show: isEmptySearch || hasNoResults,
text: isEmptySearch ? t('core', 'Start typing in search') : t('core', 'No matching results'),
icon: isEmptySearch ? MagnifyIcon : FlaskEmpty,
text: this.searching && hasNoResults ? t('core', 'Searching …') : (isEmptySearch ? t('core', 'Start typing in search') : t('core', 'No matching results')),
icon: MagnifyIcon,
}
},
},
Expand All @@ -244,8 +243,10 @@ export default {
},
methods: {
find(query) {
this.searching = true
if (query.length === 0) {
this.results = []
this.searching = false
return
}
if (this.supportFiltering()) {
Expand Down Expand Up @@ -297,6 +298,7 @@ export default {
console.debug('Global search results:', this.results)
this.updateResults(newResults)
this.searching = false
})
}
providersToSearch.forEach(provider => {
Expand Down Expand Up @@ -596,7 +598,7 @@ div.v-popper__wrapper {
align-items: center !important;
img {
width: 24px;
width: 20px;
margin: 0 4px;
filter: var(--background-invert-if-bright);
}
Expand Down
3 changes: 0 additions & 3 deletions dist/2048-2048.js

This file was deleted.

3 changes: 3 additions & 0 deletions dist/2250-2250.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 1 addition & 1 deletion dist/2048-2048.js.map → dist/2250-2250.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/2857-2857.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/2857-2857.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/4107-4107.js

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion dist/6297-6297.js.map → dist/4107-4107.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/4180-4180.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/4180-4180.js.map

This file was deleted.

3 changes: 0 additions & 3 deletions dist/6297-6297.js

This file was deleted.

Loading

0 comments on commit 4944c60

Please sign in to comment.