Skip to content

Commit

Permalink
fix(RecentPagesWidget): Filter out template pages
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Aug 2, 2023
1 parent c1096ac commit b67974f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
11 changes: 1 addition & 10 deletions src/components/Page/LandingPageWidgets/RecentPageTile.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<template>
<router-link :to="pagePath(page)" class="recent-page-tile">
<div class="recent-page-tile__rectangle">
<template v-if="isTemplate">
<PageTemplateIcon :size="36" fill-color="var(--color-text-maxcontrast)" />
</template>
<template v-else-if="page.emoji">
<template v-if="page.emoji">
{{ page.emoji }}
</template>
<template v-else>
Expand All @@ -24,15 +21,13 @@
<script>
import { mapGetters } from 'vuex'
import LastUserBubble from '../../LastUserBubble.vue'
import PageTemplateIcon from '../../Icon/PageTemplateIcon.vue'
import PageIcon from '../../Icon/PageIcon.vue'
export default {
name: 'RecentPageTile',
components: {
LastUserBubble,
PageIcon,
PageTemplateIcon,
},
props: {
Expand All @@ -46,10 +41,6 @@ export default {
...mapGetters([
'pagePath',
]),
isTemplate() {
return this.page.title === 'Template'
},
},
}
</script>
Expand Down
1 change: 1 addition & 0 deletions src/store/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ export default {
recentPages(state) {
return state.pages
.slice()
.filter(p => p.title !== 'Template')
.sort(sortOrders.byTimestamp)
},

Expand Down

0 comments on commit b67974f

Please sign in to comment.