Skip to content

Commit 82bc7a5

Browse files
committed
Wrap list of blacklisted users in a loading box
1 parent 3721851 commit 82bc7a5

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

pages/auth/settings/blacklist.vue

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,25 @@
44
{{ $t('auth.settings.blacklist') }}
55
</h2>
66
<p class="subtitle is-6">{{ $t('auth.settings.blacklistSubtitle') }}</p>
7-
<author
8-
v-for="(user, index) in blacklistedUsers"
9-
:key="user._id"
10-
:user="user"
11-
/>
7+
<hc-box :isLoading="isLoading">
8+
<author
9+
v-for="(user, index) in blacklistedUsers"
10+
:key="user._id"
11+
:user="user"
12+
/>
13+
</hc-box>
1214
</div>
1315
</template>
1416

1517
<script>
1618
import Author from '~/components/Author/Author.vue'
19+
import Box from '~/components/Global/Layout/Box/Box.vue'
1720
import { mapGetters } from 'vuex'
1821
1922
export default {
2023
components: {
21-
'author': Author
24+
'author': Author,
25+
'hc-box': Box
2226
},
2327
data() {
2428
return {
@@ -28,10 +32,12 @@ import { mapGetters } from 'vuex'
2832
computed: {
2933
...mapGetters({
3034
loggedInUser: 'auth/user',
31-
userSettings: 'feathers-vuex-usersettings/current'
35+
userSettings: 'feathers-vuex-usersettings/current',
36+
isLoading: 'feathers-vuex-usersettings/isPending'
3237
})
3338
},
3439
async mounted(){
40+
await this.$store.dispatch('feathers-vuex-usersettings/loadCurrent', this.loggedInUser)
3541
const { blacklist = [] } = this.userSettings || {}
3642
const res = await this.$store.dispatch('feathers-vuex-users/find', {
3743
query: {

0 commit comments

Comments
 (0)