mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-15 00:12:17 +00:00
fix(market): hide nav buttons when too few items
Fixes https://github.com/HabitRPG/habitica/issues/9802#issuecomment-358687806
This commit is contained in:
parent
6d8407ff94
commit
13de97dde6
1 changed files with 6 additions and 9 deletions
|
|
@ -1,15 +1,13 @@
|
|||
<template lang="pug">
|
||||
div.slider-root(
|
||||
v-bind:class="{'scrollButtonsVisible': scrollButtonsVisible}",
|
||||
)
|
||||
div.slider-root
|
||||
div.slider-button-area.left-button(
|
||||
v-if="scrollButtonsVisible",
|
||||
v-if="scrollButtonsVisible()",
|
||||
@mousedown.left="shiftRight"
|
||||
)
|
||||
a.slider-button
|
||||
.svg-icon(v-html="icons.previous")
|
||||
div.slider-button-area.right-button(
|
||||
v-if="scrollButtonsVisible",
|
||||
v-if="scrollButtonsVisible()",
|
||||
@mousedown.left="shiftLeft"
|
||||
)
|
||||
a.slider-button
|
||||
|
|
@ -169,12 +167,11 @@
|
|||
shouldAddVerticalLine (item) {
|
||||
return this.items[this.itemsPerPage() - 1] === item && this.pointer !== 5;
|
||||
},
|
||||
scrollButtonsVisible () {
|
||||
return this.items.length > this.itemsPerPage();
|
||||
},
|
||||
},
|
||||
props: {
|
||||
scrollButtonsVisible: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
items: {
|
||||
type: Array,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue