From 4fa3046104108930a8005426e937e007abce706d Mon Sep 17 00:00:00 2001 From: negue Date: Tue, 3 Oct 2017 21:44:45 +0200 Subject: [PATCH] sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height --- website/client/assets/scss/item.scss | 2 +- .../components/inventory/items/index.vue | 11 ++----- .../inventory/stable/hatchedPetDialog.vue | 31 ++++++++++++++----- .../components/inventory/stable/index.vue | 18 +++-------- website/client/components/ui/drawer.vue | 4 +-- website/client/components/ui/itemRows.vue | 4 +++ website/common/locales/en/pets.json | 1 + 7 files changed, 37 insertions(+), 34 deletions(-) diff --git a/website/client/assets/scss/item.scss b/website/client/assets/scss/item.scss index da4056acfe..01021ec567 100644 --- a/website/client/assets/scss/item.scss +++ b/website/client/assets/scss/item.scss @@ -2,7 +2,7 @@ .items > div { display: inline-block; - margin-right: 23px; + margin-right: 24px; } .items > div:last-of-type { diff --git a/website/client/components/inventory/items/index.vue b/website/client/components/inventory/items/index.vue index cb747fcb20..05e7ef4dd4 100644 --- a/website/client/components/inventory/items/index.vue +++ b/website/client/components/inventory/items/index.vue @@ -127,10 +127,7 @@ :count="context.item.quantity" ) - hatchedPetDialog( - :pet="hatchedPet", - @closed="closeHatchedPetDialog()" - ) + hatchedPetDialog() div.hatchingPotionInfo(ref="draggingPotionInfo") div(v-if="currentDraggingPotion != null") @@ -251,7 +248,6 @@ export default { currentDraggingPotion: null, potionClickMode: false, - hatchedPet: null, cardOptions: { cardType: '', messageOptions: 0, @@ -345,7 +341,7 @@ export default { }, hatchPet (potion, egg) { this.$store.dispatch('common:hatch', {egg: egg.key, hatchingPotion: potion.key}); - this.hatchedPet = createAnimal(egg, potion, 'pet', this.content, this.user.items); + this.$root.$emit('hatchedPet::open', createAnimal(egg, potion, 'pet', this.content, this.user.items)); }, onDragEnd () { this.currentDraggingPotion = null; @@ -405,9 +401,6 @@ export default { this.potionClickMode = false; } }, - closeHatchedPetDialog () { - this.hatchedPet = null; - }, async itemClicked (groupKey, item) { if (item.type && item.type === 'card') { diff --git a/website/client/components/inventory/stable/hatchedPetDialog.vue b/website/client/components/inventory/stable/hatchedPetDialog.vue index 98217031f6..3c1610a91f 100644 --- a/website/client/components/inventory/stable/hatchedPetDialog.vue +++ b/website/client/components/inventory/stable/hatchedPetDialog.vue @@ -1,12 +1,10 @@