Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/photos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/photos.js.map

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export default new Router({
path: '/',
component: Timeline,
name: 'root',
props: route => ({
rootTitle: t('photos', 'Your photos'),
}),
},
{
path: '/albums/:path*',
Expand Down Expand Up @@ -77,9 +80,10 @@ export default new Router({
path: '/favorites',
component: Timeline,
name: 'favorites',
props: {
props: route => ({
rootTitle: t('photos', 'Favorites'),
onlyFavorites: true,
},
}),
},
{
path: '/tags/:path*',
Expand Down
30 changes: 24 additions & 6 deletions src/views/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,20 @@
</EmptyContent>

<!-- Folder content -->
<VirtualGrid v-else-if="!loading"
:component="getComponent"
:list="fileList"
:loading-page="loadingPage"
:props="getProps"
@bottomReached="onBottomReached" />
<div v-else-if="!loading">
<Navigation
key="navigation"
:basename="path"
:filename="'/'"
:root-title="rootTitle" />

<VirtualGrid
:component="getComponent"
:list="fileList"
:loading-page="loadingPage"
:props="getProps"
@bottomReached="onBottomReached" />
</div>
</template>

<script>
Expand All @@ -50,6 +58,7 @@ import getPhotos from '../services/PhotoSearch'
import EmptyContent from '../components/EmptyContent'
import File from '../components/File'
import VirtualGrid from '../components/VirtualGrid'
import Navigation from '../components/Navigation'

import cancelableRequest from '../utils/CancelableRequest'
import GridConfigMixin from '../mixins/GridConfig'
Expand All @@ -59,6 +68,7 @@ export default {
components: {
EmptyContent,
VirtualGrid,
Navigation,
},
mixins: [GridConfigMixin],
props: {
Expand All @@ -70,6 +80,14 @@ export default {
type: Boolean,
default: false,
},
rootTitle: {
type: String,
required: true,
},
path: {
type: String,
default: '',
},
},

data() {
Expand Down