-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6512 from owncloud/shares-overview
[full-ci] Shares overview page
- Loading branch information
Showing
65 changed files
with
503 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
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). | ||
In the process, we have also renamed the "All files" page to the "Personal" page, indicating that | ||
this is the user's personal space since shares (and potentially other shared spaces) live elsewhere. | ||
|
||
https://github.com/owncloud/web/issues/6440 | ||
https://github.com/owncloud/web/pull/6512 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
packages/web-app-files/src/components/AppBar/SharesNavigation.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<template> | ||
<nav id="shares-navigation" class="oc-py-s" :aria-label="$gettext('Shares pages navigation')"> | ||
<oc-list class="oc-flex oc-visible@s"> | ||
<li v-for="navItem in navItems" :key="`shares-navigation-desktop-${navItem.to}`"> | ||
<oc-button | ||
type="router-link" | ||
class="oc-mr-s" | ||
appearance="raw" | ||
:variation="navItem.active ? 'primary' : 'passive'" | ||
:to="navItem.to" | ||
> | ||
<span v-text="navItem.text" /> | ||
</oc-button> | ||
</li> | ||
</oc-list> | ||
<div class="oc-hidden@s"> | ||
<oc-button id="shares_navigation_mobile" appearance="raw" v-text="$gettext('Shares pages')" /> | ||
<oc-drop toggle="#shares_navigation_mobile" mode="click" close-on-click padding-size="small"> | ||
<oc-list> | ||
<li v-for="navItem in navItems" :key="`shares-navigation-mobile-${navItem.to}`"> | ||
<oc-button | ||
type="router-link" | ||
appearance="raw" | ||
:variation="navItem.active ? 'primary' : 'passive'" | ||
:to="navItem.to" | ||
> | ||
<span v-text="navItem.text" /> | ||
</oc-button> | ||
</li> | ||
</oc-list> | ||
</oc-drop> | ||
</div> | ||
</nav> | ||
</template> | ||
|
||
<script> | ||
import { | ||
isLocationSharesActive, | ||
locationSharesViaLink, | ||
locationSharesWithMe, | ||
locationSharesWithOthers | ||
} from '../../router/shares' | ||
import { computed, getCurrentInstance } from '@vue/composition-api' | ||
import { useRouter } from 'web-pkg/src/composables' | ||
export default { | ||
setup() { | ||
const $gettext = getCurrentInstance().proxy.$gettext | ||
const router = useRouter() | ||
const sharesRoutes = [ | ||
locationSharesWithMe, | ||
locationSharesWithOthers, | ||
locationSharesViaLink | ||
].reduce((routes, route) => { | ||
routes[route.name] = router.getRoutes().find((r) => r.name === route.name) | ||
return routes | ||
}, {}) | ||
const navItems = computed(() => [ | ||
{ | ||
to: sharesRoutes[locationSharesWithMe.name].path, | ||
text: $gettext('Shared with me'), | ||
active: isLocationSharesActive(router, 'files-shares-with-me') | ||
}, | ||
{ | ||
to: sharesRoutes[locationSharesWithOthers.name].path, | ||
text: $gettext('Shared with others'), | ||
active: isLocationSharesActive(router, 'files-shares-with-others') | ||
}, | ||
{ | ||
to: sharesRoutes[locationSharesViaLink.name].path, | ||
text: $gettext('Shared via link'), | ||
active: isLocationSharesActive(router, 'files-shares-via-link') | ||
} | ||
]) | ||
return { | ||
navItems | ||
} | ||
} | ||
} | ||
</script> | ||
<style lang="scss" scoped> | ||
.router-link-active { | ||
text-decoration: underline; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.