Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
a958eacd
Commit
a958eacd
authored
5 years ago
by
GretaD
Committed by
Julius Härtl
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add close button
Signed-off-by:
GretaD
<
gretadoci@gmail.com
>
parent
b5f4146d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/settings/src/components/UserList.vue
+36
-24
36 additions, 24 deletions
apps/settings/src/components/UserList.vue
with
36 additions
and
24 deletions
apps/settings/src/components/UserList.vue
+
36
−
24
View file @
a958eacd
...
@@ -152,6 +152,13 @@
...
@@ -152,6 +152,13 @@
class=
"button primary icon-checkmark-white has-tooltip"
class=
"button primary icon-checkmark-white has-tooltip"
type=
"submit"
type=
"submit"
value=
""
>
value=
""
>
<div
class=
"closeButton"
>
<Actions>
<ActionButton
icon=
"icon-close"
@
click=
"onClose"
>
{{
t
(
'
settings
'
,
'
Close
'
)
}}
</ActionButton>
</Actions>
</div>
</div>
</div>
</form>
</form>
<div
id=
"grid-header"
<div
id=
"grid-header"
...
@@ -235,17 +242,17 @@
...
@@ -235,17 +242,17 @@
<
script
>
<
script
>
import
userRow
from
'
./UserList/UserRow
'
import
userRow
from
'
./UserList/UserRow
'
import
{
Multiselect
}
from
'
nextcloud-vue
'
import
{
Multiselect
,
Actions
,
ActionButton
}
from
'
nextcloud-vue
'
import
InfiniteLoading
from
'
vue-infinite-loading
'
import
InfiniteLoading
from
'
vue-infinite-loading
'
import
Vue
from
'
vue
'
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
:
''
,
...
@@ -257,8 +264,8 @@ const newUser = {
...
@@ -257,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
{
...
@@ -267,24 +274,26 @@ export default {
...
@@ -267,24 +274,26 @@ export default {
userRow
,
userRow
,
Multiselect
,
Multiselect
,
InfiniteLoading
,
InfiniteLoading
,
Actions
,
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
{
...
@@ -292,11 +301,11 @@ export default {
...
@@ -292,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
:
{
...
@@ -335,9 +344,9 @@ export default {
...
@@ -335,9 +344,9 @@ export default {
},
},
quotaOptions
()
{
quotaOptions
()
{
// convert the preset array into objects
// convert the preset array into objects
cons
t
quotaPreset
=
this
.
settings
.
quotaPreset
.
reduce
((
acc
,
cur
)
=>
acc
.
concat
({
le
t
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
)
...
@@ -362,14 +371,14 @@ export default {
...
@@ -362,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
...
@@ -393,7 +402,7 @@ export default {
...
@@ -393,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
)
{
...
@@ -428,7 +437,7 @@ export default {
...
@@ -428,7 +437,7 @@ export default {
*/
*/
validateQuota
(
quota
)
{
validateQuota
(
quota
)
{
// only used for new presets sent through @Tag
// only used for new presets sent through @Tag
cons
t
validQuota
=
OC
.
Util
.
computerFileSize
(
quota
)
le
t
validQuota
=
OC
.
Util
.
computerFileSize
(
quota
)
if
(
validQuota
!==
null
&&
validQuota
>=
0
)
{
if
(
validQuota
!==
null
&&
validQuota
>=
0
)
{
// unify format output
// unify format output
quota
=
OC
.
Util
.
humanFileSize
(
OC
.
Util
.
computerFileSize
(
quota
))
quota
=
OC
.
Util
.
humanFileSize
(
OC
.
Util
.
computerFileSize
(
quota
))
...
@@ -445,7 +454,7 @@ export default {
...
@@ -445,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
()
...
@@ -493,7 +502,7 @@ export default {
...
@@ -493,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
()
...
@@ -516,7 +525,7 @@ export default {
...
@@ -516,7 +525,7 @@ export default {
setNewUserDefaultGroup
(
value
)
{
setNewUserDefaultGroup
(
value
)
{
if
(
value
&&
value
.
length
>
0
)
{
if
(
value
&&
value
.
length
>
0
)
{
// setting new user default group to the current selected one
// setting new user default group to the current selected one
cons
t
currentGroup
=
this
.
groups
.
find
(
group
=>
group
.
id
===
value
)
le
t
currentGroup
=
this
.
groups
.
find
(
group
=>
group
.
id
===
value
)
if
(
currentGroup
)
{
if
(
currentGroup
)
{
this
.
newUser
.
groups
=
[
currentGroup
]
this
.
newUser
.
groups
=
[
currentGroup
]
return
return
...
@@ -560,6 +569,9 @@ export default {
...
@@ -560,6 +569,9 @@ export default {
this
.
$refs
.
infiniteLoading
.
stateChanger
.
reset
()
this
.
$refs
.
infiniteLoading
.
stateChanger
.
reset
()
}
}
},
},
},
onClose
()
{
this
.
showConfig
.
showNewUserForm
=
false
}
}
}
}
</
script
>
</
script
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment