summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2022-09-16 15:00:53 +0200
committerLouis Chemineau <louis@chmn.me>2022-09-20 10:49:37 +0200
commitbde9865ce18e732d1de93048689e461ed9002d91 (patch)
treefa3f6217499bdef7d43ec710d217358a8d2f0f88
parent7060b482e957522bf975001e2c41efb442767d59 (diff)
Add header to SharedAlbums
Signed-off-by: Louis Chemineau <louis@chmn.me>
-rw-r--r--src/views/Albums.vue1
-rw-r--r--src/views/SharedAlbums.vue15
2 files changed, 15 insertions, 1 deletions
diff --git a/src/views/Albums.vue b/src/views/Albums.vue
index 2ce1131c..34fbd4c1 100644
--- a/src/views/Albums.vue
+++ b/src/views/Albums.vue
@@ -31,7 +31,6 @@
:title="t('photos', 'Albums')"
:root-title="t('photos', 'Albums')"
@refresh="onRefresh">
- <slot name="header" />
<NcButton :aria-label="t('photos', 'Create a new album.')"
@click="showAlbumCreationForm = true">
<template #icon>
diff --git a/src/views/SharedAlbums.vue b/src/views/SharedAlbums.vue
index 5600322a..09250bb5 100644
--- a/src/views/SharedAlbums.vue
+++ b/src/views/SharedAlbums.vue
@@ -26,6 +26,13 @@
:collection-root="t('photos', 'Shared albums')"
:error="errorFetchingAlbums"
class="albums-list">
+ <HeaderNavigation key="navigation"
+ slot="header"
+ :loading="loadingAlbums"
+ :title="t('photos', 'Shared albums')"
+ :root-title="t('photos', 'Shared albums')"
+ @refresh="onRefresh" />
+
<CollectionCover :key="collection.basename"
slot-scope="{collection}"
:link="`/sharedalbums/${collection.basename}`"
@@ -55,6 +62,7 @@ import { NcEmptyContent } from '@nextcloud/vue'
import FetchSharedAlbumsMixin from '../mixins/FetchSharedAlbumsMixin.js'
import CollectionsList from '../components/Collection/CollectionsList.vue'
import CollectionCover from '../components/Collection/CollectionCover.vue'
+import HeaderNavigation from '../components/HeaderNavigation.vue'
export default {
name: 'SharedAlbums',
@@ -63,6 +71,7 @@ export default {
NcEmptyContent,
CollectionsList,
CollectionCover,
+ HeaderNavigation,
},
filters: {
@@ -81,6 +90,12 @@ export default {
mixins: [
FetchSharedAlbumsMixin,
],
+
+ methods: {
+ onRefresh() {
+ this.fetchAlbums()
+ },
+ },
}
</script>
<style lang="scss" scoped>