From 73a9a11aa6817a5e58e3a65e1332fed27e5a7175 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sun, 12 Sep 2021 00:33:24 +0200 Subject: [PATCH] Added favorites link to user menu. --- assets/components/header/menu.vue | 35 +++++++++++++++++++---------- assets/components/stashes/stash.vue | 2 -- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/assets/components/header/menu.vue b/assets/components/header/menu.vue index f1c7d550..d46126a7 100644 --- a/assets/components/header/menu.vue +++ b/assets/components/header/menu.vue @@ -1,28 +1,26 @@ @@ -97,6 +103,10 @@ function signup(state) { return state.auth.signup; } +function favorites() { + return this.me?.stashes.find(stash => stash.primary); +} + function me(state) { return state.auth.user; } @@ -118,6 +128,7 @@ export default { theme, me, }), + favorites, }, emits: ['showFilters'], methods: { diff --git a/assets/components/stashes/stash.vue b/assets/components/stashes/stash.vue index 02219a0e..3e70963a 100644 --- a/assets/components/stashes/stash.vue +++ b/assets/components/stashes/stash.vue @@ -114,8 +114,6 @@ async function fetchStash() { limit: this.limit, }); - console.log(this.stash.movies); - this.isMine = this.stash.user?.id === this.$store.state.auth.user?.id; if (this.$route.params.range === 'scenes') {