Client: remove unnecessary API calls + members fixes (#12179)

* wip

* refactor world state

* allow resource to be reloaded when the server is updated

* fix #9242

* fix event listeners

* remove un-needed code

* add tests for  asyncResourceFactory reloadOnAppVersionChange

* fix double cron notifications and party members showing up in the header after a party invitation is accepted

* remove console.log

* do not send vm info to loggly due to circular dependency + fix typo

* fix #12181

* do not load invites multiple times in members modal

* add hover to challenge member count

* groups: load members only on demand

* minor ui fixes

* choose class: fix vue duplicate key warning

* minor ui fixes

* challanges: load members on demand

* add loading spinner

* change loading mechanism

* fix loading gryphon issues

* reduce code duplication
This commit is contained in:
Matteo Pagliazzi
2020-05-25 17:02:29 +02:00
committed by GitHub
parent ca80f4ee33
commit 08f1e2b273
50 changed files with 394 additions and 259 deletions

View File

@@ -456,7 +456,7 @@ import _sortBy from 'lodash/sortBy';
import _throttle from 'lodash/throttle';
import _groupBy from 'lodash/groupBy';
import _map from 'lodash/map';
import { mapState } from '@/libs/store';
import { mapState, mapGetters } from '@/libs/store';
import ShopItem from '../shopItem';
import Item from '@/components/inventory/item';
@@ -503,8 +503,6 @@ export default {
hideLocked: false,
hidePinned: false,
broken: false,
};
},
computed: {
@@ -514,6 +512,9 @@ export default {
userStats: 'user.data.stats',
userItems: 'user.data.items',
}),
...mapGetters({
broken: 'worldState.brokenQuests',
}),
shop () {
return shops.getQuestShop(this.user);
},
@@ -540,9 +541,7 @@ export default {
}, 250),
},
async mounted () {
const worldState = await this.$store.dispatch('worldState:getWorldState');
this.broken = worldState && worldState.worldBoss && worldState.worldBoss.extra
&& worldState.worldBoss.extra.worldDmg && worldState.worldBoss.extra.worldDmg.quests;
await this.$store.dispatch('worldState:getWorldState');
},
methods: {
questItems (category, sortBy, searchBy, hideLocked, hidePinned) {