Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/src/components')
-rw-r--r--apps/settings/src/components/AdminTwoFactor.vue18
-rw-r--r--apps/settings/src/components/AppDetails.vue25
-rw-r--r--apps/settings/src/components/AppList.vue18
-rw-r--r--apps/settings/src/components/AppList/AppItem.vue18
-rw-r--r--apps/settings/src/components/AppList/AppScore.vue8
-rw-r--r--apps/settings/src/components/AppManagement.vue14
-rw-r--r--apps/settings/src/components/AuthToken.vue30
-rw-r--r--apps/settings/src/components/AuthTokenList.vue16
-rw-r--r--apps/settings/src/components/AuthTokenSection.vue16
-rw-r--r--apps/settings/src/components/AuthTokenSetupDialogue.vue20
-rw-r--r--apps/settings/src/components/PrefixMixin.vue4
-rw-r--r--apps/settings/src/components/SvgFilterMixin.vue6
-rw-r--r--apps/settings/src/components/UserList.vue50
-rw-r--r--apps/settings/src/components/UserList/UserRow.vue102
-rw-r--r--apps/settings/src/components/UserList/UserRowSimple.vue28
15 files changed, 187 insertions, 186 deletions
diff --git a/apps/settings/src/components/AdminTwoFactor.vue b/apps/settings/src/components/AdminTwoFactor.vue
index 7a9645527c1..45643dc84b6 100644
--- a/apps/settings/src/components/AdminTwoFactor.vue
+++ b/apps/settings/src/components/AdminTwoFactor.vue
@@ -73,14 +73,14 @@ import _ from 'lodash'
export default {
name: 'AdminTwoFactor',
components: {
- Multiselect
+ Multiselect,
},
data() {
return {
loading: false,
dirty: false,
groups: [],
- loadingGroups: false
+ loadingGroups: false,
}
},
computed: {
@@ -91,7 +91,7 @@ export default {
set: function(val) {
this.dirty = true
this.$store.commit('setEnforced', val)
- }
+ },
},
enforcedGroups: {
get: function() {
@@ -100,7 +100,7 @@ export default {
set: function(val) {
this.dirty = true
this.$store.commit('setEnforcedGroups', val)
- }
+ },
},
excludedGroups: {
get: function() {
@@ -109,8 +109,8 @@ export default {
set: function(val) {
this.dirty = true
this.$store.commit('setExcludedGroups', val)
- }
- }
+ },
+ },
},
mounted() {
// Groups are loaded dynamically, but the assigned ones *should*
@@ -138,7 +138,7 @@ export default {
const data = {
enforced: this.enforced,
enforcedGroups: this.enforcedGroups,
- excludedGroups: this.excludedGroups
+ excludedGroups: this.excludedGroups,
}
axios.put(OC.generateUrl('/settings/api/admin/twofactorauth'), data)
.then(resp => resp.data)
@@ -150,8 +150,8 @@ export default {
console.error('could not save changes', err)
})
.then(() => { this.loading = false })
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/AppDetails.vue b/apps/settings/src/components/AppDetails.vue
index 4300ccf0673..c20819f297e 100644
--- a/apps/settings/src/components/AppDetails.vue
+++ b/apps/settings/src/components/AppDetails.vue
@@ -200,13 +200,13 @@ export default {
name: 'AppDetails',
components: {
Multiselect,
- AppScore
+ AppScore,
},
mixins: [AppManagement, PrefixMixin, SvgFilterMixin],
props: ['category', 'app'],
data() {
return {
- groupCheckedAppsData: false
+ groupCheckedAppsData: false,
}
},
computed: {
@@ -226,8 +226,8 @@ export default {
if (typeof this.app.author === 'string') {
return [
{
- '@value': this.app.author
- }
+ '@value': this.app.author,
+ },
]
}
if (this.app.author['@value']) {
@@ -244,10 +244,11 @@ export default {
.sort((a, b) => a.name.localeCompare(b.name))
},
renderMarkdown() {
- var renderer = new marked.Renderer()
+ const renderer = new marked.Renderer()
renderer.link = function(href, title, text) {
+ let prot
try {
- var prot = decodeURIComponent(unescape(href))
+ prot = decodeURIComponent(unescape(href))
.replace(/[^\w:]/g, '')
.toLowerCase()
} catch (e) {
@@ -258,7 +259,7 @@ export default {
return ''
}
- var out = '<a href="' + href + '" rel="noreferrer noopener"'
+ let out = '<a href="' + href + '" rel="noreferrer noopener"'
if (title) {
out += ' title="' + title + '"'
}
@@ -284,7 +285,7 @@ export default {
pedantic: false,
sanitize: true,
smartLists: true,
- smartypants: false
+ smartypants: false,
}),
{
SAFE_FOR_JQUERY: true,
@@ -297,17 +298,17 @@ export default {
'li',
'em',
'del',
- 'blockquote'
- ]
+ 'blockquote',
+ ],
}
)
- }
+ },
},
mounted() {
if (this.app.groups.length > 0) {
this.groupCheckedAppsData = true
}
- }
+ },
}
</script>
diff --git a/apps/settings/src/components/AppList.vue b/apps/settings/src/components/AppList.vue
index 3259011497a..2fecf137dd8 100644
--- a/apps/settings/src/components/AppList.vue
+++ b/apps/settings/src/components/AppList.vue
@@ -105,7 +105,7 @@ import pLimit from 'p-limit'
export default {
name: 'AppList',
components: {
- AppItem
+ AppItem,
},
mixins: [PrefixMixin],
props: ['category', 'app', 'search'],
@@ -123,7 +123,7 @@ export default {
return this.hasPendingUpdate && ['installed', 'updates'].includes(this.category)
},
apps() {
- let apps = this.$store.getters.getAllApps
+ const apps = this.$store.getters.getAllApps
.filter(app => app.name.toLowerCase().search(this.search.toLowerCase()) !== -1)
.sort(function(a, b) {
const sortStringA = '' + (a.active ? 0 : 1) + (a.update ? 0 : 1) + a.name
@@ -183,20 +183,20 @@ export default {
return (this.category === 'app-bundles')
},
allBundlesEnabled() {
- let self = this
+ const self = this
return function(id) {
return self.bundleApps(id).filter(app => !app.active).length === 0
}
},
bundleToggleText() {
- let self = this
+ const self = this
return function(id) {
if (self.allBundlesEnabled(id)) {
return t('settings', 'Disable all')
}
return t('settings', 'Enable all')
}
- }
+ },
},
methods: {
toggleBundle(id) {
@@ -206,7 +206,7 @@ export default {
return this.enableBundle(id)
},
enableBundle(id) {
- let apps = this.bundleApps(id).map(app => app.id)
+ const apps = this.bundleApps(id).map(app => app.id)
this.$store.dispatch('enableApp', { appId: apps, groups: [] })
.catch((error) => {
console.error(error)
@@ -214,7 +214,7 @@ export default {
})
},
disableBundle(id) {
- let apps = this.bundleApps(id).map(app => app.id)
+ const apps = this.bundleApps(id).map(app => app.id)
this.$store.dispatch('disableApp', { appId: apps, groups: [] })
.catch((error) => {
OC.Notification.show(error)
@@ -226,7 +226,7 @@ export default {
.filter(app => app.update)
.map(app => limit(() => this.$store.dispatch('updateApp', { appId: app.id }))
)
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/AppList/AppItem.vue b/apps/settings/src/components/AppList/AppItem.vue
index d6d27cc6f8c..d00c62910f7 100644
--- a/apps/settings/src/components/AppList/AppItem.vue
+++ b/apps/settings/src/components/AppList/AppItem.vue
@@ -114,7 +114,7 @@ import SvgFilterMixin from '../SvgFilterMixin'
export default {
name: 'AppItem',
components: {
- AppScore
+ AppScore,
},
mixins: [AppManagement, SvgFilterMixin],
props: {
@@ -122,24 +122,24 @@ export default {
category: {},
listView: {
type: Boolean,
- default: true
- }
+ default: true,
+ },
},
data() {
return {
isSelected: false,
- scrolled: false
+ scrolled: false,
}
},
computed: {
hasRating() {
return this.app.appstoreData && this.app.appstoreData.ratingNumOverall > 5
- }
+ },
},
watch: {
'$route.params.id': function(id) {
this.isSelected = (this.app.id === id)
- }
+ },
},
mounted() {
this.isSelected = (this.app.id === this.$route.params.id)
@@ -155,7 +155,7 @@ export default {
try {
await this.$router.push({
name: 'apps-details',
- params: { category: this.category, id: this.app.id }
+ params: { category: this.category, id: this.app.id },
})
} catch (e) {
// we already view this app
@@ -163,8 +163,8 @@ export default {
},
prefix(prefix, content) {
return prefix + '_' + content
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/AppList/AppScore.vue b/apps/settings/src/components/AppList/AppScore.vue
index 810a8b54e8f..f3ff80b7792 100644
--- a/apps/settings/src/components/AppList/AppScore.vue
+++ b/apps/settings/src/components/AppList/AppScore.vue
@@ -29,10 +29,10 @@ export default {
props: ['score'],
computed: {
scoreImage() {
- let score = Math.round(this.score * 10)
- let imageName = 'rating/s' + score + '.svg'
+ const score = Math.round(this.score * 10)
+ const imageName = 'rating/s' + score + '.svg'
return OC.imagePath('core', imageName)
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/AppManagement.vue b/apps/settings/src/components/AppManagement.vue
index 4de40728c5d..8d9ebed5e42 100644
--- a/apps/settings/src/components/AppManagement.vue
+++ b/apps/settings/src/components/AppManagement.vue
@@ -27,7 +27,7 @@ export default {
return this.app.groups.map(group => { return { id: group, name: group } })
},
loading() {
- let self = this
+ const self = this
return function(id) {
return self.$store.getters.loading(id)
}
@@ -59,7 +59,7 @@ export default {
return base + ' ' + t('settings', 'The app will be downloaded from the app store')
}
return base
- }
+ },
},
mounted() {
if (this.app.groups.length > 0) {
@@ -92,12 +92,12 @@ export default {
return true
},
addGroupLimitation(group) {
- let groups = this.app.groups.concat([]).concat([group.id])
+ const groups = this.app.groups.concat([]).concat([group.id])
this.$store.dispatch('enableApp', { appId: this.app.id, groups: groups })
},
removeGroupLimitation(group) {
- let currentGroups = this.app.groups.concat([])
- let index = currentGroups.indexOf(group.id)
+ const currentGroups = this.app.groups.concat([])
+ const index = currentGroups.indexOf(group.id)
if (index > -1) {
currentGroups.splice(index, 1)
}
@@ -132,7 +132,7 @@ export default {
this.$store.dispatch('updateApp', { appId: appId })
.then((response) => { OC.Settings.Apps.rebuildNavigation() })
.catch((error) => { OC.Notification.show(error) })
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/AuthToken.vue b/apps/settings/src/components/AuthToken.vue
index 034efc4b6a8..7486aa6089a 100644
--- a/apps/settings/src/components/AuthToken.vue
+++ b/apps/settings/src/components/AuthToken.vue
@@ -88,7 +88,7 @@
import {
Actions,
ActionButton,
- ActionCheckbox
+ ActionCheckbox,
} from 'nextcloud-vue'
const userAgentMap = {
@@ -114,7 +114,7 @@ const userAgentMap = {
// Mozilla/5.0 (U; Linux; Maemo; Jolla; Sailfish; like Android 4.3) AppleWebKit/538.1 (KHTML, like Gecko) WebPirate/2.0 like Mobile Safari/538.1 (compatible)
webPirate: /(Sailfish).*WebPirate\/(\d+)/,
// Mozilla/5.0 (Maemo; Linux; U; Jolla; Sailfish; Mobile; rv:31.0) Gecko/31.0 Firefox/31.0 SailfishBrowser/1.0
- sailfishBrowser: /(Sailfish).*SailfishBrowser\/(\d+)/
+ sailfishBrowser: /(Sailfish).*SailfishBrowser\/(\d+)/,
}
const nameMap = {
ie: t('setting', 'Internet Explorer'),
@@ -131,7 +131,7 @@ const nameMap = {
androidTalkClient: t('setting', 'Nextcloud Talk for Android'),
davDroid: 'DAVdroid',
webPirate: 'WebPirate',
- sailfishBrowser: 'SailfishBrowser'
+ sailfishBrowser: 'SailfishBrowser',
}
const iconMap = {
ie: 'icon-desktop',
@@ -148,7 +148,7 @@ const iconMap = {
androidTalkClient: 'icon-phone',
davDroid: 'icon-phone',
webPirate: 'icon-link',
- sailfishBrowser: 'icon-link'
+ sailfishBrowser: 'icon-link',
}
export default {
@@ -156,20 +156,20 @@ export default {
components: {
Actions,
ActionButton,
- ActionCheckbox
+ ActionCheckbox,
},
props: {
token: {
type: Object,
- required: true
- }
+ required: true,
+ },
},
data() {
return {
showMore: this.token.canScope || this.token.canDelete,
renaming: false,
newName: '',
- actionOpen: false
+ actionOpen: false,
}
},
computed: {
@@ -181,14 +181,14 @@ export default {
},
iconName() {
// pretty format sync client user agent
- let matches = this.token.name.match(/Mozilla\/5\.0 \((\w+)\) (?:mirall|csyncoC)\/(\d+\.\d+\.\d+)/)
+ const matches = this.token.name.match(/Mozilla\/5\.0 \((\w+)\) (?:mirall|csyncoC)\/(\d+\.\d+\.\d+)/)
let icon = ''
if (matches) {
/* eslint-disable-next-line */
this.token.name = t('settings', 'Sync client - {os}', {
os: matches[1],
- version: matches[2]
+ version: matches[2],
})
icon = 'icon-desktop'
}
@@ -196,7 +196,7 @@ export default {
// preserve title for cases where we format it further
const title = this.token.name
let name = this.token.name
- for (let client in userAgentMap) {
+ for (const client in userAgentMap) {
const matches = title.match(userAgentMap[client])
if (matches) {
if (matches[2] && matches[1]) { // version number and os
@@ -216,12 +216,12 @@ export default {
return {
icon,
- name
+ name,
}
},
wiping() {
return this.token.type === 2
- }
+ },
},
methods: {
startRename() {
@@ -248,8 +248,8 @@ export default {
wipe() {
this.actionOpen = false
this.$emit('wipe', this.token)
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/AuthTokenList.vue b/apps/settings/src/components/AuthTokenList.vue
index 65f42197eda..d0dfa6d92fc 100644
--- a/apps/settings/src/components/AuthTokenList.vue
+++ b/apps/settings/src/components/AuthTokenList.vue
@@ -47,22 +47,22 @@ import AuthToken from './AuthToken'
export default {
name: 'AuthTokenList',
components: {
- AuthToken
+ AuthToken,
},
props: {
tokens: {
type: Array,
- required: true
- }
+ required: true,
+ },
},
computed: {
sortedTokens() {
return this.tokens.slice().sort((t1, t2) => {
- var ts1 = parseInt(t1.lastActivity, 10)
- var ts2 = parseInt(t2.lastActivity, 10)
+ const ts1 = parseInt(t1.lastActivity, 10)
+ const ts2 = parseInt(t2.lastActivity, 10)
return ts2 - ts1
})
- }
+ },
},
methods: {
toggleScope(token, scope, value) {
@@ -80,8 +80,8 @@ export default {
onWipe(token) {
// Just pass it on
this.$emit('wipe', token)
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/AuthTokenSection.vue b/apps/settings/src/components/AuthTokenSection.vue
index 72fadcd2fe2..e6643903cdc 100644
--- a/apps/settings/src/components/AuthTokenSection.vue
+++ b/apps/settings/src/components/AuthTokenSection.vue
@@ -66,21 +66,21 @@ export default {
name: 'AuthTokenSection',
components: {
AuthTokenSetupDialogue,
- AuthTokenList
+ AuthTokenList,
},
props: {
tokens: {
type: Array,
- required: true
+ required: true,
},
canCreateToken: {
type: Boolean,
- required: true
- }
+ required: true,
+ },
},
data() {
return {
- baseUrl: OC.generateUrl('/settings/personal/authtokens')
+ baseUrl: OC.generateUrl('/settings/personal/authtokens'),
}
},
methods: {
@@ -88,7 +88,7 @@ export default {
console.debug('creating a new app token', name)
const data = {
- name
+ name,
}
return axios.post(this.baseUrl, data)
.then(resp => resp.data)
@@ -172,8 +172,8 @@ export default {
console.error('could not wipe app token', err)
OC.Notification.showTemporary(t('core', 'Error while wiping the device with the token'))
}
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/AuthTokenSetupDialogue.vue b/apps/settings/src/components/AuthTokenSetupDialogue.vue
index 22c867b3c96..0ffd0f25323 100644
--- a/apps/settings/src/components/AuthTokenSetupDialogue.vue
+++ b/apps/settings/src/components/AuthTokenSetupDialogue.vue
@@ -83,13 +83,13 @@ import confirmPassword from 'nextcloud-password-confirmation'
export default {
name: 'AuthTokenSetupDialogue',
components: {
- QR
+ QR,
},
props: {
add: {
type: Function,
- required: true
- }
+ required: true,
+ },
},
data() {
return {
@@ -101,30 +101,30 @@ export default {
passwordCopied: false,
showQR: false,
qrUrl: '',
- hoveringCopyButton: false
+ hoveringCopyButton: false,
}
},
computed: {
copyTooltipOptions() {
const base = {
hideOnTargetClick: false,
- trigger: 'manual'
+ trigger: 'manual',
}
if (this.passwordCopied) {
return {
...base,
content: t('core', 'Copied!'),
- show: true
+ show: true,
}
} else {
return {
...base,
content: t('core', 'Copy'),
- show: this.hoveringCopyButton
+ show: this.hoveringCopyButton,
}
}
- }
+ },
},
methods: {
selectInput(e) {
@@ -171,8 +171,8 @@ export default {
this.deviceName = ''
this.appPassword = ''
this.loginName = ''
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/PrefixMixin.vue b/apps/settings/src/components/PrefixMixin.vue
index e43063d25b0..cd37416b27f 100644
--- a/apps/settings/src/components/PrefixMixin.vue
+++ b/apps/settings/src/components/PrefixMixin.vue
@@ -26,7 +26,7 @@ export default {
methods: {
prefix(prefix, content) {
return prefix + '_' + content
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/SvgFilterMixin.vue b/apps/settings/src/components/SvgFilterMixin.vue
index eab5bee973b..228b574f3c4 100644
--- a/apps/settings/src/components/SvgFilterMixin.vue
+++ b/apps/settings/src/components/SvgFilterMixin.vue
@@ -25,16 +25,16 @@ export default {
name: 'SvgFilterMixin',
data() {
return {
- filterId: ''
+ filterId: '',
}
},
computed: {
filterUrl() {
return `url(#${this.filterId})`
- }
+ },
},
mounted() {
this.filterId = 'invertIconApps' + Math.floor((Math.random() * 100)) + new Date().getSeconds() + new Date().getMilliseconds()
- }
+ },
}
</script>
diff --git a/apps/settings/src/components/UserList.vue b/apps/settings/src/components/UserList.vue
index fc3ee47065a..0fb1d09fbf7 100644
--- a/apps/settings/src/components/UserList.vue
+++ b/apps/settings/src/components/UserList.vue
@@ -242,11 +242,11 @@ import Vue from 'vue'
const unlimitedQuota = {
id: 'none',
- label: t('settings', 'Unlimited')
+ label: t('settings', 'Unlimited'),
}
const defaultQuota = {
id: 'default',
- label: t('settings', 'Default quota')
+ label: t('settings', 'Default quota'),
}
const newUser = {
id: '',
@@ -258,8 +258,8 @@ const newUser = {
quota: defaultQuota,
language: {
code: 'en',
- name: t('settings', 'Default language')
- }
+ name: t('settings', 'Default language'),
+ },
}
export default {
@@ -267,25 +267,25 @@ export default {
components: {
userRow,
Multiselect,
- InfiniteLoading
+ InfiniteLoading,
},
props: {
users: {
type: Array,
- default: () => []
+ default: () => [],
},
showConfig: {
type: Object,
- required: true
+ required: true,
},
selectedGroup: {
type: String,
- default: null
+ default: null,
},
externalActions: {
type: Array,
- default: () => []
- }
+ default: () => [],
+ },
},
data() {
return {
@@ -293,11 +293,11 @@ export default {
defaultQuota,
loading: {
all: false,
- groups: false
+ groups: false,
},
scrolled: false,
searchQuery: '',
- newUser: Object.assign({}, newUser)
+ newUser: Object.assign({}, newUser),
}
},
computed: {
@@ -336,9 +336,9 @@ export default {
},
quotaOptions() {
// convert the preset array into objects
- let quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({
+ const quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({
id: cur,
- label: cur
+ label: cur,
}), [])
// add default presets
quotaPreset.unshift(this.unlimitedQuota)
@@ -363,14 +363,14 @@ export default {
return [
{
label: t('settings', 'Common languages'),
- languages: this.settings.languages.commonlanguages
+ languages: this.settings.languages.commonlanguages,
},
{
label: t('settings', 'All languages'),
- languages: this.settings.languages.languages
- }
+ languages: this.settings.languages.languages,
+ },
]
- }
+ },
},
watch: {
// watch url change and group select
@@ -394,7 +394,7 @@ export default {
} else if (val === 1 && old === 0) {
this.$refs.infiniteLoading.stateChanger.loaded()
}
- }
+ },
},
mounted() {
if (!this.settings.canChangePassword) {
@@ -429,7 +429,7 @@ export default {
*/
validateQuota(quota) {
// only used for new presets sent through @Tag
- let validQuota = OC.Util.computerFileSize(quota)
+ const validQuota = OC.Util.computerFileSize(quota)
if (validQuota !== null && validQuota >= 0) {
// unify format output
quota = OC.Util.humanFileSize(OC.Util.computerFileSize(quota))
@@ -446,7 +446,7 @@ export default {
offset: this.usersOffset,
limit: this.usersLimit,
group: this.selectedGroup !== 'disabled' ? this.selectedGroup : '',
- search: this.searchQuery
+ search: this.searchQuery,
})
.then((response) => {
response ? $state.loaded() : $state.complete()
@@ -494,7 +494,7 @@ export default {
groups: this.newUser.groups.map(group => group.id),
subadmin: this.newUser.subAdminsGroups.map(group => group.id),
quota: this.newUser.quota.id,
- language: this.newUser.language.code
+ language: this.newUser.language.code,
})
.then(() => {
this.resetForm()
@@ -517,7 +517,7 @@ export default {
setNewUserDefaultGroup(value) {
if (value && value.length > 0) {
// setting new user default group to the current selected one
- let currentGroup = this.groups.find(group => group.id === value)
+ const currentGroup = this.groups.find(group => group.id === value)
if (currentGroup) {
this.newUser.groups = [currentGroup]
return
@@ -560,7 +560,7 @@ export default {
this.$router.push({ name: 'users' })
this.$refs.infiniteLoading.stateChanger.reset()
}
- }
- }
+ },
+ },
}
</script>
diff --git a/apps/settings/src/components/UserList/UserRow.vue b/apps/settings/src/components/UserList/UserRow.vue
index c818cc3e733..39d98f46f97 100644
--- a/apps/settings/src/components/UserList/UserRow.vue
+++ b/apps/settings/src/components/UserList/UserRow.vue
@@ -241,7 +241,7 @@ import {
PopoverMenu,
Multiselect,
Actions,
- ActionButton
+ ActionButton,
} from 'nextcloud-vue'
import UserRowSimple from './UserRowSimple'
import UserRowMixin from '../../mixins/UserRowMixin'
@@ -255,45 +255,45 @@ export default {
PopoverMenu,
Actions,
ActionButton,
- Multiselect
+ Multiselect,
},
directives: {
- ClickOutside
+ ClickOutside,
},
mixins: [UserRowMixin],
props: {
user: {
type: Object,
- required: true
+ required: true,
},
settings: {
type: Object,
- default: () => ({})
+ default: () => ({}),
},
groups: {
type: Array,
- default: () => []
+ default: () => [],
},
subAdminsGroups: {
type: Array,
- default: () => []
+ default: () => [],
},
quotaOptions: {
type: Array,
- default: () => []
+ default: () => [],
},
showConfig: {
type: Object,
- default: () => ({})
+ default: () => ({}),
},
languages: {
type: Array,
- required: true
+ required: true,
},
externalActions: {
type: Array,
- default: () => []
- }
+ default: () => [],
+ },
},
data() {
return {
@@ -312,39 +312,39 @@ export default {
delete: false,
disable: false,
languages: false,
- wipe: false
- }
+ wipe: false,
+ },
}
},
computed: {
/* USER POPOVERMENU ACTIONS */
userActions() {
- let actions = [
+ const actions = [
{
icon: 'icon-delete',
text: t('settings', 'Delete user'),
- action: this.deleteUser
+ action: this.deleteUser,
},
{
icon: 'icon-delete',
text: t('settings', 'Wipe all devices'),
- action: this.wipeUserDevices
+ action: this.wipeUserDevices,
},
{
icon: this.user.enabled ? 'icon-close' : 'icon-add',
text: this.user.enabled ? t('settings', 'Disable user') : t('settings', 'Enable user'),
- action: this.enableDisableUser
- }
+ action: this.enableDisableUser,
+ },
]
if (this.user.email !== null && this.user.email !== '') {
actions.push({
icon: 'icon-mail',
text: t('settings', 'Resend welcome email'),
- action: this.sendWelcomeMail
+ action: this.sendWelcomeMail,
})
}
return actions.concat(this.externalActions)
- }
+ },
},
methods: {
@@ -357,7 +357,7 @@ export default {
},
wipeUserDevices() {
- let userid = this.user.id
+ const userid = this.user.id
OC.dialogs.confirmDestructive(
t('settings', 'In case of lost device or exiting the organization, this can remotely wipe the Nextcloud data from all devices associated with {userid}. Only works if the devices are connected to the internet.', { userid: userid }),
t('settings', 'Remote wipe of devices'),
@@ -365,7 +365,7 @@ export default {
type: OC.dialogs.YES_NO_BUTTONS,
confirm: t('settings', 'Wipe {userid}\'s devices', { userid: userid }),
confirmClasses: 'error',
- cancel: t('settings', 'Cancel')
+ cancel: t('settings', 'Cancel'),
},
(result) => {
if (result) {
@@ -383,7 +383,7 @@ export default {
},
deleteUser() {
- let userid = this.user.id
+ const userid = this.user.id
OC.dialogs.confirmDestructive(
t('settings', 'Fully delete {userid}\'s account including all their personal files, app data, etc.', { userid: userid }),
t('settings', 'Account deletion'),
@@ -391,7 +391,7 @@ export default {
type: OC.dialogs.YES_NO_BUTTONS,
confirm: t('settings', 'Delete {userid}\'s account', { userid: userid }),
confirmClasses: 'error',
- cancel: t('settings', 'Cancel')
+ cancel: t('settings', 'Cancel'),
},
(result) => {
if (result) {
@@ -411,11 +411,11 @@ export default {
enableDisableUser() {
this.loading.delete = true
this.loading.all = true
- let userid = this.user.id
- let enabled = !this.user.enabled
+ const userid = this.user.id
+ const enabled = !this.user.enabled
return this.$store.dispatch('enableDisableUser', {
userid,
- enabled
+ enabled,
})
.then(() => {
this.loading.delete = false
@@ -429,12 +429,12 @@ export default {
* @param {string} displayName The display name
*/
updateDisplayName() {
- let displayName = this.$refs.displayName.value
+ const displayName = this.$refs.displayName.value
this.loading.displayName = true
this.$store.dispatch('setUserData', {
userid: this.user.id,
key: 'displayname',
- value: displayName
+ value: displayName,
}).then(() => {
this.loading.displayName = false
this.$refs.displayName.value = displayName
@@ -447,12 +447,12 @@ export default {
* @param {string} password The email adress
*/
updatePassword() {
- let password = this.$refs.password.value
+ const password = this.$refs.password.value
this.loading.password = true
this.$store.dispatch('setUserData', {
userid: this.user.id,
key: 'password',
- value: password
+ value: password,
}).then(() => {
this.loading.password = false
this.$refs.password.value = '' // empty & show placeholder
@@ -465,12 +465,12 @@ export default {
* @param {string} mailAddress The email adress
*/
updateEmail() {
- let mailAddress = this.$refs.mailAddress.value
+ const mailAddress = this.$refs.mailAddress.value
this.loading.mailAddress = true
this.$store.dispatch('setUserData', {
userid: this.user.id,
key: 'email',
- value: mailAddress
+ value: mailAddress,
}).then(() => {
this.loading.mailAddress = false
this.$refs.mailAddress.value = mailAddress
@@ -486,7 +486,7 @@ export default {
this.loading = { groups: true, subadmins: true }
try {
await this.$store.dispatch('addGroup', gid)
- let userid = this.user.id
+ const userid = this.user.id
await this.$store.dispatch('addUserGroup', { userid, gid })
} catch (error) {
console.error(error)
@@ -506,8 +506,8 @@ export default {
return false
}
this.loading.groups = true
- let userid = this.user.id
- let gid = group.id
+ const userid = this.user.id
+ const gid = group.id
try {
await this.$store.dispatch('addUserGroup', { userid, gid })
} catch (error) {
@@ -528,13 +528,13 @@ export default {
}
this.loading.groups = true
- let userid = this.user.id
- let gid = group.id
+ const userid = this.user.id
+ const gid = group.id
try {
await this.$store.dispatch('removeUserGroup', {
userid,
- gid
+ gid,
})
this.loading.groups = false
// remove user from current list if current list is the removed group
@@ -553,13 +553,13 @@ export default {
*/
async addUserSubAdmin(group) {
this.loading.subadmins = true
- let userid = this.user.id
- let gid = group.id
+ const userid = this.user.id
+ const gid = group.id
try {
await this.$store.dispatch('addUserSubAdmin', {
userid,
- gid
+ gid,
})
this.loading.subadmins = false
} catch (error) {
@@ -574,13 +574,13 @@ export default {
*/
async removeUserSubAdmin(group) {
this.loading.subadmins = true
- let userid = this.user.id
- let gid = group.id
+ const userid = this.user.id
+ const gid = group.id
try {
await this.$store.dispatch('removeUserSubAdmin', {
userid,
- gid
+ gid,
})
} catch (error) {
console.error(error)
@@ -604,7 +604,7 @@ export default {
await this.$store.dispatch('setUserData', {
userid: this.user.id,
key: 'quota',
- value: quota
+ value: quota,
})
} catch (error) {
console.error(error)
@@ -622,7 +622,7 @@ export default {
*/
validateQuota(quota) {
// only used for new presets sent through @Tag
- let validQuota = OC.Util.computerFileSize(quota)
+ const validQuota = OC.Util.computerFileSize(quota)
if (validQuota !== null && validQuota >= 0) {
// unify format output
return this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota)))
@@ -644,7 +644,7 @@ export default {
await this.$store.dispatch('setUserData', {
userid: this.user.id,
key: 'language',
- value: lang.code
+ value: lang.code,
})
} catch (error) {
console.error(error)
@@ -670,8 +670,8 @@ export default {
}
this.loading.all = false
})
- }
+ },
- }
+ },
}
</script>
diff --git a/apps/settings/src/components/UserList/UserRowSimple.vue b/apps/settings/src/components/UserList/UserRowSimple.vue
index 247bfb063ce..008fcc557f3 100644
--- a/apps/settings/src/components/UserList/UserRowSimple.vue
+++ b/apps/settings/src/components/UserList/UserRowSimple.vue
@@ -81,45 +81,45 @@ export default {
components: {
PopoverMenu,
ActionButton,
- Actions
+ Actions,
},
directives: {
- ClickOutside
+ ClickOutside,
},
mixins: [UserRowMixin],
props: {
user: {
type: Object,
- required: true
+ required: true,
},
loading: {
type: Object,
- required: true
+ required: true,
},
showConfig: {
type: Object,
- required: true
+ required: true,
},
userActions: {
type: Array,
- required: true
+ required: true,
},
openedMenu: {
type: Boolean,
- required: true
+ required: true,
},
feedbackMessage: {
type: String,
- required: true
+ required: true,
},
subAdminsGroups: {
type: Array,
- required: true
+ required: true,
},
settings: {
type: Object,
- required: true
- }
+ required: true,
+ },
},
computed: {
userGroupsLabels() {
@@ -140,7 +140,7 @@ export default {
},
canEdit() {
return getCurrentUser().uid !== this.user.id && this.user.id !== 'admin'
- }
+ },
},
methods: {
@@ -149,8 +149,8 @@ export default {
},
toggleEdit() {
this.$emit('update:editing', true)
- }
- }
+ },
+ },
}
</script>