Merge pull request #10283 from nextcloud/bugfix/10094/user-management

User management polishing
This commit is contained in:
Morris Jobke 2018-07-20 17:31:10 +02:00 committed by GitHub
commit 700aafb3ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 36 deletions

View file

@ -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;
@ -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,
@ -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 {
@ -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;
@ -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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -25,7 +25,7 @@
<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>
@ -33,7 +33,7 @@
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"
@ -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>
@ -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">
@ -115,8 +115,6 @@
<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>
@ -124,7 +122,7 @@
: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>

View file

@ -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

View file

@ -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