Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User management polishing #10283

Merged
merged 9 commits into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 13 additions & 21 deletions settings/css/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1404,8 +1404,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
align-items: center;
/* let's define the column until storage path,
what follows will be manually defined */
grid-template-columns: 44px;
grid-auto-columns: min-content;
grid-template-columns: 44px minmax(150px, 1fr) repeat(auto-fit, minmax(120px, 1fr)) 44px;
border-top: var(--color-border) 1px solid;
&.disabled {
opacity: .5;
Expand All @@ -1414,31 +1413,24 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
/* grid col width */
.name,
.displayName,
.password {
width: 150px;
}
.password,
.mailAddress,
.groups,
.subadmins {
width: 200px;
}
.quota {
width: 150px;
}
.languages {
width: 200px;
}
.storageLocation {
width: 250px;
}
.subadmins,
.quota,
.languages,
.storageLocation,
.userBackend,
.lastLogin {
width: 100px;
min-width: 120px;
}
.obfuscated {
width: 400px;
opacity: .7;
}
.userActions {
min-width: 44px;
}

/* various */
&#grid-header,
Expand All @@ -1465,7 +1457,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
top: $grid-row-height;
}
&#grid-header {
color: var(--color-background-darker);
color: var(--color-text-light);
z-index: 60; /* above new-user */
}
&:hover {
Expand All @@ -1478,7 +1470,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
grid-row: 1;
display: inline-flex;
align-items: center;
color: var(--color-text-lighter);
color: var(--color-text);
position: relative;
> input:not(:focus):not(:active) {
border-color: transparent;
Expand Down Expand Up @@ -1507,7 +1499,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
&.storageLocation {
/* better multi-line visual */
line-height: 1.3em;
max-height: 2.6em;
max-height: 100%;
overflow : hidden;
/* not supported by all browsers
so we keep the overflow hidden
Expand Down
2 changes: 1 addition & 1 deletion settings/js/settings-vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/settings-vue.js.map

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions settings/src/components/userList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
<div class="row" id="grid-header" :class="{'sticky': scrolled && !showConfig.showNewUserForm}">
<div id="headerAvatar" class="avatar"></div>
<div id="headerName" class="name">{{ t('settings', 'Username') }}</div>
<div id="headerDisplayName" class="displayName">{{ t('settings', 'Full name') }}</div>
<div id="headerDisplayName" class="displayName">{{ t('settings', 'Display name') }}</div>
<div id="headerPassword" class="password">{{ t('settings', 'Password') }}</div>
<div id="headerAddress" class="mailAddress">{{ t('settings', 'Email') }}</div>
<div id="headerGroups" class="groups">{{ t('settings', 'Groups') }}</div>
<div id="headerSubAdmins" class="subadmins"
v-if="subAdminsGroups.length>0 && settings.isAdmin">{{ t('settings', 'Group admin for') }}</div>
<div id="headerQuota" class="quota">{{ t('settings', 'Quota') }}</div>
<div id="headerLanguages" class="languages"
v-if="showConfig.showLanguages">{{ t('settings', 'Languages') }}</div>
v-if="showConfig.showLanguages">{{ t('settings', 'Language') }}</div>
<div class="headerStorageLocation storageLocation"
v-if="showConfig.showStoragePath">{{ t('settings', 'Storage location') }}</div>
<div class="headerUserBackend userBackend"
Expand All @@ -49,7 +49,7 @@
<div :class="loading?'icon-loading-small':'icon-add'"></div>
<div class="name">
<input id="newusername" type="text" required v-model="newUser.id"
:placeholder="t('settings', 'User name')" name="username"
:placeholder="t('settings', 'Username')" name="username"
autocomplete="off" autocapitalize="none" autocorrect="off"
pattern="[a-zA-Z0-9 _\.@\-']+">
</div>
Expand All @@ -68,7 +68,7 @@
<div class="mailAddress">
<input id="newemail" type="email" v-model="newUser.mailAddress"
:required="newUser.password===''"
:placeholder="t('settings', 'Mail address')" name="email"
:placeholder="t('settings', 'Email')" name="email"
autocomplete="off" autocapitalize="none" autocorrect="off">
</div>
<div class="groups">
Expand Down Expand Up @@ -115,16 +115,14 @@
<div class="userActions">
<input type="submit" id="newsubmit" class="button primary icon-checkmark-white has-tooltip"
value="" :title="t('settings', 'Add a new user')">
<input type="reset" id="newreset" class="button icon-close has-tooltip" @click="resetForm"
value="" :title="t('settings', 'Cancel and reset the form')">
</div>
</form>

<user-row v-for="(user, key) in filteredUsers" :user="user" :key="key" :settings="settings" :showConfig="showConfig"
:groups="groups" :subAdminsGroups="subAdminsGroups" :quotaOptions="quotaOptions" :languages="languages" />
<infinite-loading @infinite="infiniteHandler" ref="infiniteLoading">
<div slot="spinner"><div class="users-icon-loading icon-loading"></div></div>
<div slot="no-more"><div class="users-list-end">— {{t('settings', 'no more results')}} —</div></div>
<div slot="no-more"><div class="users-list-end"></div></div>
<div slot="no-results">
<div id="emptycontent">
<div class="icon-contacts-dark"></div>
Expand Down
15 changes: 10 additions & 5 deletions settings/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,16 @@ export default {
}

// Add separator
let separator = {
caption: true,
text: t('settings', 'Groups')
};
groups.unshift(separator);
let realGroups = groups.find((group) => {return group.id !== 'disabled' && group.id !== 'admin'});
realGroups = typeof realGroups === 'undefined' ? [] : realGroups;
realGroups = Array.isArray(realGroups) ? realGroups : [realGroups];
if (realGroups.length > 0) {
let separator = {
caption: true,
text: t('settings', 'Groups')
};
groups.unshift(separator);
}


// Add everyone group
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Feature: users
And I open the settings
And I see that the settings are opened
When I toggle the showLanguages checkbox in the settings
Then I see that the "Languages" column is shown
Then I see that the "Language" column is shown
When I toggle the showLastLogin checkbox in the settings
Then I see that the "Last login" column is shown
When I toggle the showStoragePath checkbox in the settings
Expand Down