[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:
negue
2017-11-08 18:40:37 +01:00
committed by Matteo Pagliazzi
parent 34f6b63968
commit 4108a22d78
105 changed files with 354 additions and 684 deletions

View File

@@ -82,7 +82,7 @@
.pet-row.d-flex(
v-for="(group, key, index) in pets(petGroup, hideMissing, selectedSortBy, searchTextThrottled)",
v-if='index === 0 || showMore === petGroup.key')
v-if='index === 0 || $_openedItemRows_isToggled(petGroup.key)')
.pet-group(
v-for='item in group'
v-drag.drop.food="item.key",
@@ -116,7 +116,7 @@
starBadge(:selected="item.key === currentPet", :show="item.isOwned()", @click="selectPet(item)")
.btn.btn-flat.btn-show-more(@click="setShowMore(petGroup.key)", v-if='petGroup.key !== "specialPets"')
| {{ showMore === petGroup.key ? $t('showLess') : $t('showMore') }}
| {{ $_openedItemRows_isToggled(petGroup.key) ? $t('showLess') : $t('showMore') }}
h2
| {{ $t('mounts') }}
@@ -131,7 +131,7 @@
h4(v-if="viewOptions[mountGroup.key].animalCount != 0") {{ mountGroup.label }}
.pet-row.d-flex(v-for="(group, key, index) in mounts(mountGroup, hideMissing, selectedSortBy, searchTextThrottled)"
v-if='index === 0 || showMore === mountGroup.key')
v-if='index === 0 || $_openedItemRows_isToggled(mountGroup.key)')
.pet-group(v-for='item in group')
mountItem(
:item="item",
@@ -152,7 +152,7 @@
)
.btn.btn-flat.btn-show-more(@click="setShowMore(mountGroup.key)", v-if='mountGroup.key !== "specialMounts"')
| {{ showMore === mountGroup.key ? $t('showLess') : $t('showMore') }}
| {{ $_openedItemRows_isToggled(mountGroup.key) ? $t('showLess') : $t('showMore') }}
drawer(
:title="$t('quickInventory')",
@@ -488,11 +488,6 @@
<script>
import {mapState} from 'client/libs/store';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import bPopover from 'bootstrap-vue/lib/components/popover';
import bModal from 'bootstrap-vue/lib/components/modal';
import _each from 'lodash/each';
import _sortBy from 'lodash/sortBy';
import _filter from 'lodash/filter';
@@ -522,6 +517,7 @@
import svgClose from 'assets/svg/close.svg';
import notifications from 'client/mixins/notifications';
import openedItemRowsMixin from 'client/mixins/openedItemRows';
// TODO Normalize special pets and mounts
// import Store from 'client/store';
@@ -531,7 +527,7 @@
let lastMouseMoveEvent = {};
export default {
mixins: [notifications],
mixins: [notifications, openedItemRowsMixin],
components: {
PetItem,
Item,
@@ -539,10 +535,6 @@
FoodItem,
MountItem,
Drawer,
bDropdown,
bDropdownItem,
bPopover,
bModal,
toggleSwitch,
StarBadge,
CountBadge,
@@ -583,7 +575,6 @@
currentDraggingFood: null,
selectedDrawerTab: 0,
showMore: '',
};
},
watch: {
@@ -712,11 +703,7 @@
},
methods: {
setShowMore (key) {
if (this.showMore === key) {
this.showMore = '';
return;
}
this.showMore = key;
this.$_openedItemRows_toggleByType(key, !this.$_openedItemRows_isToggled(key));
},
getAnimalList (animalGroup, type) {
let key = animalGroup.key;
@@ -967,7 +954,7 @@
// opens the hatch dialog
this.hatchablePet = pet;
this.$root.$emit('show::modal', 'hatching-modal');
this.$root.$emit('bv::show::modal', 'hatching-modal');
}
},
@@ -980,7 +967,7 @@
},
closeHatchPetDialog () {
this.$root.$emit('hide::modal', 'hatching-modal');
this.$root.$emit('bv::hide::modal', 'hatching-modal');
},
resetHatchablePet ($event) {