diff --git a/src/client/js/components/serverActions.js b/src/client/js/components/serverActions.js index 12c08dcc..f5b8d0a9 100644 --- a/src/client/js/components/serverActions.js +++ b/src/client/js/components/serverActions.js @@ -30,6 +30,8 @@ define([ extend: function (blueprint) { if (blueprint.addActions) { blueprint.addActions.forEach(function (a) { + this.actions.spliceWhere(f => f.key === a.key); + let exists = this.actions.some(function (ta) { return ((ta.targetId === a.targetId) && (ta.cpn === a.cpn) && (ta.method === a.method)); }); @@ -51,6 +53,8 @@ define([ delete blueprint.removeActions; } + + events.emit('onGetServerActions', this.actions); } }; }); diff --git a/src/client/ui/templates/announcements/announcements.js b/src/client/ui/templates/announcements/announcements.js index 27d63478..a239d981 100644 --- a/src/client/ui/templates/announcements/announcements.js +++ b/src/client/ui/templates/announcements/announcements.js @@ -20,6 +20,11 @@ define([ }, onGetAnnouncement: function (e) { + if (isMobile) { + if (['press g to', 'press u to'].some(f => e.msg.toLowerCase().indexOf(f) > -1)) + return; + } + this.clearMessage(); let container = this.find('.list'); diff --git a/src/client/ui/templates/equipment/styles.less b/src/client/ui/templates/equipment/styles.less index 0b2661a7..35e93f57 100644 --- a/src/client/ui/templates/equipment/styles.less +++ b/src/client/ui/templates/equipment/styles.less @@ -18,11 +18,15 @@ padding-top: 8px; margin: auto; } + } - .bottom { + .content { + width: 100%; height: calc(100% - 36px); background-color: @blackC; + display: flex; + flex-direction: column; .tabs { width: 100%; @@ -53,18 +57,87 @@ &:last-child { margin-right: 0px; } + } + } - .left, .stats, .right, .bottom { - float: left; + .main { height: 528px; + display: flex; + flex-direction: column; + flex-wrap: wrap; + + .left, .right { + width: 96px; + padding: 8px; + } + + .left, .stats, .right, .bottom { + height: 528px; + } + + .stats { + height: calc(528px - 80px); + width: calc(100% - (2 * 96px)); + padding: 16px 8px 8px 8px; + + .stat { + height: 22px; + filter: drop-shadow(0px -2px 0px @blackD) + drop-shadow(0px 2px 0px @blackD) + drop-shadow(2px 0px 0px @blackD) + drop-shadow(-2px 0px 0px @blackD); + -moz-filter: drop-shadow(0px -2px 0px @blackD) + drop-shadow(0px 2px 0px @blackD) + drop-shadow(2px 0px 0px @blackD) + drop-shadow(-2px 0px 0px @blackD); + + &.blueText > font { + color: @blue; + } + + &.empty { + height: 22px; + } + + &.gold { + font { + color: @yellowB; + } + } + } + } + + .quick { + width: calc(100% - (2 * 96px)); + height: 80px; + padding: 0px; + display: flex; + justify-content: center; + + .slot { + + } + } } - .left, .right, .itemList, .runes, .tools, .quick { - width: 96px; - padding: 8px; + .runes { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; + height: 80px; + padding: 8px; + .slot { + &:last-child { + margin-right: 0px; + } + } + } + + .left, .right, .itemList, .runes, .tools, .quick { .slot { width: 80px; height: 80px; @@ -84,143 +157,99 @@ background-image: url('../../../images/uiIcons.png') !important; } - &[slot="head"] .icon { background-position: -0px -448px; } - &[slot="neck"] .icon { background-position: -64px -448px; } - &[slot="chest"] .icon { background-position: -128px -448px; } - &[slot="hands"] .icon { background-position: -192px -448px; } - &[slot="finger-1"] .icon { background-position: -256px -448px; } - &[slot="finger-2"] .icon { background-position: -256px -448px; } - &[slot="waist"] .icon { background-position: -320px -448px; } - &[slot="legs"] .icon { background-position: -384px -448px; } - &[slot="feet"] .icon { background-position: -448px -448px; } - &[slot="trinket"] .icon { background-position: -448px -384px; } - &[slot="oneHanded"] .icon { background-position: -384px -384px; } - &[slot="offHand"] .icon { background-position: -192px -384px; } - &[slot="tool"] .icon { background-position: -256px -384px; } - &[slot^="rune"] .icon { background-position: -320px -384px; } - &[slot^="quick-0"] .icon { background-position: -128px -384px; } - } - - .icon { - height: 100%; - } - - .info { - left: 6px; - bottom: 3px; - position: absolute; - color: @white; - filter: - drop-shadow(0px -2px 0px @blackD) - drop-shadow(0px 2px 0px @blackD) - drop-shadow(2px 0px 0px @blackD) - drop-shadow(-2px 0px 0px @blackD); - - -moz-filter: - drop-shadow(0px -2px 0px @blackD) - drop-shadow(0px 2px 0px @blackD) - drop-shadow(2px 0px 0px @blackD) - drop-shadow(-2px 0px 0px @blackD); + &[slot="head"] .icon { + background-position: -0px -448px; + } - } + &[slot="neck"] .icon { + background-position: -64px -448px; + } - &:hover { - .icon { - filter: brightness(160%); - -moz-filter: brightness(160%); + &[slot="chest"] .icon { + background-position: -128px -448px; } - &.empty { - background-color: fade(@blueA, 10%); + &[slot="hands"] .icon { + background-position: -192px -448px; } - } - } - } - .middle { - float: left; - width: calc(100% - (2 * 96px)); + &[slot="finger-1"] .icon { + background-position: -256px -448px; + } - .stats { - width: 100%; - padding-top: 16px; - height: calc(440px - 88px); + &[slot="finger-2"] .icon { + background-position: -256px -448px; + } - .stat { - height: 22px; + &[slot="waist"] .icon { + background-position: -320px -448px; + } - filter: - drop-shadow(0px -2px 0px @blackD) - drop-shadow(0px 2px 0px @blackD) - drop-shadow(2px 0px 0px @blackD) - drop-shadow(-2px 0px 0px @blackD); + &[slot="legs"] .icon { + background-position: -384px -448px; + } - -moz-filter: - drop-shadow(0px -2px 0px @blackD) - drop-shadow(0px 2px 0px @blackD) - drop-shadow(2px 0px 0px @blackD) - drop-shadow(-2px 0px 0px @blackD); + &[slot="feet"] .icon { + background-position: -448px -448px; + } - &.blueText > font { - color: @blue; + &[slot="trinket"] .icon { + background-position: -448px -384px; } - &.empty { - height: 22px; + &[slot="oneHanded"] .icon { + background-position: -384px -384px; } - &.gold { - font { - color: @yellowB; - } + &[slot="offHand"] .icon { + background-position: -192px -384px; } - } - } - .tools { - width: 100%; - height: 80px; + &[slot="tool"] .icon { + background-position: -256px -384px; + } - .slot { - float: left; - margin-right: 8px; + &[slot^="rune"] .icon { + background-position: -320px -384px; + } - &:last-child { - margin-right: 0px; + &[slot^="quick-0"] .icon { + background-position: -128px -384px; } } - } - .tools { - clear: both; - margin-bottom: 8px; - padding-left: calc(50% - 40px); - } - } - - .bottom { - height: 80px; + .icon { + height: 100%; + } - .runes { - width: 100%; - height: 80px; + .info { + left: 6px; + bottom: 3px; + position: absolute; + color: @white; + filter: drop-shadow(0px -2px 0px @blackD) + drop-shadow(0px 2px 0px @blackD) + drop-shadow(2px 0px 0px @blackD) + drop-shadow(-2px 0px 0px @blackD); + -moz-filter: drop-shadow(0px -2px 0px @blackD) + drop-shadow(0px 2px 0px @blackD) + drop-shadow(2px 0px 0px @blackD) + drop-shadow(-2px 0px 0px @blackD); + } - .slot { - float: left; - margin-right: 12px; + &:hover { + .icon { + filter: brightness(160%); + -moz-filter: brightness(160%); + } - &:last-child { - margin-right: 0px; + &.empty { + background-color: fade(@blueA, 10%); } } } } - .quick .slot { - margin-top: -168px; - margin-left: 184px; - } - .itemList { display: none; position: absolute; @@ -245,18 +274,15 @@ bottom: -3px; position: absolute; color: @white; - filter: - drop-shadow(0px -2px 0px @blackD) - drop-shadow(0px 2px 0px @blackD) - drop-shadow(2px 0px 0px @blackD) - drop-shadow(-2px 0px 0px @blackD); - - -moz-filter: - drop-shadow(0px -2px 0px @blackD) - drop-shadow(0px 2px 0px @blackD) - drop-shadow(2px 0px 0px @blackD) - drop-shadow(-2px 0px 0px @blackD); - } + filter: drop-shadow(0px -2px 0px @blackD) + drop-shadow(0px 2px 0px @blackD) + drop-shadow(2px 0px 0px @blackD) + drop-shadow(-2px 0px 0px @blackD); + -moz-filter: drop-shadow(0px -2px 0px @blackD) + drop-shadow(0px 2px 0px @blackD) + drop-shadow(2px 0px 0px @blackD) + drop-shadow(-2px 0px 0px @blackD); + } } &.new { @@ -266,23 +292,20 @@ bottom: -3px; position: absolute; color: @white; - filter: - drop-shadow(0px -2px 0px @blackD) - drop-shadow(0px 2px 0px @blackD) - drop-shadow(2px 0px 0px @blackD) - drop-shadow(-2px 0px 0px @blackD); - - -moz-filter: - drop-shadow(0px -2px 0px @blackD) - drop-shadow(0px 2px 0px @blackD) - drop-shadow(2px 0px 0px @blackD) - drop-shadow(-2px 0px 0px @blackD); - } + filter: drop-shadow(0px -2px 0px @blackD) + drop-shadow(0px 2px 0px @blackD) + drop-shadow(2px 0px 0px @blackD) + drop-shadow(-2px 0px 0px @blackD); + -moz-filter: drop-shadow(0px -2px 0px @blackD) + drop-shadow(0px 2px 0px @blackD) + drop-shadow(2px 0px 0px @blackD) + drop-shadow(-2px 0px 0px @blackD); + } } } } } - } + } } .mobile .uiEquipment { @@ -291,33 +314,61 @@ margin-left: 5px; margin-top: 5px; - .bottom { - .left, .right { - height: 100%; - display: flex; - flex-direction: column; - } + .content { + flex-direction: column; + flex-wrap: wrap; + position: relative; - .left { - flex-wrap: wrap; + .main { + width: calc(100% - 8px); + height: calc(100% - 130px); + padding: 8px 8px 0px 8px; + justify-content: space-between; + position: relative; - .slot { - margin-right: 8px; + .left, .right, .quick { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 70%; + height: calc(100% / 3); + + .slot { + margin-bottom: 0px; + } + } + + .stats { + width: 30%; + height: calc(100% + 74px); + overflow-y: auto; + position: absolute; + right: 0px; } - } - .right { - flex-wrap: wrap-reverse; + .quick { + order: 3; + justify-content: center; + padding: 0px 8px 0px 0px; + } - .slot { - margin-left: 8px; + .left { + padding: 0px 8px 0px 0px; } - } - .middle { - .stats { - height: calc(100% - 88px); + .right { + order: 2; + padding: 0px 8px 0px 0px; } } + + .runes { + flex-direction: row; + width: calc((100% - 16px) * 0.7); + position: absolute; + left: 1px; + bottom: 8px; + padding: 0px 8px 0px 8px; + } } } diff --git a/src/client/ui/templates/equipment/template.html b/src/client/ui/templates/equipment/template.html index e4827640..0a8f6b09 100644 --- a/src/client/ui/templates/equipment/template.html +++ b/src/client/ui/templates/equipment/template.html @@ -2,99 +2,97 @@