From 8a642be6d9b7681428585257a7c9161911057e62 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 8 Dec 2023 13:45:32 +0100 Subject: [PATCH] [client] Fix pages and gallery tab navigation This also adds a much nicer "add new gallery post" button to the gallery page --- packages/client/src/pages/gallery/index.vue | 133 +++++++++++--------- packages/client/src/pages/pages.vue | 105 ++++++++-------- 2 files changed, 132 insertions(+), 106 deletions(-) diff --git a/packages/client/src/pages/gallery/index.vue b/packages/client/src/pages/gallery/index.vue index 45e7bd7ae..b47d8a954 100644 --- a/packages/client/src/pages/gallery/index.vue +++ b/packages/client/src/pages/gallery/index.vue @@ -25,80 +25,88 @@ @slide-change="onSlideChange" > - - + + + + + + + @@ -119,6 +127,7 @@ import { useRouter } from "@/router"; import { defaultStore } from "@/store"; import "swiper/scss"; import "swiper/scss/virtual"; +import MkButton from "@/components/MkButton.vue"; const router = useRouter(); @@ -205,11 +214,21 @@ function syncSlide(index) { } onMounted(() => { - syncSlide(tabs.indexOf(swiperRef.activeIndex)); + syncSlide(tabs.indexOf(tab)); }); + +function create() { + router.push("/gallery/new"); +}