Skip to content

Commit 433dd70

Browse files
committed
fix design
Signed-off-by: Greta Doci <[email protected]>
1 parent 2cdbe3a commit 433dd70

File tree

10 files changed

+66
-10454
lines changed

10 files changed

+66
-10454
lines changed

apps/settings/src/components/UserList.vue

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
<div id="headerAvatar" class="avatar" />
2727
<div id="headerName" class="name">
2828
{{ t('settings', 'Username') }}
29-
</div>
30-
<div id="headerDisplayName" class="displayName">
31-
{{ t('settings', 'Display name') }}
29+
30+
<div id="subtitle" class="subtitle">
31+
{{ t('settings', 'Display name') }}
32+
</div>
3233
</div>
3334
<div id="headerPassword" class="password">
3435
{{ t('settings', 'Password') }}
@@ -377,9 +378,9 @@ export default {
377378
// deleting the last user, reset the list
378379
if (val === 0 && old === 1) {
379380
this.$refs.infiniteLoading.stateChanger.reset()
380-
// adding the first user, warn the infiniteLoader that
381-
// the list is not empty anymore (we don't fetch the newly
382-
// added user as we already have all the info we need)
381+
// adding the first user, warn the infiniteLoader that
382+
// the list is not empty anymore (we don't fetch the newly
383+
// added user as we already have all the info we need)
383384
} else if (val === 1 && old === 0) {
384385
this.$refs.infiniteLoading.stateChanger.loaded()
385386
}
@@ -391,18 +392,18 @@ export default {
391392
}
392393
393394
/**
394-
* Reset and init new user form
395-
*/
395+
* Reset and init new user form
396+
*/
396397
this.resetForm()
397398
398399
/**
399-
* Register search
400-
*/
400+
* Register search
401+
*/
401402
this.userSearch = new OCA.Search(this.search, this.resetSearch)
402403
403404
/**
404-
* If disabled group but empty, redirect
405-
*/
405+
* If disabled group but empty, redirect
406+
*/
406407
this.redirectIfDisabled()
407408
},
408409
methods: {
@@ -411,11 +412,11 @@ export default {
411412
},
412413
413414
/**
414-
* Validate quota string to make sure it's a valid human file size
415-
*
416-
* @param {string} quota Quota in readable format '5 GB'
417-
* @returns {Object}
418-
*/
415+
* Validate quota string to make sure it's a valid human file size
416+
*
417+
* @param {string} quota Quota in readable format '5 GB'
418+
* @returns {Object}
419+
*/
419420
validateQuota(quota) {
420421
// only used for new presets sent through @Tag
421422
let validQuota = OC.Util.computerFileSize(quota)
@@ -455,18 +456,18 @@ export default {
455456
this.newUser = Object.assign({}, newUser)
456457
457458
/**
458-
* Init default language from server data. The use of this.settings
459-
* requires a computed variable, which break the v-model binding of the form,
460-
* this is a much easier solution than getter and setter on a computed var
461-
*/
459+
* Init default language from server data. The use of this.settings
460+
* requires a computed variable, which break the v-model binding of the form,
461+
* this is a much easier solution than getter and setter on a computed var
462+
*/
462463
if (this.settings.defaultLanguage) {
463464
Vue.set(this.newUser.language, 'code', this.settings.defaultLanguage)
464465
}
465466
466467
/**
467-
* In case the user directly loaded the user list within a group
468-
* the watch won't be triggered. We need to initialize it.
469-
*/
468+
* In case the user directly loaded the user list within a group
469+
* the watch won't be triggered. We need to initialize it.
470+
*/
470471
this.setNewUserDefaultGroup(this.selectedGroup)
471472
472473
this.loading.all = false
@@ -492,10 +493,10 @@ export default {
492493
if (error.response && error.response.data && error.response.data.ocs && error.response.data.ocs.meta) {
493494
const statuscode = error.response.data.ocs.meta.statuscode
494495
if (statuscode === 102) {
495-
// wrong username
496+
// wrong username
496497
this.$refs.newusername.focus()
497498
} else if (statuscode === 107) {
498-
// wrong password
499+
// wrong password
499500
this.$refs.newuserpassword.focus()
500501
}
501502
}
@@ -515,11 +516,11 @@ export default {
515516
},
516517
517518
/**
518-
* Create a new group
519-
*
520-
* @param {string} gid Group id
521-
* @returns {Promise}
522-
*/
519+
* Create a new group
520+
*
521+
* @param {string} gid Group id
522+
* @returns {Promise}
523+
*/
523524
createGroup(gid) {
524525
this.loading.groups = true
525526
this.$store.dispatch('addGroup', gid)
@@ -534,15 +535,15 @@ export default {
534535
},
535536
536537
/**
537-
* If the selected group is the disabled group but the count is 0
538-
* redirect to the all users page.
539-
* * we only check for 0 because we don't have the count on ldap
540-
* * and we therefore set the usercount to -1 in this specific case
541-
*/
538+
* If the selected group is the disabled group but the count is 0
539+
* redirect to the all users page.
540+
* * we only check for 0 because we don't have the count on ldap
541+
* * and we therefore set the usercount to -1 in this specific case
542+
*/
542543
redirectIfDisabled() {
543544
const allGroups = this.$store.getters.getGroups
544545
if (this.selectedGroup === 'disabled'
545-
&& allGroups.findIndex(group => group.id === 'disabled' && group.usercount === 0) > -1) {
546+
&& allGroups.findIndex(group => group.id === 'disabled' && group.usercount === 0) > -1) {
546547
// disabled group is empty, redirection to all users
547548
this.$router.push({ name: 'users' })
548549
this.$refs.infiniteLoading.stateChanger.reset()

apps/settings/src/components/UserList/UserRow.vue

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,32 @@
5555
<!-- dirty hack to ellipsis on two lines -->
5656
<div class="name">
5757
{{ user.id }}
58-
</div>
59-
<form class="displayName" :class="{'icon-loading-small': loading.displayName}" @submit.prevent="updateDisplayName">
60-
<template v-if="user.backendCapabilities.setDisplayName">
61-
<input v-if="user.backendCapabilities.setDisplayName"
62-
:id="'displayName'+user.id+rand"
63-
ref="displayName"
64-
type="text"
65-
:disabled="loading.displayName||loading.all"
66-
:value="user.displayname"
67-
autocomplete="new-password"
68-
autocorrect="off"
69-
autocapitalize="off"
70-
spellcheck="false">
71-
<input v-if="user.backendCapabilities.setDisplayName"
72-
type="submit"
73-
class="icon-confirm"
74-
value="">
75-
</template>
76-
<div v-else v-tooltip.auto="t('settings', 'The backend does not support changing the display name')" class="name">
58+
<div class="displayName">
59+
<form v-if="false"
60+
class="displayName"
61+
:class="{'icon-loading-small': loading.displayName}"
62+
@submit.prevent="updateDisplayName">
63+
<template v-if="user.backendCapabilities.setDisplayName">
64+
<input
65+
:id="'displayName'+user.id+rand"
66+
ref="displayName"
67+
type="text"
68+
:disabled="loading.displayName||loading.all"
69+
:value="user.displayname"
70+
autocomplete="new-password"
71+
autocorrect="off"
72+
autocapitalize="off"
73+
spellcheck="false">
74+
<input
75+
type="submit"
76+
class="icon-confirm"
77+
value="">
78+
</template>
79+
<div v-else v-tooltip.auto="t('settings', 'The backend does not support changing the display name')" class="name" />
80+
</form>
7781
{{ user.displayname }}
7882
</div>
79-
</form>
83+
</div>
8084
<form v-if="settings.canChangePassword && user.backendCapabilities.setPassword"
8185
class="password"
8286
:class="{'icon-loading-small': loading.password}"
@@ -516,10 +520,10 @@ export default {
516520
},
517521
518522
/**
519-
* Create a new group and add user to it
520-
*
521-
* @param {string} gid Group id
522-
*/
523+
* Create a new group and add user to it
524+
*
525+
* @param {string} gid Group id
526+
*/
523527
async createGroup(gid) {
524528
this.loading = { groups: true, subadmins: true }
525529
try {

0 commit comments

Comments
 (0)