mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
[WIP] bootstrap-vue upgrade (#9178)
* update bootstrap-vue to 1.0.0-beta.9 - remove all individual bootstrap components and use BootstrapVue into Vue * change modal action names from show::modal to bv::show::modal * check if drops are undefined * fix modal widths - sellModal now using input instead of dropbox * upgrade to bootstrap 4.0beta * include package-lock changes * fix app menu dropdown position * upgrade bootstrap to beta2 (was missing grid offset and other fixes) - refix header menu position * fix tags popup (auto width to max not working) - fix filter panel width (adding width: 100% works until max-width) * show hide logo on different screensize (new css breakpoints - http://getbootstrap.com/docs/4.0/utilities/display/ ) * fix package-lock? * fix active button style / app header toggle button * fix package-lock ! * update package lock after merge - new mixin "openedItemRows" to save the "show more/show less" in stable * mixin naming style * fix buyQuestModal marginTop * fix customMenuDropdown position * fix userDropdown items
This commit is contained in:
@@ -31,18 +31,16 @@
|
||||
|
||||
<script>
|
||||
import ResizeDirective from 'client/directives/resize.directive';
|
||||
import { mapState } from 'client/libs/store';
|
||||
import openedItemRowsMixin from 'client/mixins/openedItemRows';
|
||||
|
||||
import _take from 'lodash/take';
|
||||
|
||||
export default {
|
||||
mixins: [openedItemRowsMixin],
|
||||
directives: {
|
||||
resize: ResizeDirective,
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
openedItemRows: 'openedItemRows',
|
||||
}),
|
||||
itemsPerRow () {
|
||||
return Math.floor(this.currentWidth / (this.itemWidth + this.itemMargin));
|
||||
},
|
||||
@@ -59,16 +57,7 @@
|
||||
toggleItemsToShow () {
|
||||
this.showAll = !this.showAll;
|
||||
|
||||
let array = this.$store.state.openedItemRows;
|
||||
if (this.showAll) {
|
||||
array.push(this.type);
|
||||
} else {
|
||||
let index = array.indexOf(this.type);
|
||||
|
||||
if (index > -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
}
|
||||
this.$_openedItemRows_toggleByType(this.type, this.showAll);
|
||||
},
|
||||
itemsToShow (showAll) {
|
||||
let itemsLength = this.items.length;
|
||||
@@ -108,7 +97,7 @@
|
||||
},
|
||||
},
|
||||
created () {
|
||||
this.showAll = this.openedItemRows.includes(this.type);
|
||||
this.showAll = this.$_openedItemRows_isToggled(this.type);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user