diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-27 17:16:51 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-27 17:16:51 +0900 |
| commit | e24a2362fd538ec7c231fe4e5c16cddd5ff681ca (patch) | |
| tree | 80863236667f023117a829584b14a3f5420f0e95 /packages/frontend/src/pages/flash | |
| parent | 🎨 (diff) | |
| download | sharkey-e24a2362fd538ec7c231fe4e5c16cddd5ff681ca.tar.gz sharkey-e24a2362fd538ec7c231fe4e5c16cddd5ff681ca.tar.bz2 sharkey-e24a2362fd538ec7c231fe4e5c16cddd5ff681ca.zip | |
refactor(frontend): PageWithHeaderにMkSwiperを持たせるように
Diffstat (limited to 'packages/frontend/src/pages/flash')
| -rw-r--r-- | packages/frontend/src/pages/flash/flash-index.vue | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/packages/frontend/src/pages/flash/flash-index.vue b/packages/frontend/src/pages/flash/flash-index.vue index 4ef33cbe0f..c05552a041 100644 --- a/packages/frontend/src/pages/flash/flash-index.vue +++ b/packages/frontend/src/pages/flash/flash-index.vue @@ -4,36 +4,34 @@ SPDX-License-Identifier: AGPL-3.0-only --> <template> -<PageWithHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"> +<PageWithHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs" :swipable="true"> <MkSpacer :contentMax="700"> - <MkSwiper v-model:tab="tab" :tabs="headerTabs"> - <div v-if="tab === 'featured'"> - <MkPagination v-slot="{items}" :pagination="featuredFlashsPagination"> + <div v-if="tab === 'featured'"> + <MkPagination v-slot="{items}" :pagination="featuredFlashsPagination"> + <div class="_gaps_s"> + <MkFlashPreview v-for="flash in items" :key="flash.id" :flash="flash"/> + </div> + </MkPagination> + </div> + + <div v-else-if="tab === 'my'"> + <div class="_gaps"> + <MkButton gradate rounded style="margin: 0 auto;" @click="create()"><i class="ti ti-plus"></i></MkButton> + <MkPagination v-slot="{items}" :pagination="myFlashsPagination"> <div class="_gaps_s"> <MkFlashPreview v-for="flash in items" :key="flash.id" :flash="flash"/> </div> </MkPagination> </div> + </div> - <div v-else-if="tab === 'my'"> - <div class="_gaps"> - <MkButton gradate rounded style="margin: 0 auto;" @click="create()"><i class="ti ti-plus"></i></MkButton> - <MkPagination v-slot="{items}" :pagination="myFlashsPagination"> - <div class="_gaps_s"> - <MkFlashPreview v-for="flash in items" :key="flash.id" :flash="flash"/> - </div> - </MkPagination> + <div v-else-if="tab === 'liked'"> + <MkPagination v-slot="{items}" :pagination="likedFlashsPagination"> + <div class="_gaps_s"> + <MkFlashPreview v-for="like in items" :key="like.flash.id" :flash="like.flash"/> </div> - </div> - - <div v-else-if="tab === 'liked'"> - <MkPagination v-slot="{items}" :pagination="likedFlashsPagination"> - <div class="_gaps_s"> - <MkFlashPreview v-for="like in items" :key="like.flash.id" :flash="like.flash"/> - </div> - </MkPagination> - </div> - </MkSwiper> + </MkPagination> + </div> </MkSpacer> </PageWithHeader> </template> @@ -43,7 +41,6 @@ import { computed, ref } from 'vue'; import MkFlashPreview from '@/components/MkFlashPreview.vue'; import MkPagination from '@/components/MkPagination.vue'; import MkButton from '@/components/MkButton.vue'; -import MkSwiper from '@/components/MkSwiper.vue'; import { i18n } from '@/i18n.js'; import { definePage } from '@/page.js'; import { useRouter } from '@/router.js'; |