From 77127e2a588abb5bf329506ff7e006021b086e90 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 11 Aug 2022 21:00:27 +0300 Subject: you can now pin lists --- .../timeline_menu/timeline_menu_content.js | 52 ---------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/components/timeline_menu/timeline_menu_content.js (limited to 'src/components/timeline_menu/timeline_menu_content.js') diff --git a/src/components/timeline_menu/timeline_menu_content.js b/src/components/timeline_menu/timeline_menu_content.js deleted file mode 100644 index c5b1cff2..00000000 --- a/src/components/timeline_menu/timeline_menu_content.js +++ /dev/null @@ -1,52 +0,0 @@ -import { mapState } from 'vuex' -import { library } from '@fortawesome/fontawesome-svg-core' -import { - faUsers, - faGlobe, - faBookmark, - faEnvelope, - faHome -} from '@fortawesome/free-solid-svg-icons' - -library.add( - faUsers, - faGlobe, - faBookmark, - faEnvelope, - faHome -) - -const TimelineMenuContent = { - props: ['content'], - methods: { - isPinned (item) { - return this.pinnedItems.has(item) - }, - togglePin (item) { - if (this.isPinned(item)) { - this.$store.commit('removeCollectionPreference', { path: 'collections.pinnedNavItems', value: item }) - } else { - this.$store.commit('addCollectionPreference', { path: 'collections.pinnedNavItems', value: item }) - } - } - }, - computed: { - ...mapState({ - currentUser: state => state.users.currentUser, - privateMode: state => state.instance.private, - federating: state => state.instance.federating, - pinnedItems: state => new Set(state.serverSideStorage.prefsStorage.collections.pinnedNavItems) - }), - list () { - return (this.content || []).filter(({ criteria, anon, anonRoute }) => { - const set = new Set(criteria || []) - if (!this.federating && set.has('federating')) return false - if (this.private && set.has('!private')) return false - if (!this.currentUser && !(anon || anonRoute)) return false - return true - }) - } - } -} - -export default TimelineMenuContent -- cgit v1.2.3-70-g09d2