2020-10-11 11:50:16 +00:00
|
|
|
<!--
|
|
|
|
- Copyright (c) 2020. The Nextcloud Bookmarks contributors.
|
|
|
|
-
|
|
|
|
- This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<template>
|
2020-10-12 11:47:02 +00:00
|
|
|
<DashboardWidget :items="items"
|
|
|
|
:loading="loading"
|
|
|
|
:show-more-text="t('bookmarks', 'Bookmarks')"
|
|
|
|
:show-more-url="moreUrl"
|
|
|
|
:empty-content-message="t('bookmarks', 'No bookmarks found')" />
|
2020-10-11 11:50:16 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { DashboardWidget } from '@nextcloud/vue-dashboard'
|
|
|
|
import { generateUrl } from '@nextcloud/router'
|
2022-12-12 19:29:03 +00:00
|
|
|
import { actions } from '../store/index.js'
|
2020-10-11 11:50:16 +00:00
|
|
|
export default {
|
2021-03-30 11:21:18 +00:00
|
|
|
name: 'DashboardRecent',
|
2020-10-11 11:50:16 +00:00
|
|
|
components: { DashboardWidget },
|
|
|
|
computed: {
|
|
|
|
loading() {
|
2020-10-12 11:47:02 +00:00
|
|
|
return Boolean(this.$store.state.loading.bookmarks)
|
2020-10-11 11:50:16 +00:00
|
|
|
},
|
|
|
|
items() {
|
2021-03-31 11:26:33 +00:00
|
|
|
return this.$store.getters.getBookmarksForDashboard()
|
2020-10-11 11:50:16 +00:00
|
|
|
},
|
2020-10-12 11:47:02 +00:00
|
|
|
moreUrl() {
|
|
|
|
return generateUrl('/apps/bookmarks/')
|
|
|
|
},
|
2020-10-11 11:50:16 +00:00
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
await this.$store.dispatch(actions.FILTER_BY_RECENT)
|
|
|
|
await this.$store.dispatch(actions.FETCH_PAGE)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|