Skip to content

Commit

Permalink
Use sync modifier with openMenu
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Jan 8, 2022
1 parent 9ed12e8 commit 1e2f3db
Show file tree
Hide file tree
Showing 92 changed files with 261 additions and 385 deletions.
6 changes: 2 additions & 4 deletions apps/settings/src/components/UserList/UserRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,13 @@
:groups="groups"
:languages="languages"
:loading="loading"
:opened-menu="openedMenu"
:opened-menu.sync="openedMenu"
:settings="settings"
:show-config="showConfig"
:sub-admins-groups="subAdminsGroups"
:user-actions="userActions"
:user="user"
:class="{'row--menu-opened': openedMenu}"
@hideMenu="hideMenu"
@toggleMenu="toggleMenu" />
:class="{'row--menu-opened': openedMenu}" />
<div v-else
:class="{
'disabled': loading.delete || loading.disable,
Expand Down
7 changes: 5 additions & 2 deletions apps/settings/src/components/UserList/UserRowSimple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
v-click-outside="hideMenu"
class="icon-more"
:aria-label="t('settings', 'Toggle user actions menu')"
@click.prevent="$emit('toggle-menu')" />
@click.prevent="toggleMenu" />
<div class="popovermenu" :class="{ 'open': openedMenu }" :aria-expanded="openedMenu">
<PopoverMenu :menu="userActions" />
</div>
Expand Down Expand Up @@ -176,8 +176,11 @@ export default {
},
},
methods: {
toggleMenu() {
this.$emit('update:openedMenu', !this.openedMenu)
},
hideMenu() {
this.$emit('hide-menu')
this.$emit('update:openedMenu', false)
},
toggleEdit() {
this.$emit('update:editing', true)
Expand Down
4 changes: 2 additions & 2 deletions dist/accessibility-accessibility.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/accessibility-accessibility.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 1e2f3db

Please sign in to comment.