diff --git a/package.json b/package.json
index 8f7d4d3424..0b7fa6b0df 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,7 @@
"bluebird": "^3.3.5",
"body-parser": "^1.15.0",
"bootstrap": "^4.0.0-alpha.6",
- "bootstrap-vue": "^0.15.8",
+ "bootstrap-vue": "^0.16.1",
"bower": "~1.3.12",
"browserify": "~12.0.1",
"compression": "^1.6.1",
diff --git a/website/client/assets/scss/button.scss b/website/client/assets/scss/button.scss
index e5a247370a..62550a9fad 100644
--- a/website/client/assets/scss/button.scss
+++ b/website/client/assets/scss/button.scss
@@ -14,18 +14,18 @@
box-shadow: 0 2px 2px 0 rgba($black, 0.16), 0 1px 4px 0 rgba($black, 0.12);
color: $white;
- &:focus {
+ &:focus:not(.btn-flat) {
outline: none;
border-color: $purple-400;
@include btn-focus-hover-shadow();
}
- &:hover {
+ &:hover:not(.btn-flat) {
@include btn-focus-hover-shadow();
border-color: transparent;
}
- &:active, &.active {
+ &:active:not(.btn-flat), &.active:not(.btn-flat) {
box-shadow: none;
border: 1px solid transparent;
}
@@ -124,3 +124,8 @@
color: inherit !important;
}
}
+
+.btn-flat {
+ border: 0;
+ box-shadow: none;
+}
diff --git a/website/client/assets/scss/icon.scss b/website/client/assets/scss/icon.scss
index 21a7e7686d..63c2d18f6f 100644
--- a/website/client/assets/scss/icon.scss
+++ b/website/client/assets/scss/icon.scss
@@ -12,4 +12,18 @@
* {
transition: none !important;
}
-}
\ No newline at end of file
+}
+
+.icon-16 {
+ width: 16px;
+ height: 16px;
+}
+
+.icon-10 {
+ width: 10px;
+ height: 10px;
+}
+
+.inline {
+ display: inline-block;
+}
diff --git a/website/client/assets/scss/item.scss b/website/client/assets/scss/item.scss
index ee131e7e99..63f4babe4e 100644
--- a/website/client/assets/scss/item.scss
+++ b/website/client/assets/scss/item.scss
@@ -34,10 +34,18 @@
cursor: auto;
}
+ &-active {
+ background: $purple-500;
+ }
+
&:hover {
box-shadow: 0 4px 4px 0 rgba($black, 0.16), 0 1px 8px 0 rgba($black, 0.12);
border-color: $purple-500;
}
+
+ &.highlight {
+ box-shadow: 0 0 8px 8px rgba($black, 0.16), 0 5px 10px 0 rgba($black, 0.12) !important;
+ }
}
.drawer-content .item:hover {
diff --git a/website/client/assets/scss/page.scss b/website/client/assets/scss/page.scss
index a888e6c537..ea33ee8e83 100644
--- a/website/client/assets/scss/page.scss
+++ b/website/client/assets/scss/page.scss
@@ -12,10 +12,12 @@ html, body {
padding: 24px;
font-size: 14px;
line-height: 1.43;
+ width: 236px;
}
.standard-page {
padding: 24px;
+ flex: 1;
}
.page-header {
diff --git a/website/client/assets/svg/close.svg b/website/client/assets/svg/close.svg
new file mode 100644
index 0000000000..5070218c06
--- /dev/null
+++ b/website/client/assets/svg/close.svg
@@ -0,0 +1,5 @@
+
diff --git a/website/client/components/guilds/discovery.vue b/website/client/components/guilds/discovery.vue
index b4350216a6..fcadef9c83 100644
--- a/website/client/components/guilds/discovery.vue
+++ b/website/client/components/guilds/discovery.vue
@@ -2,7 +2,7 @@
.row
sidebar(@search="updateSearch", @filter="updateFilters")
- .col-10.standard-page
+ .standard-page
.clearfix
h1.page-header.float-left(v-once) {{ $t('publicGuilds') }}
.float-right
diff --git a/website/client/components/guilds/myGuilds.vue b/website/client/components/guilds/myGuilds.vue
index 2ef97e4c06..13a834b53e 100644
--- a/website/client/components/guilds/myGuilds.vue
+++ b/website/client/components/guilds/myGuilds.vue
@@ -2,7 +2,7 @@
.row
sidebar(v-on:search="updateSearch", v-on:filter="updateFilters")
- .col-10.no-guilds.standard-page(v-if='filteredGuilds.length === 0')
+ .no-guilds.standard-page(v-if='filteredGuilds.length === 0')
.no-guilds-wrapper
.svg-icon(v-html='icons.greyBadge')
h2 {{$t('noGuildsTitle')}}
@@ -10,7 +10,7 @@
p {{$t('noGuildsParagraph2')}}
span(v-if='loading') {{ $t('loading') }}
- .col-10.standard-page(v-if='filteredGuilds.length > 0')
+ .standard-page(v-if='filteredGuilds.length > 0')
.row
.col-md-12
h1.page-header.float-left(v-once) {{ $t('myGuilds') }}
diff --git a/website/client/components/guilds/sidebar.vue b/website/client/components/guilds/sidebar.vue
index d19cfd6a81..6c2eef485e 100644
--- a/website/client/components/guilds/sidebar.vue
+++ b/website/client/components/guilds/sidebar.vue
@@ -1,5 +1,5 @@
-.col-2.standard-sidebar
+.standard-sidebar
.form-group
input.form-control.search(type="text", :placeholder="$t('search')", v-model='searchTerm')
diff --git a/website/client/components/inventory/equipment/index.vue b/website/client/components/inventory/equipment/index.vue
index dc060216a5..f5abed5302 100644
--- a/website/client/components/inventory/equipment/index.vue
+++ b/website/client/components/inventory/equipment/index.vue
@@ -1,6 +1,6 @@
.row
- .col-2.standard-sidebar
+ .standard-sidebar
.form-group
input.form-control.input-search(type="text", v-model="searchText", :placeholder="$t('search')")
@@ -17,7 +17,7 @@
span.custom-control-indicator
span.custom-control-description(v-once) {{ group.label }}
- .col-10.standard-page
+ .standard-page
.clearfix
h1.float-left.mb-0.page-header(v-once) {{ $t('equipment') }}
.float-right
diff --git a/website/client/components/inventory/item.vue b/website/client/components/inventory/item.vue
index 971e382e8f..6a55ac07eb 100644
--- a/website/client/components/inventory/item.vue
+++ b/website/client/components/inventory/item.vue
@@ -8,18 +8,15 @@ b-popover(
v-else,
:triggers="['hover']",
:placement="popoverPosition",
- @click="click",
)
span(slot="content")
slot(name="popoverContent", :item="item")
- .item-wrapper
+ .item-wrapper(@click="click")
.item
slot(name="itemBadge", :item="item")
span.item-content(
- :class="itemContentClass",
- :draggable="draggable",
- @dragstart="onDrag"
+ :class="itemContentClass"
)
span.item-label(v-if="label") {{ label }}
@@ -49,22 +46,11 @@ export default {
type: String,
default: 'bottom',
},
- draggable: {
- type: Boolean,
- default: false,
- },
},
methods: {
click () {
this.$emit('click', this.item);
},
- onDrag (ev) {
- if (this.draggable) {
- this.$emit('onDrag', ev);
- } else {
- ev.preventDefault();
- }
- },
},
};
diff --git a/website/client/components/inventory/items/index.vue b/website/client/components/inventory/items/index.vue
index d39063b22a..78ed35df61 100644
--- a/website/client/components/inventory/items/index.vue
+++ b/website/client/components/inventory/items/index.vue
@@ -1,6 +1,6 @@
-.row
- .col-2.standard-sidebar
+.row(v-mousePosition="30", @mouseMoved="mouseMoved($event)")
+ .standard-sidebar
.form-group
input.form-control.input-search(type="text", v-model="searchText", :placeholder="$t('search')")
@@ -16,7 +16,7 @@
input.custom-control-input(type="checkbox", v-model="group.selected")
span.custom-control-indicator
span.custom-control-description(v-once) {{ $t(group.key) }}
- .col-10.standard-page
+ .standard-page
.clearfix
h1.float-left.mb-0.page-header(v-once) {{ $t('items') }}
.float-right
@@ -34,16 +34,55 @@
|
span.badge.badge-pill.badge-default {{group.quantity}}
- .items
+ .items(v-if="group.key === 'eggs'")
item(
v-for="({data: item, quantity}, index) in items[group.key]",
v-if="group.open || index < itemsPerLine",
:item="item",
:key="item.key",
- :itemContentClass="`${group.classPrefix}${item.key}`"
- :selected="true",
+ :itemContentClass="`${group.classPrefix}${item.key}`",
+ v-drag.drop.hatch="item.key",
+
+ @itemDragOver="onDragOver($event, item)",
+ @itemDropped="onDrop($event, item)",
+ @itemDragLeave="onDragLeave()",
+
+ @click="onEggClicked($event, item)"
)
- template(slot="popoverContent", scope="ctx")
+ template(slot="popoverContent", scope="ctx")
+ h4.popover-content-title {{ ctx.item.text() }}
+ .popover-content-text {{ ctx.item.notes() }}
+ template(slot="itemBadge", scope="ctx")
+ span.badge.badge-pill.badge-item.badge-quantity {{ quantity }}
+
+ .items(v-else-if="group.key === 'hatchingPotions'")
+ item(
+ v-for="({data: item, quantity}, index) in items[group.key]",
+ v-if="group.open || index < itemsPerLine",
+ :item="item",
+ :key="item.key",
+ :itemContentClass="`${group.classPrefix}${item.key}`",
+ v-drag.hatch="item.key",
+
+ @itemDragEnd="onDragEnd($event, item)",
+ @itemDragStart="onDragStart($event, item)",
+
+ @click="onPotionClicked($event, item)"
+ )
+ template(slot="popoverContent", scope="ctx")
+ h4.popover-content-title {{ ctx.item.text() }}
+ .popover-content-text {{ ctx.item.notes() }}
+ template(slot="itemBadge", scope="ctx")
+ span.badge.badge-pill.badge-item.badge-quantity {{ quantity }}
+ .items(v-else)
+ item(
+ v-for="({data: item, quantity}, index) in items[group.key]",
+ v-if="group.open || index < itemsPerLine",
+ :item="item",
+ :key="item.key",
+ :itemContentClass="`${group.classPrefix}${item.key}`",
+ )
+ template(slot="popoverContent", scope="ctx")
h4.popover-content-title {{ ctx.item.text() }}
.popover-content-text {{ ctx.item.notes() }}
template(slot="itemBadge", scope="ctx")
@@ -55,9 +94,40 @@
@click="group.open = !group.open"
) {{ group.open ? $t('showLessItems', { type: $t(group.key) }) : $t('showAllItems', { type: $t(group.key), items: items[group.key].length }) }}
+ div.hatchingPotionInfo(ref="draggingPotionInfo")
+ div(v-if="currentDraggingPotion != null")
+ div.potion-icon(:class="'Pet_HatchingPotion_'+currentDraggingPotion.key")
+ div.popover
+ div.popover-content {{ $t('dragThisPotion', {potionName: currentDraggingPotion.text() }) }}
+
+ div.hatchingPotionInfo.mouse(ref="clickPotionInfo", v-if="potionClickMode")
+ div(v-if="currentDraggingPotion != null")
+ div.potion-icon(:class="'Pet_HatchingPotion_'+currentDraggingPotion.key")
+ div.popover
+ div.popover-content {{ $t('clickOnEggToHatch', {potionName: currentDraggingPotion.text() }) }}
+
diff --git a/website/client/components/inventory/stable/foodItem.vue b/website/client/components/inventory/stable/foodItem.vue
index 7861844f2a..2a63bd37e9 100644
--- a/website/client/components/inventory/stable/foodItem.vue
+++ b/website/client/components/inventory/stable/foodItem.vue
@@ -7,15 +7,17 @@ b-popover(
h4.popover-content-title {{ item.text() }}
div.popover-content-text(v-html="item.notes()")
- .item-wrapper
- .item
+ .item-wrapper(@click="click($event)")
+ .item(:class="{'item-active': active }")
countBadge(
:show="true",
:count="itemCount"
)
span.item-content(
:class="'Pet_Food_'+item.key",
- v-drag.food="item.key"
+ v-drag.food="item.key",
+ @itemDragEnd="dragend($event)",
+ @itemDragStart="dragstart($event)"
)
@@ -43,6 +45,20 @@ export default {
itemContentClass: {
type: String,
},
+ active: {
+ type: Boolean,
+ },
+ },
+ methods: {
+ dragend ($event) {
+ this.$emit('itemDragEnd', $event);
+ },
+ dragstart ($event) {
+ this.$emit('itemDragStart', $event);
+ },
+ click ($event) {
+ this.$emit('itemClick', $event);
+ },
},
};
diff --git a/website/client/components/inventory/stable/index.vue b/website/client/components/inventory/stable/index.vue
index 26250e1010..bd4f140332 100644
--- a/website/client/components/inventory/stable/index.vue
+++ b/website/client/components/inventory/stable/index.vue
@@ -1,5 +1,5 @@
- .row.stable
+ .row.stable(v-mousePosition="30", @mouseMoved="mouseMoved($event)")
.standard-sidebar
div
b-popover(
@@ -85,9 +85,10 @@
v-for="pet in pets(petGroup, viewOptions[petGroup.key].open, hideMissing, selectedSortBy, searchTextThrottled, availableContentWidth)",
:key="pet.key",
v-drag.drop.food="pet.key",
- @dragover="onDragOver($event, pet)",
- @dropped="onDrop($event, pet)",
- :class="pet.isLastInRow ? 'last' : ''"
+ @itemDragOver="onDragOver($event, pet)",
+ @itemDropped="onDrop($event, pet)",
+ @itemDragLeave="onDragLeave()",
+ :class="{'last': pet.isLastInRow}"
)
petItem(
:item="pet",
@@ -95,20 +96,13 @@
:popoverPosition="'top'",
:progress="pet.progress",
:emptyItem="!pet.isOwned()",
- :showPopover="pet.isOwned() || pet.isHatchable()",
- @hatchPet="hatchPet",
+ :showPopover="pet.isOwned()",
+ :highlightBorder="highlightPet == pet.key",
+ @click="petClicked(pet)"
)
span(slot="popoverContent")
div(v-if="pet.isOwned()")
h4.popover-content-title {{ pet.name }}
- div.hatchablePopover(v-else-if="pet.isHatchable()")
- h4.popover-content-title {{ pet.name }}
- div.popover-content-text(v-html="$t('haveHatchablePet', { potion: pet.potionName, egg: pet.eggName })")
- div.potionEggGroup
- div.potionEggBackground
- div(:class="'Pet_HatchingPotion_'+pet.potionKey")
- div.potionEggBackground
- div(:class="'Pet_Egg_'+pet.eggKey")
template(slot="itemBadge", scope="ctx")
starBadge(
@@ -185,7 +179,7 @@
div.float-right(v-once)
| {{ $t('petLikeToEat') + ' ' }}
- .svg-icon(v-html="icons.information")
+ span.svg-icon.inline.icon-16(v-html="icons.information")
drawer-slider(
@@ -199,6 +193,10 @@
foodItem(
:item="ctx.item",
:itemCount="userItems.food[ctx.item.key]",
+ :active="currentDraggingFood == ctx.item",
+ @itemDragEnd="onDragEnd()",
+ @itemDragStart="onDragStart($event, ctx.item)",
+ @itemClick="onFoodClicked($event, ctx.item)"
)
b-modal#welcome-modal(
@@ -212,6 +210,39 @@
h1.page-header(v-once) {{ $t('welcomeStable') }}
div.content-text(v-once) {{ $t('welcomeStableText') }}
+ b-modal#hatching-modal(
+ :visible="hatchablePet != null",
+ @change="resetHatchablePet($event)"
+ )
+
+ div.content(v-if="hatchablePet")
+ div.potionEggGroup
+ div.potionEggBackground
+ div(:class="'Pet_HatchingPotion_'+hatchablePet.potionKey")
+ div.potionEggBackground
+ div(:class="'Pet_Egg_'+hatchablePet.eggKey")
+
+ h4.title {{ hatchablePet.name }}
+ div.text(v-html="$t('haveHatchablePet', { potion: hatchablePet.potionName, egg: hatchablePet.eggName })")
+
+ span.svg-icon.icon-10(v-html="icons.close", slot="modal-header", @click="closeHatchPetDialog()")
+
+ div(slot="modal-footer")
+ button.btn.btn-primary(@click="hatchPet(hatchablePet)") {{ $t('hatch') }}
+ button.btn.btn-secondary.btn-flat(@click="closeHatchPetDialog()") {{ $t('cancel') }}
+
+ div.foodInfo(ref="dragginFoodInfo")
+ div(v-if="currentDraggingFood != null")
+ div.food-icon(:class="'Pet_Food_'+currentDraggingFood.key")
+ div.popover
+ div.popover-content {{ $t('dragThisFood', {foodName: currentDraggingFood.text() }) }}
+
+ div.foodInfo.mouse(ref="clickFoodInfo", v-if="foodClickMode")
+ div(v-if="currentDraggingFood != null")
+ div.food-icon(:class="'Pet_Food_'+currentDraggingFood.key")
+ div.popover
+ div.popover-content {{ $t('clickOnPetToFeed', {foodName: currentDraggingFood.text() }) }}
+