diff options
author | Varun Patil <varunpatil@ucla.edu> | 2023-05-16 15:50:25 -0700 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2023-05-23 22:34:14 +0200 |
commit | 66a8a9fba1b92d63b852b1606d9f3bb0400a99cf (patch) | |
tree | ceca245dd6d68d19b9050088b8e99dad8ba05582 /apps | |
parent | 0fca8238dd86d572f0f15eaa8e8a5ea836cc76bf (diff) | |
download | nextcloud-server-66a8a9fba1b92d63b852b1606d9f3bb0400a99cf.tar.gz nextcloud-server-66a8a9fba1b92d63b852b1606d9f3bb0400a99cf.zip |
Use consistent imports for Vue components
This makes tree shaking possible
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
Diffstat (limited to 'apps')
10 files changed, 33 insertions, 36 deletions
diff --git a/apps/files_versions/src/components/Version.vue b/apps/files_versions/src/components/Version.vue index 51ef3ef61a0..a368720bb51 100644 --- a/apps/files_versions/src/components/Version.vue +++ b/apps/files_versions/src/components/Version.vue @@ -112,7 +112,13 @@ import Download from 'vue-material-design-icons/Download.vue' import Pencil from 'vue-material-design-icons/Pencil.vue' import Check from 'vue-material-design-icons/Check.vue' import Delete from 'vue-material-design-icons/Delete.vue' -import { NcActionButton, NcActionLink, NcListItem, NcModal, NcButton, NcTextField, Tooltip } from '@nextcloud/vue' +import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' +import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js' +import NcListItem from '@nextcloud/vue/dist/Components/NcListItem.js' +import NcModal from '@nextcloud/vue/dist/Components/NcModal.js' +import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' +import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js' +import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import moment from '@nextcloud/moment' import { translate } from '@nextcloud/l10n' import { joinPaths } from '@nextcloud/paths' 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), diff --git a/apps/settings/src/components/AuthToken.vue b/apps/settings/src/components/AuthToken.vue index d7ed81a35ab..b231af8d387 100644 --- a/apps/settings/src/components/AuthToken.vue +++ b/apps/settings/src/components/AuthToken.vue @@ -83,11 +83,9 @@ </template> <script> -import { - NcActions, - NcActionButton, - NcActionCheckbox, -} from '@nextcloud/vue' +import NcActions from '@nextcloud/vue/dist/Components/NcActions.js' +import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' +import NcActionCheckbox from '@nextcloud/vue/dist/Components/NcActionCheckbox.js' // When using capture groups the following parts are extracted the first is used as the version number, the second as the OS const userAgentMap = { diff --git a/apps/settings/src/components/PersonalInfo/EmailSection/Email.vue b/apps/settings/src/components/PersonalInfo/EmailSection/Email.vue index 43e7d3d63ee..26405bcbd4a 100644 --- a/apps/settings/src/components/PersonalInfo/EmailSection/Email.vue +++ b/apps/settings/src/components/PersonalInfo/EmailSection/Email.vue @@ -86,7 +86,8 @@ </template> <script> -import { NcActions, NcActionButton } from '@nextcloud/vue' +import NcActions from '@nextcloud/vue/dist/Components/NcActions.js' +import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' import AlertCircle from 'vue-material-design-icons/AlertCircleOutline.vue' import AlertOctagon from 'vue-material-design-icons/AlertOctagon.vue' import Check from 'vue-material-design-icons/Check.vue' diff --git a/apps/settings/src/components/UserList/UserRow.vue b/apps/settings/src/components/UserList/UserRow.vue index 72b0629eaf5..f511ff3e0e9 100644 --- a/apps/settings/src/components/UserList/UserRow.vue +++ b/apps/settings/src/components/UserList/UserRow.vue @@ -270,12 +270,10 @@ <script> import ClickOutside from 'vue-click-outside' -import { - NcPopoverMenu, - NcMultiselect, - NcActions, - NcActionButton, -} from '@nextcloud/vue' +import NcPopoverMenu from '@nextcloud/vue/dist/Components/NcPopoverMenu' +import NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect' +import NcActions from '@nextcloud/vue/dist/Components/NcActions' +import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton' import UserRowSimple from './UserRowSimple.vue' import UserRowMixin from '../../mixins/UserRowMixin.js' diff --git a/apps/theming/src/AdminTheming.vue b/apps/theming/src/AdminTheming.vue index a190dfb2a6a..37eabc12774 100644 --- a/apps/theming/src/AdminTheming.vue +++ b/apps/theming/src/AdminTheming.vue @@ -112,10 +112,8 @@ <script> import { loadState } from '@nextcloud/initial-state' -import { - NcNoteCard, - NcSettingsSection, -} from '@nextcloud/vue' +import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js' +import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js' import CheckboxField from './components/admin/CheckboxField.vue' import ColorPickerField from './components/admin/ColorPickerField.vue' import FileInputField from './components/admin/FileInputField.vue' diff --git a/apps/theming/src/components/admin/CheckboxField.vue b/apps/theming/src/components/admin/CheckboxField.vue index 5877614717e..fa8477a7283 100644 --- a/apps/theming/src/components/admin/CheckboxField.vue +++ b/apps/theming/src/components/admin/CheckboxField.vue @@ -43,10 +43,8 @@ </template> <script> -import { - NcCheckboxRadioSwitch, - NcNoteCard, -} from '@nextcloud/vue' +import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js' +import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js' import TextValueMixin from '../../mixins/admin/TextValueMixin.js' diff --git a/apps/theming/src/components/admin/ColorPickerField.vue b/apps/theming/src/components/admin/ColorPickerField.vue index fd80a45e387..7885bfeb233 100644 --- a/apps/theming/src/components/admin/ColorPickerField.vue +++ b/apps/theming/src/components/admin/ColorPickerField.vue @@ -56,11 +56,9 @@ <script> import { debounce } from 'debounce' -import { - NcButton, - NcColorPicker, - NcNoteCard, -} from '@nextcloud/vue' +import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' +import NcColorPicker from '@nextcloud/vue/dist/Components/NcColorPicker.js' +import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js' import Undo from 'vue-material-design-icons/UndoVariant.vue' import TextValueMixin from '../../mixins/admin/TextValueMixin.js' diff --git a/apps/theming/src/components/admin/FileInputField.vue b/apps/theming/src/components/admin/FileInputField.vue index c15d1ee2c8e..8af17711141 100644 --- a/apps/theming/src/components/admin/FileInputField.vue +++ b/apps/theming/src/components/admin/FileInputField.vue @@ -80,11 +80,9 @@ import axios from '@nextcloud/axios' import { generateUrl } from '@nextcloud/router' -import { - NcButton, - NcLoadingIcon, - NcNoteCard, -} from '@nextcloud/vue' +import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' +import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js' +import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js' import Delete from 'vue-material-design-icons/Delete.vue' import Undo from 'vue-material-design-icons/UndoVariant.vue' import Upload from 'vue-material-design-icons/Upload.vue' diff --git a/apps/theming/src/components/admin/TextField.vue b/apps/theming/src/components/admin/TextField.vue index 9a3a98fe20d..ec5ed94dc09 100644 --- a/apps/theming/src/components/admin/TextField.vue +++ b/apps/theming/src/components/admin/TextField.vue @@ -41,7 +41,7 @@ </template> <script> -import { NcTextField } from '@nextcloud/vue' +import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js' import TextValueMixin from '../../mixins/admin/TextValueMixin.js' |