Skip to content

Commit 68b4c9e

Browse files
Anthony KinseyAnthony Kinsey
Anthony Kinsey
authored and
Anthony Kinsey
committed
feat: standardize pagination for mobile view for mentions page
1 parent ab440ae commit 68b4c9e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/views/Mentions.vue

+9-6
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,19 @@
7777
</svg>
7878
Mark all read
7979
</a>
80+
<div class="pagination-slide" v-if="mentionData?.prev || mentionData?.next">
81+
<div class="pagination-controls">
82+
<button @click="pageResults(-1)" :disabled="!mentionData?.prev">&#10094; Prev</button>
83+
<div class="page">{{currentPage}}</div>
84+
<button @click="pageResults(1)" :disabled="!mentionData?.next">Next &#10095;</button>
85+
</div>
86+
</div>
8087
</div>
8188
</div>
82-
<div class="pagination-simple" v-if="mentionData?.prev || mentiondata?.next">
83-
<button @click="pageResults(-1)" :disabled="!mentionData?.prev">&#10094; Prev</button>
84-
<button @click="pageResults(1)" :disabled="!mentionData?.next">Next &#10095;</button>
85-
</div>
8689
</template>
8790

8891
<script>
89-
import { reactive, toRefs } from 'vue'
92+
import { reactive, toRefs, computed } from 'vue'
9093
import { mentionsApi } from '@/api'
9194
import { localStoragePrefs } from '@/composables/stores/prefs'
9295
import humanDate from '@/composables/filters/humanDate'
@@ -139,7 +142,7 @@ export default {
139142
const $router = useRouter()
140143
141144
const v = reactive({
142-
currentPage: Number($route.query.page) || 1,
145+
currentPage: computed(() => Number($route.query.page) || 1),
143146
mentionData: null,
144147
defaultAvatar: window.default_avatar,
145148
defaultAvatarShape: window.default_avatar_shape,

0 commit comments

Comments
 (0)