diff --git a/changelog/unreleased/enhancement-shares-overview b/changelog/unreleased/enhancement-shares-overview new file mode 100644 index 00000000000..e89d42f142a --- /dev/null +++ b/changelog/unreleased/enhancement-shares-overview @@ -0,0 +1,7 @@ +Enhancement: Shares overview + +We've merged the three shares navigation items into one central "Shares" item, +with a toggle to switch between the three different kinds of shares (incoming, outgoing, links). + +https://github.com/owncloud/web/issues/6440 +https://github.com/owncloud/web/pull/6512 diff --git a/packages/web-app-files/src/components/AppBar/AppBar.vue b/packages/web-app-files/src/components/AppBar/AppBar.vue index 94e2a4be13d..e920951e75b 100644 --- a/packages/web-app-files/src/components/AppBar/AppBar.vue +++ b/packages/web-app-files/src/components/AppBar/AppBar.vue @@ -11,18 +11,22 @@ @progress="onFileProgress" />
- - -

+
+ + + + + +
-

@@ -57,13 +60,18 @@ import MixinFileActions from '../../mixins/fileActions' import { buildResource, buildWebDavFilesPath, buildWebDavSpacesPath } from '../../helpers/resources' import { bus } from 'web-pkg/src/instance' import { DavProperties } from 'web-pkg/src/constants' -import { isLocationPublicActive, isLocationSpacesActive } from '../../router' +import { + isLocationPublicActive, + isLocationSharesActive, + isLocationSpacesActive +} from '../../router' import { useActiveLocation } from '../../composables' import BatchActions from './SelectedResources/BatchActions.vue' import ContextActions from '../FilesList/ContextActions.vue' import CreateAndUpload from './CreateAndUpload.vue' import FileDrop from './Upload/FileDrop.vue' +import SharesNavigation from './SharesNavigation.vue' import SizeInfo from './SelectedResources/SizeInfo.vue' import ViewOptions from './ViewOptions.vue' @@ -73,12 +81,14 @@ export default { ContextActions, CreateAndUpload, FileDrop, + SharesNavigation, SizeInfo, ViewOptions }, mixins: [Mixins, MixinFileActions], setup() { return { + isLocationSharesActive: useActiveLocation(isLocationSharesActive), isPersonalLocation: useActiveLocation(isLocationSpacesActive, 'files-spaces-personal-home'), isPublicLocation: useActiveLocation(isLocationPublicActive, 'files-public-files'), isSpacesProjectsLocation: useActiveLocation(isLocationSpacesActive, 'files-spaces-projects'), diff --git a/packages/web-app-files/src/components/AppBar/SharesNavigation.vue b/packages/web-app-files/src/components/AppBar/SharesNavigation.vue new file mode 100644 index 00000000000..115fa07ed60 --- /dev/null +++ b/packages/web-app-files/src/components/AppBar/SharesNavigation.vue @@ -0,0 +1,64 @@ + + + + diff --git a/packages/web-app-files/src/index.js b/packages/web-app-files/src/index.js index ccf5b0faffa..5fe9e0f25a3 100644 --- a/packages/web-app-files/src/index.js +++ b/packages/web-app-files/src/index.js @@ -6,9 +6,9 @@ import PrivateLink from './views/PrivateLink.vue' import PublicFiles from './views/PublicFiles.vue' import PublicLink from './views/PublicLink.vue' import Personal from './views/Personal.vue' -import SharedWithMe from './views/SharedWithMe.vue' -import SharedWithOthers from './views/SharedWithOthers.vue' -import SharedViaLink from './views/SharedViaLink.vue' +import SharedWithMe from './views/shares/SharedWithMe.vue' +import SharedWithOthers from './views/shares/SharedWithOthers.vue' +import SharedViaLink from './views/shares/SharedViaLink.vue' import SpaceProject from './views/spaces/Project.vue' import SpaceProjects from './views/spaces/Projects.vue' import Trashbin from './views/Trashbin.vue' @@ -40,7 +40,7 @@ const appInfo = { } const navItems = [ { - name: $gettext('All files'), + name: $gettext('Personal'), icon: appInfo.icon, route: { path: `/${appInfo.id}/spaces/personal/home` @@ -57,24 +57,10 @@ const navItems = [ } }, { - name: $gettext('Shared with me'), + name: $gettext('Shares'), icon: 'share-forward', route: { - path: `/${appInfo.id}/shares/with-me` - } - }, - { - name: $gettext('Shared with others'), - icon: 'reply', - route: { - path: `/${appInfo.id}/shares/with-others` - } - }, - { - name: $gettext('Shared via link'), - icon: 'link', - route: { - path: `/${appInfo.id}/shares/via-link` + path: `/${appInfo.id}/shares` } }, { diff --git a/packages/web-app-files/src/views/SharedViaLink.vue b/packages/web-app-files/src/views/shares/SharedViaLink.vue similarity index 85% rename from packages/web-app-files/src/views/SharedViaLink.vue rename to packages/web-app-files/src/views/shares/SharedViaLink.vue index 8fa6e176b98..1695791fed3 100644 --- a/packages/web-app-files/src/views/SharedViaLink.vue +++ b/packages/web-app-files/src/views/shares/SharedViaLink.vue @@ -48,27 +48,27 @@