Add back the total used space per user

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-09-28 09:03:04 +02:00
parent c2a9899656
commit 1e5bcd0496
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
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");
}