Skip to content

Commit 7706303

Browse files
feat(files-list): restructure header with primary RequestPicker and breadcrumb dropdown menu
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 8913a71 commit 7706303

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

src/views/FilesList/FilesList.vue

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,40 @@
55
<template>
66
<NcAppContent :page-heading="t('libresign', 'Files')">
77
<div class="files-list__header">
8+
<!-- Request picker -->
9+
<RequestPicker variant="primary" />
10+
11+
<!-- Current folder breadcrumbs -->
812
<NcBreadcrumbs class="files-list__breadcrumbs">
913
<NcBreadcrumb :name="t('libresign', 'Files')"
1014
:title="t('libresign', 'Files')"
1115
:force-icon-text="true"
1216
:to="{ name: 'fileslist' }"
1317
:aria-description="t('libresign', 'Files')"
1418
:disable-drop="true"
15-
@click="refresh()">
19+
force-menu
20+
v-model:open="isMenuOpen">
1621
<template #icon>
1722
<NcIconSvgWrapper :size="20"
1823
:svg="viewIcon" />
1924
</template>
25+
<template #menu-icon>
26+
<NcIconSvgWrapper :path="isMenuOpen ? mdiChevronUp : mdiChevronDown" />
27+
</template>
28+
<!-- Reload button -->
29+
<NcActionButton close-after-click @click="refresh()">
30+
<template #icon>
31+
<NcIconSvgWrapper :path="mdiReload" />
32+
</template>
33+
<!-- TRANSLATORS Button inside the breadcrumb dropdown menu that reloads the file list -->
34+
{{ t('libresign', 'Reload content') }}
35+
</NcActionButton>
2036
</NcBreadcrumb>
21-
<template #actions>
22-
<RequestPicker />
23-
</template>
2437
</NcBreadcrumbs>
2538

26-
<NcLoadingIcon v-if="isRefreshing" class="files-list__refresh-icon" />
39+
<NcLoadingIcon v-if="isRefreshing"
40+
class="files-list__refresh-icon"
41+
:name="t('libresign', 'File list is reloading')" />
2742

2843
<NcButton :aria-label="gridViewButtonLabel"
2944
:title="gridViewButtonLabel"
@@ -75,11 +90,15 @@ import { t } from '@nextcloud/l10n'
7590
7691
import HomeSvg from '@mdi/svg/svg/home.svg?raw'
7792
import {
93+
mdiChevronDown,
94+
mdiChevronUp,
7895
mdiFolder,
96+
mdiReload,
7997
mdiViewGrid,
8098
mdiViewList,
8199
} from '@mdi/js'
82100
101+
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
83102
import NcAppContent from '@nextcloud/vue/components/NcAppContent'
84103
import NcBreadcrumb from '@nextcloud/vue/components/NcBreadcrumb'
85104
import NcBreadcrumbs from '@nextcloud/vue/components/NcBreadcrumbs'
@@ -99,6 +118,7 @@ import { useSidebarStore } from '../../store/sidebar.js'
99118
export default {
100119
name: 'FilesList',
101120
components: {
121+
NcActionButton,
102122
NcAppContent,
103123
NcButton,
104124
NcBreadcrumb,
@@ -119,13 +139,17 @@ export default {
119139
filtersStore,
120140
userConfigStore,
121141
sidebarStore,
142+
mdiChevronDown,
143+
mdiChevronUp,
122144
mdiFolder,
145+
mdiReload,
123146
mdiViewGrid,
124147
mdiViewList,
125148
}
126149
},
127150
data() {
128151
return {
152+
isMenuOpen: false,
129153
loading: true,
130154
dirContentsFiltered: [],
131155
}

0 commit comments

Comments
 (0)