From 66a8a9fba1b92d63b852b1606d9f3bb0400a99cf Mon Sep 17 00:00:00 2001
From: Varun Patil <varunpatil@ucla.edu>
Date: Tue, 16 May 2023 15:50:25 -0700
Subject: Use consistent imports for Vue components

This makes tree shaking possible

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
---
 apps/settings/src/components/AdminTwoFactor.vue | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'apps/settings/src/components/AdminTwoFactor.vue')

diff --git a/apps/settings/src/components/AdminTwoFactor.vue b/apps/settings/src/components/AdminTwoFactor.vue
index 78dba7f3a7e..a8ade52694d 100644
--- a/apps/settings/src/components/AdminTwoFactor.vue
+++ b/apps/settings/src/components/AdminTwoFactor.vue
@@ -73,7 +73,9 @@ import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadi
 import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
 import { loadState } from '@nextcloud/initial-state'
 
-import _ from 'lodash'
+import sortedUniq from 'lodash/sortedUniq'
+import uniq from 'lodash/uniq'
+import debounce from 'lodash/debounce'
 import { generateUrl, generateOcsUrl } from '@nextcloud/router'
 
 export default {
@@ -125,19 +127,19 @@ export default {
 	mounted() {
 		// Groups are loaded dynamically, but the assigned ones *should*
 		// be valid groups, so let's add them as initial state
-		this.groups = _.sortedUniq(_.uniq(this.enforcedGroups.concat(this.excludedGroups)))
+		this.groups = sortedUniq(uniq(this.enforcedGroups.concat(this.excludedGroups)))
 
 		// Populate the groups with a first set so the dropdown is not empty
 		// when opening the page the first time
 		this.searchGroup('')
 	},
 	methods: {
-		searchGroup: _.debounce(function(query) {
+		searchGroup: debounce(function(query) {
 			this.loadingGroups = true
 			axios.get(generateOcsUrl('cloud/groups?offset=0&search={query}&limit=20', { query }))
 				.then(res => res.data.ocs)
 				.then(ocs => ocs.data.groups)
-				.then(groups => { this.groups = _.sortedUniq(_.uniq(this.groups.concat(groups))) })
+				.then(groups => { this.groups = sortedUniq(uniq(this.groups.concat(groups))) })
 				.catch(err => console.error('could not search groups', err))
 				.then(() => { this.loadingGroups = false })
 		}, 500),
-- 
cgit v1.2.3

