Merge pull request #11425 from nextcloud/stable14-hover-quota-used-space-regression

[stable14] Add back the total used space per user
This commit is contained in:
Morris Jobke 2018-09-28 15:28:22 +02:00 committed by GitHub
commit 72abd625b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "settings",
"version": "1.2.0",
"version": "1.2.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,7 +1,7 @@
{
"name": "settings",
"description": "Nextcloud settings",
"version": "1.2.0",
"version": "1.2.1",
"author": "John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>",
"license": "AGPL3",
"private": true,

View File

@ -84,7 +84,7 @@
<span slot="noResult">{{t('settings', 'No results')}}</span>
</multiselect>
</div>
<div class="quota" :class="{'icon-loading-small': loading.quota}">
<div class="quota" :class="{'icon-loading-small': loading.quota}" v-tooltip.auto="usedSpace">
<multiselect :value="userQuota" :options="quotaOptions" :disabled="loading.quota||loading.all"
tag-placeholder="create" :placeholder="t('settings', 'Select user quota')"
label="label" track-by="id" class="multiselect-vue"
@ -215,6 +215,12 @@ export default {
},
/* QUOTA MANAGEMENT */
usedSpace() {
if (this.user.quota.used) {
return t('settings', '{size} used', {size: OC.Util.humanFileSize(this.user.quota.used)});
}
return t('settings', '{size} used', {size: OC.Util.humanFileSize(0)});
},
usedQuota() {
let quota = this.user.quota.quota;
if (quota > 0) {

View File

@ -90,7 +90,7 @@ class UsersSettingsContext implements Context, ActorAwareInterface {
* @return Locator
*/
public static function classCellForUser($class, $user) {
return Locator::forThe()->xpath("//*[@class='$class']")->
return Locator::forThe()->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' $class ')]")->
descendantOf(self::rowForUser($user))->
describedAs("$class cell for user $user in Users Settings");
}