Fix eslint errors in settings
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
0cff56b449
commit
011d70d882
|
@ -248,11 +248,11 @@ import Vue from 'vue'
|
||||||
|
|
||||||
const unlimitedQuota = {
|
const unlimitedQuota = {
|
||||||
id: 'none',
|
id: 'none',
|
||||||
label: t('settings', 'Unlimited')
|
label: t('settings', 'Unlimited'),
|
||||||
}
|
}
|
||||||
const defaultQuota = {
|
const defaultQuota = {
|
||||||
id: 'default',
|
id: 'default',
|
||||||
label: t('settings', 'Default quota')
|
label: t('settings', 'Default quota'),
|
||||||
}
|
}
|
||||||
const newUser = {
|
const newUser = {
|
||||||
id: '',
|
id: '',
|
||||||
|
@ -264,8 +264,8 @@ const newUser = {
|
||||||
quota: defaultQuota,
|
quota: defaultQuota,
|
||||||
language: {
|
language: {
|
||||||
code: 'en',
|
code: 'en',
|
||||||
name: t('settings', 'Default language')
|
name: t('settings', 'Default language'),
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -275,25 +275,25 @@ export default {
|
||||||
Multiselect,
|
Multiselect,
|
||||||
InfiniteLoading,
|
InfiniteLoading,
|
||||||
Actions,
|
Actions,
|
||||||
ActionButton
|
ActionButton,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
users: {
|
users: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
showConfig: {
|
showConfig: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
selectedGroup: {
|
selectedGroup: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null,
|
||||||
},
|
},
|
||||||
externalActions: {
|
externalActions: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -301,11 +301,11 @@ export default {
|
||||||
defaultQuota,
|
defaultQuota,
|
||||||
loading: {
|
loading: {
|
||||||
all: false,
|
all: false,
|
||||||
groups: false
|
groups: false,
|
||||||
},
|
},
|
||||||
scrolled: false,
|
scrolled: false,
|
||||||
searchQuery: '',
|
searchQuery: '',
|
||||||
newUser: Object.assign({}, newUser)
|
newUser: Object.assign({}, newUser),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -344,9 +344,9 @@ export default {
|
||||||
},
|
},
|
||||||
quotaOptions() {
|
quotaOptions() {
|
||||||
// convert the preset array into objects
|
// 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,
|
id: cur,
|
||||||
label: cur
|
label: cur,
|
||||||
}), [])
|
}), [])
|
||||||
// add default presets
|
// add default presets
|
||||||
quotaPreset.unshift(this.unlimitedQuota)
|
quotaPreset.unshift(this.unlimitedQuota)
|
||||||
|
@ -371,14 +371,14 @@ export default {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: t('settings', 'Common languages'),
|
label: t('settings', 'Common languages'),
|
||||||
languages: this.settings.languages.commonlanguages
|
languages: this.settings.languages.commonlanguages,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('settings', 'All languages'),
|
label: t('settings', 'All languages'),
|
||||||
languages: this.settings.languages.languages
|
languages: this.settings.languages.languages,
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// watch url change and group select
|
// watch url change and group select
|
||||||
|
@ -402,7 +402,7 @@ export default {
|
||||||
} else if (val === 1 && old === 0) {
|
} else if (val === 1 && old === 0) {
|
||||||
this.$refs.infiniteLoading.stateChanger.loaded()
|
this.$refs.infiniteLoading.stateChanger.loaded()
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (!this.settings.canChangePassword) {
|
if (!this.settings.canChangePassword) {
|
||||||
|
@ -454,7 +454,7 @@ export default {
|
||||||
offset: this.usersOffset,
|
offset: this.usersOffset,
|
||||||
limit: this.usersLimit,
|
limit: this.usersLimit,
|
||||||
group: this.selectedGroup !== 'disabled' ? this.selectedGroup : '',
|
group: this.selectedGroup !== 'disabled' ? this.selectedGroup : '',
|
||||||
search: this.searchQuery
|
search: this.searchQuery,
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
response ? $state.loaded() : $state.complete()
|
response ? $state.loaded() : $state.complete()
|
||||||
|
@ -502,7 +502,7 @@ export default {
|
||||||
groups: this.newUser.groups.map(group => group.id),
|
groups: this.newUser.groups.map(group => group.id),
|
||||||
subadmin: this.newUser.subAdminsGroups.map(group => group.id),
|
subadmin: this.newUser.subAdminsGroups.map(group => group.id),
|
||||||
quota: this.newUser.quota.id,
|
quota: this.newUser.quota.id,
|
||||||
language: this.newUser.language.code
|
language: this.newUser.language.code,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
|
@ -571,7 +571,7 @@ export default {
|
||||||
},
|
},
|
||||||
onClose() {
|
onClose() {
|
||||||
this.showConfig.showNewUserForm = false
|
this.showConfig.showNewUserForm = false
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue