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
@@ -3,6 +3,7 @@
class="create-dropdown"
:text="text"
no-flip="no-flip"
@show="$emit('opened')"
>
<b-dropdown-form
:disabled="false"
@@ -14,6 +15,7 @@
type="text"
>
</b-dropdown-form>
<loading-gryphon v-if="loading" />
<b-dropdown-item
v-for="member in memberResults"
:key="member._id"
@@ -30,8 +32,12 @@
<script>
// @TODO: how do we subclass this rather than type checking?
import challengeMemberSearchMixin from '@/mixins/challengeMemberSearch';
import loadingGryphon from '@/components/ui/loadingGryphon';
export default {
components: {
loadingGryphon,
},
mixins: [challengeMemberSearchMixin],
props: {
text: {
@@ -52,6 +58,11 @@ export default {
memberResults: [],
};
},
computed: {
loading () {
return this.$store.state.memberModalOptions.loading;
},
},
watch: {
memberResults () {
if (this.memberResults.length > 10) this.memberResults.length = 10;