diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-01-12 01:35:53 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2023-01-13 23:19:28 +0000 |
commit | f6aa5224c4c8a1e9e57f0a8069bd5f70054314e8 (patch) | |
tree | df492c57c99bd6cfeea6d381faf1beb693cad89c /core/src/components/ContactsMenu.js | |
parent | f7ff54860bef10c856542bb17ceb90e824c62dc8 (diff) | |
download | nextcloud-server-f6aa5224c4c8a1e9e57f0a8069bd5f70054314e8.tar.gz nextcloud-server-f6aa5224c4c8a1e9e57f0a8069bd5f70054314e8.zip |
Focus trap contacts menu with NcHeaderMenu port
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'core/src/components/ContactsMenu.js')
-rw-r--r-- | core/src/components/ContactsMenu.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/core/src/components/ContactsMenu.js b/core/src/components/ContactsMenu.js index cf031331a50..1b7b25873d0 100644 --- a/core/src/components/ContactsMenu.js +++ b/core/src/components/ContactsMenu.js @@ -2,6 +2,7 @@ * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christopher Ng <chrng8@gmail.com> * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license AGPL-3.0-or-later @@ -21,16 +22,20 @@ * */ -import $ from 'jquery' -import OC from '../OC' +import Vue from 'vue' + +import ContactsMenu from '../views/ContactsMenu.vue' /** * @todo move to contacts menu code https://github.com/orgs/nextcloud/projects/31#card-21213129 */ export const setUp = () => { - // eslint-disable-next-line no-new - new OC.ContactsMenu({ - el: $('#contactsmenu .menu'), - trigger: $('#contactsmenu .menutoggle'), - }) + const mountPoint = document.getElementById('contactsmenu') + if (mountPoint) { + // eslint-disable-next-line no-new + new Vue({ + el: mountPoint, + render: h => h(ContactsMenu), + }) + } } |