Skip to content

Commit b64291e

Browse files
committed
feat: remove password column, widen groups column
Signed-off-by: mykh-hailo <kristianderonta0205@gmail.com>
1 parent 053f725 commit b64291e

File tree

5 files changed

+13
-59
lines changed

5 files changed

+13
-59
lines changed

apps/settings/src/components/UserList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</template>
5151

5252
<template #header>
53-
<UserListHeader :has-obfuscated="hasObfuscated" />
53+
<UserListHeader />
5454
</template>
5555

5656
<template #footer>
@@ -410,4 +410,4 @@ export default {
410410
}
411411
}
412412
}
413-
</style>
413+
</style>

apps/settings/src/components/Users/UserListHeader.vue

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,14 @@
2929
{{ t('settings', 'Account name') }}
3030
</span>
3131
</th>
32-
<th
33-
class="header__cell"
34-
:class="{ 'header__cell--obfuscated': hasObfuscated }"
35-
data-cy-user-list-header-password
36-
scope="col">
37-
<span>{{ passwordLabel }}</span>
38-
</th>
3932
<th
4033
class="header__cell"
4134
data-cy-user-list-header-email
4235
scope="col">
4336
<span>{{ t('settings', 'Email') }}</span>
4437
</th>
4538
<th
46-
class="header__cell header__cell--large"
39+
class="header__cell header__cell--groups"
4740
data-cy-user-list-header-groups
4841
scope="col">
4942
<span>{{ t('settings', 'Groups') }}</span>
@@ -121,13 +114,6 @@ import Vue from 'vue'
121114
export default Vue.extend({
122115
name: 'UserListHeader',
123116
124-
props: {
125-
hasObfuscated: {
126-
type: Boolean,
127-
required: true,
128-
},
129-
},
130-
131117
computed: {
132118
showConfig() {
133119
// @ts-expect-error: allow untyped $store
@@ -138,14 +124,6 @@ export default Vue.extend({
138124
// @ts-expect-error: allow untyped $store
139125
return this.$store.getters.getServerData
140126
},
141-
142-
passwordLabel(): string {
143-
if (this.hasObfuscated) {
144-
// TRANSLATORS This string is for a column header labelling either a password or a message that the current user has insufficient permissions
145-
return t('settings', 'Password or insufficient permissions message')
146-
}
147-
return t('settings', 'Password')
148-
},
149127
},
150128
151129
methods: {

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

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -49,36 +49,6 @@
4949
<span class="row__subtitle">{{ user.id }}</span>
5050
</td>
5151

52-
<td
53-
data-cy-user-list-cell-password
54-
class="row__cell"
55-
:class="{ 'row__cell--obfuscated': hasObfuscated }">
56-
<template v-if="editing && settings.canChangePassword && user.backendCapabilities.setPassword">
57-
<NcTextField
58-
v-model="editedPassword"
59-
class="user-row-text-field"
60-
data-cy-user-list-input-password
61-
:data-loading="loading.password || undefined"
62-
:trailing-button-label="t('settings', 'Submit')"
63-
:class="{ 'icon-loading-small': loading.password }"
64-
:show-trailing-button="true"
65-
:disabled="loading.password || isLoadingField"
66-
:minlength="minPasswordLength"
67-
maxlength="469"
68-
:label="t('settings', 'Set new password')"
69-
trailing-button-icon="arrowEnd"
70-
autocapitalize="off"
71-
autocomplete="new-password"
72-
required
73-
spellcheck="false"
74-
type="password"
75-
@trailing-button-click="updatePassword" />
76-
</template>
77-
<span v-else-if="isObfuscated">
78-
{{ t('settings', 'You do not have permissions to see the details of this account') }}
79-
</span>
80-
</td>
81-
8252
<td class="row__cell" data-cy-user-list-cell-email>
8353
<template v-if="editing">
8454
<NcTextField
@@ -105,7 +75,7 @@
10575
</span>
10676
</td>
10777

108-
<td class="row__cell row__cell--large row__cell--multiline" data-cy-user-list-cell-groups>
78+
<td class="row__cell row__cell--groups row__cell--multiline" data-cy-user-list-cell-groups>
10979
<template v-if="editing">
11080
<label
11181
class="hidden-visually"
@@ -1080,4 +1050,4 @@ export default {
10801050
}
10811051
}
10821052
}
1083-
</style>
1053+
</style>

apps/settings/src/components/Users/VirtualList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export default Vue.extend({
157157
--cell-padding: 7px;
158158
--cell-width: 200px;
159159
--cell-width-large: 300px;
160+
--cell-width-groups: 380px;
160161
--cell-min-width: calc(var(--cell-width) - (2 * var(--cell-padding)));
161162
--sticky-column-z-index: calc(var(--vs-dropdown-z-index) + 1); // Keep the sticky column on top of the select dropdown
162163
@@ -188,4 +189,4 @@ export default Vue.extend({
188189
width: 100%;
189190
}
190191
}
191-
</style>
192+
</style>

apps/settings/src/components/Users/shared/styles.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
@mixin row {
6+
@mixin row {
77
position: relative;
88
display: flex;
99
min-width: 100%;
@@ -79,6 +79,11 @@
7979
width: var(--cell-width-large);
8080
}
8181

82+
&--groups {
83+
min-width: var(--cell-width-groups);
84+
width: var(--cell-width-groups);
85+
}
86+
8287
&--obfuscated {
8388
min-width: 400px;
8489
width: 400px;

0 commit comments

Comments
 (0)