Merge branch 'fix/checkmarks-in-moderate-dialog' into 'master'

Fix checkmarks in dropdown moderation menu

See merge request pleroma/admin-fe!58
This commit is contained in:
Angelina Filippova 2019-10-24 14:35:58 +00:00
commit 274ed16d7e
3 changed files with 13 additions and 8 deletions

View file

@ -12,12 +12,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- `mailerEnabled` must be set to `true` in order to require password reset (password reset currently only works via email)
- remove fetching initial data for configuring server settings
- Actions in users module (ActivateUsers, AddRight, DeactivateUsers, DeleteRight, DeleteUsers) now accept an array of users instead of one user
- Leave dropdown menu open after clicking an action
### Added
- Optimistic update for actions in users module and fetching users after api function finished its execution
- Relay management
### Fixed
- Show checkmarks when tag is applied
## [1.2.0] - 2019-09-27
### Added

View file

@ -79,7 +79,7 @@ const users = {
const usersNicknames = users.map(user => user.nickname)
await activateUsers(usersNicknames, getters.authHost, getters.token)
dispatch('FetchUsers', { page: state.currentPage })
dispatch('SearchUsers', { query: state.searchQuery, page: state.currentPage })
},
async AddRight({ commit, dispatch, getters, state }, { users, right }) {
const updatedUsers = users.map(user => {
@ -89,7 +89,7 @@ const users = {
const usersNicknames = users.map(user => user.nickname)
await addRight(usersNicknames, right, getters.authHost, getters.token)
dispatch('FetchUsers', { page: state.currentPage })
dispatch('SearchUsers', { query: state.searchQuery, page: state.currentPage })
},
async AddTag({ commit, dispatch, getters, state }, { users, tag }) {
const updatedUsers = users.map(user => {
@ -99,7 +99,7 @@ const users = {
const nicknames = users.map(user => user.nickname)
await tagUser(nicknames, [tag], getters.authHost, getters.token)
dispatch('FetchUsers', { page: state.currentPage })
dispatch('SearchUsers', { query: state.searchQuery, page: state.currentPage })
},
async ClearFilters({ commit, dispatch, state }) {
commit('CLEAR_USERS_FILTERS')
@ -107,7 +107,7 @@ const users = {
},
async CreateNewAccount({ dispatch, getters, state }, { nickname, email, password }) {
await createNewAccount(nickname, email, password, getters.authHost, getters.token)
dispatch('FetchUsers', { page: state.currentPage })
dispatch('SearchUsers', { query: state.searchQuery, page: state.currentPage })
},
async DeactivateUsers({ commit, dispatch, getters, state }, users) {
const updatedUsers = users.map(user => {
@ -117,7 +117,7 @@ const users = {
const usersNicknames = users.map(user => user.nickname)
await deactivateUsers(usersNicknames, getters.authHost, getters.token)
dispatch('FetchUsers', { page: state.currentPage })
dispatch('SearchUsers', { query: state.searchQuery, page: state.currentPage })
},
async DeleteRight({ commit, dispatch, getters, state }, { users, right }) {
const updatedUsers = users.map(user => {
@ -127,7 +127,7 @@ const users = {
const usersNicknames = users.map(user => user.nickname)
await deleteRight(usersNicknames, right, getters.authHost, getters.token)
dispatch('FetchUsers', { page: state.currentPage })
dispatch('SearchUsers', { query: state.searchQuery, page: state.currentPage })
},
async DeleteUsers({ commit, getters, state }, users) {
const deletedUsersIds = users.map(deletedUser => deletedUser.id)
@ -162,7 +162,7 @@ const users = {
const nicknames = users.map(user => user.nickname)
await untagUser(nicknames, [tag], getters.authHost, getters.token)
dispatch('FetchUsers', { page: state.currentPage })
dispatch('SearchUsers', { query: state.searchQuery, page: state.currentPage })
},
async SearchUsers({ commit, dispatch, state, getters }, { query, page }) {
if (query.length === 0) {

View file

@ -61,7 +61,7 @@
</el-table-column>
<el-table-column :label="$t('users.actions')" fixed="right">
<template slot-scope="scope">
<el-dropdown size="small" trigger="click">
<el-dropdown :hide-on-click="false" size="small" trigger="click">
<span class="el-dropdown-link">
{{ $t('users.moderation') }}
<i v-if="isDesktop" class="el-icon-arrow-down el-icon--right"/>