mirror of
https://github.com/nextcloud/server.git
synced 2026-03-07 07:50:57 -05:00
Use consistent imports for Vue components
This makes tree shaking possible Signed-off-by: Varun Patil <varunpatil@ucla.edu>
This commit is contained in:
parent
0fca8238dd
commit
66a8a9fba1
10 changed files with 33 additions and 36 deletions
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue