Skip to content

Commit

Permalink
Merge pull request #11417 from nextcloud/hover-quota-used-space-regre…
Browse files Browse the repository at this point in the history
…ssion

Add back the total used space per user
  • Loading branch information
skjnldsv authored Sep 28, 2018
2 parents 9eb4259 + 8a2ac44 commit ecf33a6
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 17 deletions.
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.

43 changes: 31 additions & 12 deletions settings/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "settings",
"description": "Nextcloud settings",
"version": "1.3.0",
"version": "1.3.1",
"author": "John Molakvoæ (skjnldsv) <[email protected]>",
"license": "AGPL3",
"private": true,
Expand Down
8 changes: 7 additions & 1 deletion settings/src/components/userList/userRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static function rowForUser($user) {
* @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");
}
Expand Down

0 comments on commit ecf33a6

Please sign in to comment.