Skip to content

Commit 1e85cf0

Browse files
feat(files-list): restructure header with primary RequestPicker and breadcrumb dropdown menu
Signed-off-by: Vitor Mattos <[email protected]>
1 parent a5a6250 commit 1e85cf0

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,10 +90,14 @@ 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
} from '@mdi/js'
8199
100+
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
82101
import NcAppContent from '@nextcloud/vue/components/NcAppContent'
83102
import NcBreadcrumb from '@nextcloud/vue/components/NcBreadcrumb'
84103
import NcBreadcrumbs from '@nextcloud/vue/components/NcBreadcrumbs'
@@ -98,6 +117,7 @@ import { useSidebarStore } from '../../store/sidebar.js'
98117
export default {
99118
name: 'FilesList',
100119
components: {
120+
NcActionButton,
101121
NcAppContent,
102122
NcButton,
103123
NcBreadcrumb,
@@ -118,12 +138,16 @@ export default {
118138
filtersStore,
119139
userConfigStore,
120140
sidebarStore,
141+
mdiChevronDown,
142+
mdiChevronUp,
121143
mdiFolder,
144+
mdiReload,
122145
mdiViewGrid,
123146
}
124147
},
125148
data() {
126149
return {
150+
isMenuOpen: false,
127151
loading: true,
128152
dirContentsFiltered: [],
129153
}

0 commit comments

Comments
 (0)